SPECS: atm.spec, awstats.spec, backuppc.spec - use %service

glen glen at pld-linux.org
Sun Apr 16 22:18:52 CEST 2006


Author: glen                         Date: Sun Apr 16 20:18:52 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service

---- Files affected:
SPECS:
   atm.spec (1.39 -> 1.40) , awstats.spec (1.45 -> 1.46) , backuppc.spec (1.60 -> 1.61) 

---- Diffs:

================================================================
Index: SPECS/atm.spec
diff -u SPECS/atm.spec:1.39 SPECS/atm.spec:1.40
--- SPECS/atm.spec:1.39	Sat Jan 21 01:01:16 2006
+++ SPECS/atm.spec	Sun Apr 16 22:18:47 2006
@@ -13,6 +13,7 @@
 Patch0:		%{name}-opt.patch
 Patch1:		%{name}-OPEN_MAX.patch
 URL:		http://ica1www.epfl.ch/linux-atm/
+BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -91,15 +92,11 @@
 
 %post
 /sbin/chkconfig --add atm
-if [ -f /var/lock/subsys/atm ]; then
-	/etc/rc.d/init.d/atm restart 1>&2
-fi
+%service atm restart
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/atm ]; then
-		/etc/rc.d/init.d/atm stop 1>&2
-	fi
+	%service atm stop
 	/sbin/chkconfig --del atm
 fi
 
@@ -129,6 +126,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.40  2006/04/16 20:18:47  glen
+- use %service
+
 Revision 1.39  2006/01/21 00:01:16  arekm
 - kill Icon: field (support for these is obsolete says jbj)
 

================================================================
Index: SPECS/awstats.spec
diff -u SPECS/awstats.spec:1.45 SPECS/awstats.spec:1.46
--- SPECS/awstats.spec:1.45	Sun Feb 26 16:16:26 2006
+++ SPECS/awstats.spec	Sun Apr 16 22:18:47 2006
@@ -130,10 +130,7 @@
 
 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 /usr/sbin/webapp register httpd %{_webapp}
-
-if [ -f /var/lock/subsys/httpd ]; then
-	/etc/rc.d/init.d/httpd reload 1>&2
-fi
+%service -q httpd reload
 
 %files
 %defattr(644,root,root,755)
@@ -163,6 +160,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.46  2006/04/16 20:18:47  glen
+- use %service
+
 Revision 1.45  2006/02/26 15:16:26  troll
 - added PLD patch, R: 4
 

================================================================
Index: SPECS/backuppc.spec
diff -u SPECS/backuppc.spec:1.60 SPECS/backuppc.spec:1.61
--- SPECS/backuppc.spec:1.60	Sun Mar  5 23:45:54 2006
+++ SPECS/backuppc.spec	Sun Apr 16 22:18:47 2006
@@ -35,9 +35,9 @@
 BuildRequires:	rpm-perlprov
 BuildRequires:	rpmbuild(macros) >= 1.202
 BuildRequires:	sed >= 4.0
+Requires:	apache >= 2.0
 Requires:	apache(mod_auth)
 Requires:	apache-mod_perl
-Requires:	apache >= 2.0
 Requires:	par2cmdline
 Requires:	perl-Archive-Zip
 Requires:	perl-Compress-Bzip2
@@ -107,7 +107,7 @@
   do sieci tylko z przerwami i mają dynamiczne adresy IP (z DHCP).
 - Elastyczna konfiguracja parametrów pozwala na wykonywanie wielu
   kopii równolegle.
-- Istnieje możliwość nagrywania backupu na inne nośniki (tasmy, 
+- Istnieje możliwość nagrywania backupu na inne nośniki (tasmy,
   DVD-R/RW, CD-R/RW i inne)
 - Wiele więcej można odkryć w manualu...
 
@@ -115,7 +115,7 @@
 %setup -q -n BackupPC-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1 
+%patch2 -p1
 
 %build
 sed -i -e 's#!/bin/perl#!%{__perl}#' configure.pl
@@ -178,7 +178,7 @@
 install doc/* $RPM_BUILD_ROOT%{_datadir}/%{name}/www/html/doc
 # Cleanups:
 rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/www/html/CVS
-rm -rdf $RPM_BUILD_ROOT/usr/doc
+rm -rdf $RPM_BUILD_ROOT%{_prefix}/doc
 
 # symlinks
 mv $RPM_BUILD_ROOT%{_var}/lib/%{name}/conf/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
@@ -201,35 +201,26 @@
 
 
 %if 0
-
 %pre
 # Add the "backuppc" user and "http" group
 %groupadd -g 150 %{BPCgroup}
 %useradd -c "system user for %{name}" -u 150 -d /var/lib/backuppc -s /bin/false -g %{BPCgroup} %{BPCuser}
 %endif
 
-%preun
-if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/backuppc ]; then
-		/etc/rc.d/init.d/backuppc stop
-	fi
-	/sbin/chkconfig --del backuppc
-fi
-
-
 %post
-if [ ! -f /etc/backuppc/password ]; then
+if [ ! -f %{_sysconfdir}/backuppc/password ]; then
 # FIXME? $PASS variable cames from?
 	openssl rand -base64 6 > $PASS
-	/usr/bin/htpasswd -cb /etc/backuppc/password admin $PASS
-	echo "Your web pasword is: $PASS ."
-	echo "Change this: htpasswd -b /etc/backuppc/password user password"
+	%{_bindir}/htpasswd -cb %{_sysconfdir}/backuppc/password admin $PASS
+	echo "Your web password is: $PASS."
+	echo "Change this: htpasswd -b %{_sysconfdir}/backuppc/password user password"
 fi
+%service backuppc restart "BackupPC"
 
-if [ -f /var/lock/subsys/backuppc ]; then
-	/etc/rc.d/init.d/backuppc restart
-else
-	echo "Run \"/etc/rc.d/init.d/backuppc start\" to start BackupPC."
+%preun
+if [ "$1" = "0" ]; then
+	%service backuppc stop
+	/sbin/chkconfig --del backuppc
 fi
 
 %postun
@@ -291,6 +282,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.61  2006/04/16 20:18:47  glen
+- use %service
+
 Revision 1.60  2006/03/05 22:45:54  wolvverine
 - description
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/atm.spec?r1=1.39&r2=1.40&f=u
    http://cvs.pld-linux.org/SPECS/awstats.spec?r1=1.45&r2=1.46&f=u
    http://cvs.pld-linux.org/SPECS/backuppc.spec?r1=1.60&r2=1.61&f=u



More information about the pld-cvs-commit mailing list