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}
|
|
7 Copyright: GPL
|
|
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 %config(noreplace) %{_sysconfdir}/@PACKAGE@/*.conf
|
|
99 /etc/rc.d/init.d/@PACKAGE@
|
|
100 %dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@
|
|
101
|
|
102
|
|
103 %changelog
|
|
104 * Sun Dec 18 2005 Carl Byington 1.0
|
|
105 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html
|
|
106
|
|
107 * Tue Jan 03 2005 Carl Byington 1.4
|
|
108 - added hosts-ignore conf file
|
|
109 - see RELEASE_NOTES
|
|
110
|
|
111 * Thu Jul 15 2004 John Gunkel <antispam@boing.ca> 1.3
|
|
112 - patch to rc file no longer needed
|
|
113 - see RELEASE_NOTES
|
|
114
|
|
115 * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> 1.2
|
|
116 - Fixed some typos
|
|
117 - removed patch into separate file
|
|
118 - added config migration as suggested by Carl
|
|
119 - Added reminder to edit sendmail.mc
|
|
120
|
|
121 * Wed Jun 30 2004 John Gunkel <jgunkel@palliser.ca> 1.1
|
|
122 - Initial revision of spec file. Need to add a better description, docs and a sendmail.mc message
|
|
123
|