SPECS: slony1.spec - use %service, fix chkconfig deps

glen glen at pld-linux.org
Thu Apr 20 19:41:58 CEST 2006


Author: glen                         Date: Thu Apr 20 17:41:58 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, fix chkconfig deps

---- Files affected:
SPECS:
   slony1.spec (1.15 -> 1.16) 

---- Diffs:

================================================================
Index: SPECS/slony1.spec
diff -u SPECS/slony1.spec:1.15 SPECS/slony1.spec:1.16
--- SPECS/slony1.spec:1.15	Fri Jan 27 11:22:36 2006
+++ SPECS/slony1.spec	Thu Apr 20 19:41:53 2006
@@ -21,11 +21,14 @@
 Source3:	%{name}.sysconfig
 Patch0:		%{name}-no_server_for_build.patch
 URL:		http://slony.info/
-BuildRequires:	rpm-perlprov
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	postgresql-backend-devel
-Conflicts: 	postgresql <= 8.0.3-3
+BuildRequires:	rpm-perlprov
+BuildRequires:	rpmbuild(macros) >= 1.268
+Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
+Conflicts:	postgresql <= 8.0.3-3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_pgmoduledir	%{_libdir}/postgresql
@@ -42,7 +45,7 @@
 large databases to a reasonably limited number of slave systems.
 
 Slony-I is a system for data centers and backup sites, where the
-normal mode of operation is that all nodes are available. 
+normal mode of operation is that all nodes are available.
 
 %description -l pl
 Slony-I jest systemem replikacji dla PostgreSQL. Pozwala na replikację
@@ -60,8 +63,8 @@
 Summary:	Perl scripts for managing Slony-I
 Summary(pl):	Skrypty perlowe do zarządzania Slony-I
 Group:		Applications/Databases
-Requires:	perl-modules
 Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	perl-modules
 
 %description altperl
 The altperl scripts provide an alternate method of managing Slony-I,
@@ -78,8 +81,8 @@
 Summary:	Useful additional scripts for Slony-I
 Summary(pl):	Przydatne dodatkowe skrypty dla Slony-I
 Group:		Applications/Databases
-Requires:	perl-modules
 Requires:	%{name} = %{epoch}:%{version}-%{release}
+Requires:	perl-modules
 
 %description tools
 This package contains some additional scripts provided with Slony-I,
@@ -127,17 +130,11 @@
 
 %post
 /sbin/chkconfig --add slony1
-if [ -f /var/lock/subsys/slony1 ]; then
-	/etc/rc.d/init.d/slony1 restart >&2 || :
-else
-	echo "Run \"/etc/rc.d/init.d/slony1 start\" to start slony1 replicator."
-fi
+%service slony1 restart "slony1 replicator"
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/slony1 ]; then
-		/etc/rc.d/init.d/slony1 stop
-	fi
+	%service slony1 stop
 	/sbin/chkconfig --del slony1
 fi
 
@@ -174,6 +171,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.16  2006/04/20 17:41:53  glen
+- use %service, fix chkconfig deps
+
 Revision 1.15  2006/01/27 10:22:36  qboosh
 - updated no_server_for_build patch is back
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/slony1.spec?r1=1.15&r2=1.16&f=u



More information about the pld-cvs-commit mailing list