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

glen glen at pld-linux.org
Thu Apr 20 19:36:06 CEST 2006


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

---- Files affected:
SPECS:
   sapdb.spec (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: SPECS/sapdb.spec
diff -u SPECS/sapdb.spec:1.22 SPECS/sapdb.spec:1.23
--- SPECS/sapdb.spec:1.22	Tue Dec 13 16:14:18 2005
+++ SPECS/sapdb.spec	Thu Apr 20 19:36:01 2006
@@ -65,16 +65,15 @@
 URL:		http://www.sapdb.org/
 BuildRequires:	bash
 BuildRequires:	bison
-BuildRequires:	glibc-devel
 BuildRequires:	libsigc++12-devel >= 1.2.4
 BuildRequires:	ncurses-devel
 BuildRequires:	pam-devel
 BuildRequires:	perl
-BuildRequires:	python-devel-src >= 2.2
+BuildRequires:	python >= 2.2
 BuildRequires:	python-devel >= 2.2
+BuildRequires:	python-devel-src >= 2.2
 BuildRequires:	python-libs >= 2.2
-BuildRequires:	python >= 2.2
-BuildRequires:	rpmbuild(macros) >= 1.159
+BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRequires:	vim-static
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -111,15 +110,16 @@
 Summary:	SAP DB - release independend programs
 Summary(pl):	SAP DB - programy niezależne od wersji
 Group:		Applications/Databases
-Requires(post,postun):	/sbin/chkconfig
+Requires(post,prun):	/sbin/chkconfig
 Requires(postun):	/usr/sbin/groupdel
 Requires(postun):	/usr/sbin/userdel
 Requires(pre):	/bin/id
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
 Requires(pre):	/usr/sbin/useradd
-Requires:	python-modules >= 2.2
 Requires:	python >= 2.2
+Requires:	python-modules >= 2.2
+Requires:	rc-scripts
 # User sapdb shell is /bin/bash. require shell
 Requires:	bash
 Provides:	group(sapsys)
@@ -129,21 +129,23 @@
 - remote communication server
 - command line tools for database administration
 - precompiler runtime (for applications built by SAP DB precompiler)
+
 For more information please see <http://www.sapdb.org/>.
 
 %description ind -l pl
 - serwer zdalnego dostępu
 - narzędzia linii poleceń do administracji bazami danych
 - część uruchomieniowa prekompilatora (dla aplikacji zbudowanych przez
-  prekompilator SAP DB)
-Więcej informacji można znaleźć na stronie <http://www.sapdb.org/>.
+  prekompilator SAP DB) Więcej informacji można znaleźć na stronie
+  <http://www.sapdb.org/>.
 
 %package srv
 Summary:	SAP DB database server
 Summary(pl):	Serwer bazodanowy SAP DB
 Group:		Applications/Databases
-Requires(post,postun):	/sbin/chkconfig
+Requires(post,preun):	/sbin/chkconfig
 Requires(pre):	%{name}-ind = %{version}-%{release}
+Requires:	rc-scripts
 
 %description srv
 SAP DB database server.
@@ -155,8 +157,10 @@
 Summary:	SAP DB web tools
 Summary(pl):	Narzędzia WWW dla SAP DB
 Group:		Applications/Databases
+Requires(post,preun):	/sbin/chkconfig
 Requires:	%{name}-callif = %{version}-%{release}
 Requires:	%{name}-ind = %{version}-%{release}
+Requires:	rc-scripts
 
 %description web
 SAP DB web tools.
@@ -185,11 +189,13 @@
 %description callif
 - ODBC driver
 - JDBC driver
+
 For more information please see <http://www.sapdb.org/>.
 
 %description callif -l pl
 - sterownik ODBC
 - sterownik JDBC
+
 Więcej informacji można znaleźć na stronie <http://www.sapdb.org/>.
 
 %package scriptif
@@ -585,11 +591,7 @@
 
 %post srv
 /sbin/chkconfig --add sapdb
-if [ -f /var/lock/subsys/sapdb ]; then
-	/etc/rc.d/init.d/sapdb restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/sapdb start\" to start SAP DB."
-fi
+%service sapdb restart "SAP DB"
 
 DBROOT=%{depend}
 export DBROOT
@@ -627,12 +629,8 @@
 	exit 0
 fi
 
-if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/sapdb ]; then
-		/etc/rc.d/init.d/sapdb stop 1>&2
-	fi
-	/sbin/chkconfig --del sapdb
-fi
+%service sapdb stop
+/sbin/chkconfig --del sapdb
 
 DBROOT=%{depend}
 export DBROOT
@@ -672,18 +670,11 @@
 
 %post web
 /sbin/chkconfig --add sapdb-web
-if [ -f /var/lock/subsys/sapdb-web ]; then
-	/etc/rc.d/init.d/sapdb-web restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/sapdb-web start\" to start SAP DB WebServer."
-fi
-
+%service sapdb-web restart "SAP DB WebServer"
 
 %preun web
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/sapdb-web ]; then
-		/etc/rc.d/init.d/sapdb-web stop 1>&2
-	fi
+	%service sapdb-web stop
 	/sbin/chkconfig --del sapdb-web
 fi
 
@@ -953,6 +944,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.23  2006/04/20 17:36:01  glen
+- use %service, fix chkconfig deps
+
 Revision 1.22  2005/12/13 15:14:18  glen
 - adapterized (sorted %verify attrs)
 
@@ -973,7 +967,7 @@
 - formatting
 
 Revision 1.16  2004/09/16 00:04:44  ankry
-- %%userremove/%%groupremove support
+- %userremove/%groupremove support
 - unification
 
 Revision 1.15  2004/02/28 12:26:35  grzegol
================================================================

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



More information about the pld-cvs-commit mailing list