comparison sm-archive.spec.in @ 17:8ebecad6530f stable-1-6

Add src/daemon* missing from source control. Switch to Mercurial source control.
author Carl Byington <carl@five-ten-sg.com>
date Fri, 21 Mar 2008 16:00:13 -0700
parents 75e1a9bcbc2e
children b24369330483
comparison
equal deleted inserted replaced
16:e57053cd7d20 17:8ebecad6530f
1 %define localstatedir /var/lib 1 %define localstatedir /var/lib
2 2
3 Summary: @PACKAGE@ Sendmail Milter 3 Summary: @PACKAGE@ Sendmail Milter
4 Name: @PACKAGE@ 4 Name: @PACKAGE@
5 Version: @VERSION@ 5 Version: @VERSION@
6 Release: %{?custom_release}%{!?custom_release:1} 6 Release: 1%{?dist}
7 License: GPL 7 License: GPLv3+
8 Group: System Environment/Daemons 8 Group: System Environment/Daemons
9 Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz 9 Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 10 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
11 URL: http://www.five-ten-sg.com/@PACKAGE@/ 11 URL: http://www.five-ten-sg.com/%{name}/
12 Vendor: 510 Software Group
13 Packager: 510 Software Group
14 AutoReqProv: no 12 AutoReqProv: no
15 13
16 Requires(pre): /usr/sbin/useradd 14 Requires(pre): /usr/sbin/useradd
17 Requires(pre): /usr/bin/getent 15 Requires(pre): /usr/bin/getent
18 Requires(postun): /usr/sbin/userdel 16 Requires(postun): /usr/sbin/userdel
23 Requires: sendmail-cf 21 Requires: sendmail-cf
24 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6 22 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6
25 23
26 24
27 %description 25 %description
28 This milter adds recipient addresses to message passing thru it, based on a configuration file. 26 This milter adds recipient addresses to messages passing thru it, based
27 on a configuration file.
29 28
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. 29 The sm-archive milter reads a text configuration file
30 (sm-archive.conf) on startup, and whenever the config file (or any of
31 the referenced include files) is changed. The entire configuration
32 file is case insensitive.
31 33
32 34
33 %prep 35 %prep
34 36 %setup -q
35
36 %setup
37 37
38 38
39 %build 39 %build
40 ./configure --prefix=%{_prefix} \ 40 %configure
41 --bindir=%{_bindir} --mandir=%{_mandir} \ 41 make %{?_smp_mflags}
42 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
43 --datadir=%{_datadir} --includedir=%{_includedir} \
44 --sysconfdir=%{_sysconfdir}
45 make
46
47 42
48 %install 43 %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 44 rm -rf $RPM_BUILD_ROOT
54 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ 45 make DESTDIR=$RPM_BUILD_ROOT install
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 46 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
61 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
62 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/sm-archive/sm-archive $RPM_BUILD_ROOT/etc/rc.d/init.d 47 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@ 48 mkdir -p $RPM_BUILD_ROOT/var/run/%{name}
64 mkdir -p %{buildroot}/var/run/@PACKAGE@
65 49
66 50
67 %pre 51 %pre
68 /usr/bin/getent passwd sm-archive >/dev/null || 52 /usr/bin/getent passwd sm-archive >/dev/null || useradd -r -d /etc/sm-archive -M -c "sm-archive pseudo-user" -s /sbin/nologin sm-archive >/dev/null
69 useradd -r -d /etc/sm-archive -M -c "sm-archive pseudo-user" -s /sbin/nologin sm-archive
70 53
71 54
72 %post 55 %post
73 /sbin/chkconfig --add @PACKAGE@ 56 /sbin/chkconfig --add %{name}
74 57 echo Remember to edit %{_sysconfdir}/%{name}/%{name}.conf and add the following line to your sendmail.mc:
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')" 58 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 59 echo
78 60
79 61
80 %preun 62 %preun
81 /sbin/service @PACKAGE@ stop || : 63 [ $1 = 0 ] && /sbin/service %{name} stop || :
82 /sbin/chkconfig --del @PACKAGE@
83 userdel @PACKAGE@ || :
84 64
85 65
86 %postun 66 %postun
67 [ $1 = 0 ] && /sbin/chkconfig --del %{name}
68 [ $1 = 0 ] && userdel %{name} || :
87 69
88 70
89 %clean 71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
90 74
91 %files 75 %files
92 %defattr(-,root,root) 76 %defattr(-,root,root,-)
93 %{_sbindir}/* 77 %{_sbindir}/*
94 %doc %{_mandir}/* 78 %{_mandir}/man1/*
95 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@ 79 %{_mandir}/man5/*
96 %{_datadir}/doc/@PACKAGE@-@VERSION@ 80 %docdir %{_datadir}/doc/%{name}-%{version}
97 %config(noreplace) %{_sysconfdir}/@PACKAGE@ 81 %{_datadir}/doc/%{name}-%{version}
98 /etc/rc.d/init.d/@PACKAGE@ 82 %config(noreplace) %attr(0750,%{name},root) %{_sysconfdir}/%{name}
99 %dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@ 83 /etc/rc.d/init.d/%{name}
84 %dir %attr(0750,%{name},root) /var/run/%{name}
100 85
101 86
102 %changelog 87 %changelog
103 * Fri Mar 10 2006 Carl Byington 1.0 88 * Fri Mar 21 2008 Carl Byington <carl@five-ten-sg.com> - 1.6
89 - changes for Fedora packaging guidelines
90
91 * Fri Mar 10 2006 Carl Byington <carl@five-ten-sg.com> -1.0
104 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html 92 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html