Mercurial > sm-archive
diff 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 |
line wrap: on
line diff
--- a/sm-archive.spec.in Fri Mar 21 12:32:29 2008 +0000 +++ b/sm-archive.spec.in Fri Mar 21 16:00:13 2008 -0700 @@ -3,14 +3,12 @@ Summary: @PACKAGE@ Sendmail Milter Name: @PACKAGE@ Version: @VERSION@ -Release: %{?custom_release}%{!?custom_release:1} -License: GPL +Release: 1%{?dist} +License: GPLv3+ Group: System Environment/Daemons -Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -URL: http://www.five-ten-sg.com/@PACKAGE@/ -Vendor: 510 Software Group -Packager: 510 Software Group +Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +URL: http://www.five-ten-sg.com/%{name}/ AutoReqProv: no Requires(pre): /usr/sbin/useradd @@ -25,80 +23,70 @@ %description -This milter adds recipient addresses to message passing thru it, based on a configuration file. +This milter adds recipient addresses to messages passing thru it, based +on a configuration file. -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. +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. %prep - - -%setup +%setup -q %build -./configure --prefix=%{_prefix} \ - --bindir=%{_bindir} --mandir=%{_mandir} \ - --localstatedir=%{localstatedir} --libdir=%{_libdir} \ - --datadir=%{_datadir} --includedir=%{_includedir} \ - --sysconfdir=%{_sysconfdir} -make - +%configure +make %{?_smp_mflags} %install -if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then - echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT - exit 1 -fi rm -rf $RPM_BUILD_ROOT -make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ - mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \ - localstatedir=$RPM_BUILD_ROOT%{localstatedir} \ - datadir=$RPM_BUILD_ROOT%{_datadir} \ - includedir=$RPM_BUILD_ROOT%{_includedir} \ - sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install +make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d -mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@ mv -f $RPM_BUILD_ROOT%{_sysconfdir}/sm-archive/sm-archive $RPM_BUILD_ROOT/etc/rc.d/init.d -mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@ -mkdir -p %{buildroot}/var/run/@PACKAGE@ +mkdir -p $RPM_BUILD_ROOT/var/run/%{name} %pre -/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 +/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 %post -/sbin/chkconfig --add @PACKAGE@ - -echo Remember to edit %{_sysconfdir}/@PACKAGE@/@PACKAGE@.conf and add the following line to your sendmail.mc: +/sbin/chkconfig --add %{name} +echo Remember to edit %{_sysconfdir}/%{name}/%{name}.conf and add the following line to your sendmail.mc: 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')" echo %preun -/sbin/service @PACKAGE@ stop || : -/sbin/chkconfig --del @PACKAGE@ -userdel @PACKAGE@ || : +[ $1 = 0 ] && /sbin/service %{name} stop || : %postun +[ $1 = 0 ] && /sbin/chkconfig --del %{name} +[ $1 = 0 ] && userdel %{name} || : %clean +rm -rf $RPM_BUILD_ROOT + %files -%defattr(-,root,root) +%defattr(-,root,root,-) %{_sbindir}/* -%doc %{_mandir}/* -%docdir %{_datadir}/doc/@PACKAGE@-@VERSION@ -%{_datadir}/doc/@PACKAGE@-@VERSION@ -%config(noreplace) %{_sysconfdir}/@PACKAGE@ -/etc/rc.d/init.d/@PACKAGE@ -%dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@ +%{_mandir}/man1/* +%{_mandir}/man5/* +%docdir %{_datadir}/doc/%{name}-%{version} +%{_datadir}/doc/%{name}-%{version} +%config(noreplace) %attr(0750,%{name},root) %{_sysconfdir}/%{name} +/etc/rc.d/init.d/%{name} +%dir %attr(0750,%{name},root) /var/run/%{name} %changelog -* Fri Mar 10 2006 Carl Byington 1.0 +* Fri Mar 21 2008 Carl Byington <carl@five-ten-sg.com> - 1.6 +- changes for Fedora packaging guidelines + +* Fri Mar 10 2006 Carl Byington <carl@five-ten-sg.com> -1.0 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html