SPECS: spamassassin.spec - rename spamd service to spamd (trigger ...

glen glen at pld-linux.org
Mon Jan 30 09:29:48 CET 2006


Author: glen                         Date: Mon Jan 30 08:29:48 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rename spamd service to spamd (trigger included)
- use %service to restart spamd
- check-files cleanup, rel 6

---- Files affected:
SPECS:
   spamassassin.spec (1.89 -> 1.90) 

---- Diffs:

================================================================
Index: SPECS/spamassassin.spec
diff -u SPECS/spamassassin.spec:1.89 SPECS/spamassassin.spec:1.90
--- SPECS/spamassassin.spec:1.89	Mon Jan 30 09:12:06 2006
+++ SPECS/spamassassin.spec	Mon Jan 30 09:29:42 2006
@@ -10,7 +10,7 @@
 Summary(pl):	Filtr antyspamowy, przeznaczony dla programów dostarczających pocztę (MDA)
 Name:		spamassassin
 Version:	3.1.0
-Release:	5
+Release:	6
 License:	Apache Software License v2
 Group:		Applications/Mail
 Source0:	http://www.apache.org/dist/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
@@ -37,6 +37,7 @@
 #BuildRequires:	perl-Razor2
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	perl-libwww
+BuildRequires:	rpmbuild(macros) >= 1.268
 %if %{with tests}
 # are these really needed?
 BuildRequires:	perl-MIME-Base64
@@ -183,28 +184,31 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamassassin
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
 
-# shouldn't this script be called `spamd' instead?
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
+rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{perl_vendorlib}/spamassassin-run.pod}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post spamd
-/sbin/chkconfig --add spamassassin
-if [ -f /var/lock/subsys/spamd ]; then
-	/etc/rc.d/init.d/spamassassin restart 1>&2
-else
-	echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
-fi
+/sbin/chkconfig --add spamd
+%service spamd restart
 
 %preun spamd
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/spamd ]; then
-		/etc/rc.d/init.d/spamassassin stop 1>&2
-	fi
-	/sbin/chkconfig --del spamassassin
+	%service spamd stop
+	/sbin/chkconfig --del spamd
+fi
+
+%triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
+# temp hack, should we care of the dead link?
+ln -s spamd /etc/rc.d/init.d/spamassassin
+/sbin/chkconfig --del spamassassin
+rm -f /etc/rc.d/init.d/spamassassin
+if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
+	mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
 fi
 
 %files
@@ -225,8 +229,8 @@
 %files spamd
 %defattr(644,root,root,755)
 %doc spamd/README*
-%attr(754,root,root) /etc/rc.d/init.d/spamassassin
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamassassin
+%attr(754,root,root) /etc/rc.d/init.d/spamd
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
 %attr(755,root,root) %{_bindir}/spamd
 %{_mandir}/man1/spamd*
 
@@ -251,6 +255,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.90  2006/01/30 08:29:42  glen
+- rename spamd service to spamd (trigger included)
+- use %service to restart spamd
+- check-files cleanup, rel 6
+
 Revision 1.89  2006/01/30 08:12:06  glen
 - adapterized (sorted preamble)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/spamassassin.spec?r1=1.89&r2=1.90&f=u



More information about the pld-cvs-commit mailing list