]> git.pld-linux.org Git - packages/PowerChutePlus.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 19 Mar 2006 17:50:57 +0000 (17:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PowerChutePlus.spec -> 1.24

PowerChutePlus.spec

index 1ac76538a2dad2eae95cd729929d8c50ba84ae14..e5b18f3afbb7da91c653a1222fbbfbe1dd56c041 100644 (file)
@@ -17,15 +17,15 @@ Source6:    %{name}-powerchute.ini_templ
 Source7:       ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/settings.pdf
 # Source7-md5: c69abad141a836fd12ced0cc39049dc6
 Patch0:                %{name}-fix-sh.patch
 Source7:       ftp://ftp.apcc.com/apc/public/software/unix/linux/pcplus/settings.pdf
 # Source7-md5: c69abad141a836fd12ced0cc39049dc6
 Patch0:                %{name}-fix-sh.patch
-BuildRequires: rpmbuild(macros) >= 1.202
-PreReq:                rc-scripts
-Requires(pre): /bin/id
-Requires(pre): /usr/bin/getgid
-Requires(pre): /usr/sbin/useradd
-Requires(pre): /usr/sbin/groupadd
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
 Requires(post,preun):  /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:      rc-scripts
 Provides:      group(pwrchute)
 Provides:      user(pwrchute)
 ExclusiveArch: %{ix86}
 Provides:      group(pwrchute)
 Provides:      user(pwrchute)
 ExclusiveArch: %{ix86}
@@ -36,7 +36,7 @@ This program allows users to safely shut down their system in response
 to power failures and other power events. It also allows users to
 configure and manage UPS models.
 
 to power failures and other power events. It also allows users to
 configure and manage UPS models.
 
-Please note that /usr/lib/powerchute/Config.sh should be run in order
+Please note that %{_libdir}/powerchute/Config.sh should be run in order
 to configure PowerChute plus.
 
 %description -l pl
 to configure PowerChute plus.
 
 %description -l pl
@@ -48,14 +48,11 @@ Uwaga: aby skonfigurowa
 
 %prep
 %setup -q -c
 
 %prep
 %setup -q -c
-for i in BI_LINUX CI_LINUX COMMON FI_LINUX HELP ; do
+for i in BI_LINUX CI_LINUX COMMON FI_LINUX HELP; do
        tar xf $i
 done
 %patch0 -p1
 
        tar xf $i
 done
 %patch0 -p1
 
-%build
-# No build, binary package
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/powerchute} \
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_libdir}/powerchute} \
@@ -108,11 +105,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add upsd
 
 %post
 /sbin/chkconfig --add upsd
-if [ -f /var/lock/subsys/upsd ]; then
-       /etc/rc.d/init.d/upsd restart 1>&2
-else
-       echo "Type \"/etc/rc.d/init.d/upsd start\" to start UPSd server" 1>&2
-fi
+%service upsd restart "UPSd server"
 cd %{_libdir}/powerchute
 ./machine_id
 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
 cd %{_libdir}/powerchute
 ./machine_id
 echo "You should run %{_libdir}/powerchute/Config.sh to configure PowerChute plus"
@@ -120,9 +113,7 @@ echo "Remember to set the password for pwrchute account"
 
 %preun
 if [ "$1" = "0" ]; then
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/upsd ]; then
-               /etc/rc.d/init.d/upsd stop 1>&2
-       fi
+       %service upsd stop
        /sbin/chkconfig --del upsd
 fi
 
        /sbin/chkconfig --del upsd
 fi
 
This page took 0.048466 seconds and 4 git commands to generate.