]> git.pld-linux.org Git - packages/laptop-mode-tools.git/blobdiff - laptop-mode-tools.spec
- use %service and adapterize
[packages/laptop-mode-tools.git] / laptop-mode-tools.spec
index eb55f4dd2aabf9a1370b84d3e4301cadae544df9..017d276a8cbe9532bf7014d1e7bd5b8d1de90569 100644 (file)
@@ -1,15 +1,15 @@
 Summary:       Laptop Mode Tools
 Summary(pl):   Narzêdzia do trybu laptopowego
 Name:          laptop-mode-tools
-Version:       1.05
+Version:       1.22
 Release:       1
 License:       GPL
 Group:         Applications/System
 Source0:       http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/%{name}_%{version}.tar.gz
-# Source0-md5: 61cf06849c3340ba965fc14091a25c82
+# Source0-md5: 16238ceeafabade7e257064d89eb79ff
 Source1:       %{name}.init
 URL:           http://www.xs4all.nl/~bsamwel/laptop_mode/
-PreReq:                rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-scripts = %{epoch}:%{version}-%{release}
 BuildArch:     noarch
@@ -83,24 +83,18 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add laptop-mode
-if [ -f /var/lock/subsys/laptop-mode ]; then
-       /etc/rc.d/init.d/laptop-mode restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/laptop-mode start\" to start laptop-mode."
-fi
+%service laptop-mode restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/laptop-mode ]; then
-               /etc/rc.d/init.d/laptop-mode stop 1>&2
-       fi
+       %service laptop-mode stop
        /sbin/chkconfig --del laptop-mode
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc README Documentation/*
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/laptop-mode/*.*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/laptop-mode/*.*
 %dir %{_sysconfdir}/laptop-mode
 %attr(754,root,root) /etc/rc.d/init.d/laptop-mode
 %attr(755,root,root) %{_sbindir}/*
This page took 0.061105 seconds and 4 git commands to generate.