SPECS: cpuspeed.spec - use %service

glen glen at pld-linux.org
Thu Apr 20 20:03:24 CEST 2006


Author: glen                         Date: Thu Apr 20 18:03:24 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   cpuspeed.spec (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SPECS/cpuspeed.spec
diff -u SPECS/cpuspeed.spec:1.10 SPECS/cpuspeed.spec:1.11
--- SPECS/cpuspeed.spec:1.10	Wed Mar  1 00:37:25 2006
+++ SPECS/cpuspeed.spec	Thu Apr 20 20:03:19 2006
@@ -14,6 +14,7 @@
 Patch2:		%{name}-nostrip.diff
 URL:		http://carlthompson.net/Software/CPUSpeed/
 BuildRequires:	gcc-c++
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 ExclusiveArch:	%{ix86} %{x8664} ppc ppc64
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -39,7 +40,6 @@
 	CC="%{__cc} -fno-exceptions -Wall" \
 	COPTS="%{rpmcflags}"
 
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sbindir}}
@@ -53,18 +53,12 @@
 
 %post
 /sbin/chkconfig --add cpuspeed
-if [ -f /var/lock/subsys/cpuspeed ]; then
-	/etc/rc.d/init.d/cpuspeed restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/cpuspeed start\" to start cpuspeed daemon."
-fi
+%service cpuspeed restart
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/cpuspeed ]; then
-		/etc/rc.d/init.d/cpuspeed stop 1>&2
-	fi
-	[ ! -x /sbin/chkconfig ] || /sbin/chkconfig --del cpuspeed
+	%service cpuspeed stop
+	/sbin/chkconfig --del cpuspeed
 fi
 
 %files
@@ -80,6 +74,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11  2006/04/20 18:03:19  glen
+- use %service
+
 Revision 1.10  2006/02/28 23:37:25  glen
 - adapterized (killed trailing spaces/tabs)
 
@@ -102,7 +99,7 @@
 - perms for init script
 
 Revision 1.3  2005/07/03 19:26:01  speedy
-- proper %%attr
+- proper %attr
 
 Revision 1.2  2005/07/03 19:19:03  speedy
 - doesn't really need groff/gettext
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/cpuspeed.spec?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list