Summary: Laptop Mode Tools
Summary(pl): Narzêdzia do trybu laptopowego
Name: laptop-mode-tools
-Version: 1.04
-Release: 0.1
-Epoch: 0
+Version: 1.22
+Release: 2
License: GPL
Group: Applications/System
Source0: http://www.xs4all.nl/~bsamwel/laptop_mode/tools/downloads/%{name}_%{version}.tar.gz
-# Source0-md5: b26fcc4df2b38da17e4f09872a1cfeda
+# 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
%install
rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,laptop-mode}
-install -d $RPM_BUILD_ROOT/etc/apm/event.d
-install -d $RPM_BUILD_ROOT/etc/acpi/{actions,events}
-install -d $RPM_BUILD_ROOT{%{_mandir}/man8,%{_sbindir}}
+install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d,laptop-mode,apm/event.d,acpi/{actions,events}} \
+ $RPM_BUILD_ROOT{%{_mandir}/man8,%{_sbindir}}
install man/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
%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 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}/*
-%dir %{_sysconfdir}/laptop-mode
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/laptop-mode/*.*
-
%{_mandir}/man8/*.8*
%files acpi