1
|
1 %define localstatedir /var/lib
|
|
2
|
|
3 Summary: @PACKAGE@ Sendmail Milter
|
|
4 Name: @PACKAGE@
|
|
5 Version: @VERSION@
|
|
6 Release: %{?custom_release}%{!?custom_release:1}
|
13
|
7 License: GPL
|
1
|
8 Group: System Environment/Daemons
|
|
9 Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz
|
|
10 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
|
11 URL: http://www.five-ten-sg.com/@PACKAGE@/
|
|
12 Vendor: 510 Software Group
|
|
13 Packager: 510 Software Group
|
|
14 AutoReqProv: no
|
|
15
|
|
16 Requires(pre): /usr/sbin/useradd
|
|
17 Requires(pre): /usr/bin/getent
|
|
18 Requires(postun): /usr/sbin/userdel
|
|
19 Requires(post,preun): /sbin/chkconfig
|
|
20 Requires(post,preun): /sbin/service
|
|
21 BuildRequires: sendmail-devel >= 8.12.1
|
|
22 Requires: sendmail >= 8.12.1
|
|
23 Requires: sendmail-cf
|
|
24 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6
|
|
25
|
|
26
|
|
27 %description
|
|
28 This milter adds recipient addresses to message passing thru it, based on a configuration file.
|
|
29
|
|
30 The sm-archive milter reads a text configuration file (sm-archive.conf) on startup, and whenever the config file (or any of the referenced include files) is changed. The entire configuration file is case insensitive.
|
|
31
|
|
32
|
|
33 %prep
|
|
34
|
|
35
|
|
36 %setup
|
|
37
|
|
38
|
|
39 %build
|
|
40 ./configure --prefix=%{_prefix} \
|
|
41 --bindir=%{_bindir} --mandir=%{_mandir} \
|
|
42 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
|
|
43 --datadir=%{_datadir} --includedir=%{_includedir} \
|
|
44 --sysconfdir=%{_sysconfdir}
|
|
45 make
|
|
46
|
|
47
|
|
48 %install
|
|
49 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
|
|
50 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
|
|
51 exit 1
|
|
52 fi
|
|
53 rm -rf $RPM_BUILD_ROOT
|
|
54 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
|
|
55 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
|
|
56 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
|
|
57 datadir=$RPM_BUILD_ROOT%{_datadir} \
|
|
58 includedir=$RPM_BUILD_ROOT%{_includedir} \
|
|
59 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
|
|
60 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
61 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
2
|
62 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/sm-archive/sm-archive $RPM_BUILD_ROOT/etc/rc.d/init.d
|
|
63 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
|
1
|
64 mkdir -p %{buildroot}/var/run/@PACKAGE@
|
|
65
|
|
66
|
|
67 %pre
|
|
68 /usr/bin/getent passwd sm-archive >/dev/null ||
|
|
69 useradd -r -d /etc/sm-archive -M -c "sm-archive pseudo-user" -s /sbin/nologin sm-archive
|
|
70
|
|
71
|
|
72 %post
|
|
73 /sbin/chkconfig --add @PACKAGE@
|
|
74
|
|
75 echo Remember to edit %{_sysconfdir}/@PACKAGE@/@PACKAGE@.conf and add the following line to your sendmail.mc:
|
|
76 echo "INPUT_MAIL_FILTER(\`sm-archive', \`S=local:/var/run/sm-archive/sm-archive.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')"
|
|
77 echo
|
|
78
|
|
79
|
|
80 %preun
|
|
81 /sbin/service @PACKAGE@ stop || :
|
|
82 /sbin/chkconfig --del @PACKAGE@
|
|
83 userdel @PACKAGE@ || :
|
|
84
|
|
85
|
|
86 %postun
|
|
87
|
|
88
|
|
89 %clean
|
|
90
|
|
91 %files
|
|
92 %defattr(-,root,root)
|
|
93 %{_sbindir}/*
|
|
94 %doc %{_mandir}/*
|
|
95 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@
|
|
96 %{_datadir}/doc/@PACKAGE@-@VERSION@
|
|
97 %config(noreplace) %{_sysconfdir}/@PACKAGE@
|
|
98 /etc/rc.d/init.d/@PACKAGE@
|
|
99 %dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@
|
|
100
|
|
101
|
|
102 %changelog
|
4
|
103 * Fri Mar 10 2006 Carl Byington 1.0
|
1
|
104 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html
|