Name: laptop-mode-tools Version: 1.49 Release: 1%{?dist} Summary: Tools for power savings based on battery/AC status Group: System Environment/Base License: GPLv2 URL: http://samwel.tk/laptop_mode/ Source0: http://samwel.tk/laptop_mode/tools/downloads/laptop-mode-tools_%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: acpid BuildArch: noarch %description Laptop Mode Tools is a laptop power saving package for Linux systems. It allows you to extend the battery life of your laptop, in several ways. It is the primary way to enable the Laptop Mode feature of the Linux kernel, which lets your hard drive spin down. In addition, it allows you to tweak a number of other power-related settings using a simple configuration file. About Laptop Mode http://samwel.tk/laptop_mode/laptop_mode Laptop Mode / Laptop Mode Tools FAQ http://samwel.tk/laptop_mode/faq %prep %setup -q -n %{name}_%{version} %build # no build required %install rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}/%{_sysconfdir}/pm/sleep.d DESTDIR=%{buildroot} INIT_D=%{buildroot}%{_initrddir} MAN_D=%{_mandir} INSTALL=install ./install.sh %clean rm -rf $RPM_BUILD_ROOT %preun if [ $1 -eq 0 ]; then /sbin/service laptop-mode stop &>/dev/null || : /sbin/chkconfig --del laptop-mode fi %post /sbin/chkconfig --add laptop-mode #/sbin/service laptop-mode start &>/dev/null || : #/sbin/service acpid restart &>/dev/null || : %postun /sbin/service laptop-mode condrestart &>/dev/null || : %files %defattr(-,root,root,-) %doc COPYING README Documentation/* %dir %{_sysconfdir}/laptop-mode %dir %{_sysconfdir}/laptop-mode/conf.d %dir %{_datadir}/laptop-mode-tools %dir %{_datadir}/laptop-mode-tools/module-helpers %dir %{_datadir}/laptop-mode-tools/modules %{_sysconfdir}/acpi/actions/* %{_sysconfdir}/apm/event.d/laptop-mode %{_sysconfdir}/power/scripts.d/laptop-mode %{_sysconfdir}/rc.d/init.d/laptop-mode %{_sysconfdir}/pm/sleep.d/99laptop-mode %config(noreplace) %{_sysconfdir}/acpi/events/* %config(noreplace) %{_sysconfdir}/laptop-mode/conf.d/* %config(noreplace) %{_sysconfdir}/laptop-mode/laptop-mode.conf %config(noreplace) %{_sysconfdir}/laptop-mode/lm-profiler.conf %config(noreplace) %{_sysconfdir}/power/event.d/laptop-mode %{_sbindir}/laptop_mode %{_sbindir}/lm-profiler %{_sbindir}/lm-syslog-setup %{_datadir}/laptop-mode-tools/module-helpers/lm-polling-daemon %{_datadir}/laptop-mode-tools/modules/* %attr(0644,root,root) %{_mandir}/man8/*.8* %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} %{packager} %{version}-%{release} - Rebuild %{name} %{version}-%{release}