SPECS: vmailmgr.spec - use %service

glen glen at pld-linux.org
Tue Mar 14 02:18:42 CET 2006


Author: glen                         Date: Tue Mar 14 01:18:41 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   vmailmgr.spec (1.37 -> 1.38) 

---- Diffs:

================================================================
Index: SPECS/vmailmgr.spec
diff -u SPECS/vmailmgr.spec:1.37 SPECS/vmailmgr.spec:1.38
--- SPECS/vmailmgr.spec:1.37	Tue Dec 13 16:51:53 2005
+++ SPECS/vmailmgr.spec	Tue Mar 14 02:18:36 2006
@@ -18,9 +18,11 @@
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	python-devel >= 2.2.1
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires:	rpmbuild(macros) >= 1.268
 Obsoletes:	checkvpw
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# TODO: use macros fopm rpm-build-macros
 %define python_sitepkgsdir %(echo `python -c "import sys; print (sys.prefix + '/lib/python' + sys.version[:3] + '/site-packages/')"`)
 %define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')"
 %define python_compile python -c "import compileall; compileall.compile_dir('.')"
@@ -170,30 +172,20 @@
 %post daemon
 /sbin/chkconfig --add vmailmgrd
 touch /var/log/vmailmgrd
-if [ -f /var/lock/subsys/vmailmgrd ]; then
-	/etc/rc.d/init.d/vmailmgrd restart >&2
-else
-	echo "Run \"/etc/rc.d/init.d/vmailmgrd start\" to start vmailmgrd daemon."
-fi
+%service vmailmgrd restart "vmailmgrd daemon"
 
 %preun daemon
 if [ "$1" = "0" ];then
-	if [ -r /var/lock/subsys/vmailmgrd ]; then
-		/etc/rc.d/init.d/vmailmgrd stop >&2
-	fi
+	%service vmailmgrd stop
 	/sbin/chkconfig --del vmailmgrd
 fi
 
 %post pop3
-if [ -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd reload 1>&2
-else
-	echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
-fi
+%service -q rc-inetd reload
 
 %postun pop3
-if [ -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd reload
+if [ "$1" = 0 ]; then
+	%service -q rc-inetd reload
 fi
 
 %files
@@ -238,6 +230,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.38  2006/03/14 01:18:36  glen
+- use %service
+
 Revision 1.37  2005/12/13 15:51:53  glen
 - adapterized (sorted %verify attrs)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/vmailmgr.spec?r1=1.37&r2=1.38&f=u



More information about the pld-cvs-commit mailing list