SPECS: vm-pop3d.spec - use %service, fixed broken upgrade, rel 4

glen glen at pld-linux.org
Tue Mar 14 00:00:10 CET 2006


Author: glen                         Date: Mon Mar 13 23:00:10 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, fixed broken upgrade, rel 4

---- Files affected:
SPECS:
   vm-pop3d.spec (1.21 -> 1.22) 

---- Diffs:

================================================================
Index: SPECS/vm-pop3d.spec
diff -u SPECS/vm-pop3d.spec:1.21 SPECS/vm-pop3d.spec:1.22
--- SPECS/vm-pop3d.spec:1.21	Tue Dec 13 16:51:53 2005
+++ SPECS/vm-pop3d.spec	Tue Mar 14 00:00:04 2006
@@ -9,7 +9,7 @@
 Summary(pl):	Serwer POP3
 Name:		vm-pop3d
 Version:	1.1.6
-Release:	3
+Release:	4
 License:	GPL
 Group:		Networking/Daemons
 Source0:	ftp://sunsite.unc.edu/pub/Linux/system/mail/pop/%{name}-%{version}.tar.gz
@@ -21,6 +21,7 @@
 BuildRequires:	autoconf
 BuildRequires:	automake
 %{?with_pam:BuildRequires:	pam-devel}
+BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -41,13 +42,13 @@
 Summary(pl):	Serwer POP3 - wspólne pliki
 Group:		Networking/Daemons
 %{?with_pam:Requires:	pam >= 0.77.3}
+Obsoletes:	imap-pop
 Obsoletes:	pop3daemon
 Obsoletes:	pop3proxy
 Obsoletes:	qpopper
 Obsoletes:	qpopper6
-Obsoletes:	imap-pop
-Obsoletes:	solid-pop3d-ssl
 Obsoletes:	solid-pop3d
+Obsoletes:	solid-pop3d-ssl
 
 %description common
 virtualmail-pop3d supports alternative password files and mail spool
@@ -150,30 +151,22 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post inetd
-if [ -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd restart 1>&2
-else
-	echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
-fi
+%service -q rc-inetd restart
 
 %postun inetd
-if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd reload 1>&2
+if [ "$1" = "0" ]; then
+	%service -q rc-inetd restart
 fi
 
 %post standalone
 /sbin/chkconfig --add vm-pop3d
-if [ -f /var/lock/subsys/vm-pop3d ]; then
-	/etc/rc.d/init.d/vm-pop3d restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/vm-pop3d start\" to start vm-pop3d daemon."
-fi
+%service vm-pop3d restart "vm-pop3d daemon"
 
 %preun standalone
-if [ "$1" = "0" -a -f /var/lock/subsys/vm-pop3d ]; then
-	/etc/rc.d/init.d/vm-pop3d stop 1>&2
+if [ "$1" = "0" ]; then
+	%service vm-pop3d stop
+	/sbin/chkconfig --del vm-pop3d
 fi
-/sbin/chkconfig --del vm-pop3d
 
 %files common
 %defattr(644,root,root,755)
@@ -196,6 +189,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2006/03/13 23:00:04  glen
+- use %service, fixed broken upgrade, rel 4
+
 Revision 1.21  2005/12/13 15:51:53  glen
 - adapterized (sorted %verify attrs)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/vm-pop3d.spec?r1=1.21&r2=1.22&f=u



More information about the pld-cvs-commit mailing list