Name: laptop-mode-tools Version: 1.67 Release: 2mamba Summary: A laptop power saving package for Linux systems Group: System/Kernel and Hardware Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.samwel.tk/laptop_mode/ Source: http://samwel.tk/laptop_mode/tools/downloads/laptop-mode-tools_%{version}.tar.gz Patch0: %{name}-1.57-initscript_chkconfig.patch Patch1: %{name}-1.59-no_usb_autosuspend_for_input_devices.patch Patch2: laptop-mode-tools-1.62-udevadm-systemd-path.patch Patch3: laptop-mode-tools-1.67-no-usbhid-autosuspend.patch License: GPL BuildArch: noarch ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END BuildRequires: ethtool BuildRequires: hdparm Provides: cpufreqd Obsoletes: cpufreqd Requires: hdparm Requires: ethtool BuildRoot: %{_tmppath}/%{name}-%{version}-root %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. %prep %setup -q -n %{name}_%{version} %patch0 -p1 #%patch1 -p1 #%patch2 -p1 %patch3 -p1 # clean up .orig files created by patch with would be installed find . -name *.orig -exec rm -f {} \; %build %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d %{buildroot}%{_sysconfdir}/pm/sleep.d DESTDIR=%{buildroot} \ INIT_D="%{buildroot}%{_initrddir}" \ MAN_D=%{_mandir} \ INSTALL=install \ ./install.sh # remove module for obsoleted HAL rm -f %{buildroot}%{_sysconfdir}/laptop-mode/conf.d/hal-polling.conf rm -f %{buildroot}%{_datadir}/laptop-mode/modules/hal-polling rm -f %{buildroot}%{_initrddir}/laptop-mode %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %preun if [ $1 -eq 0 ]; then systemctl stop aptop-mode systemctl disable laptop-mode fi : %post if [ $1 -ge 1 ]; then systemctl daemon-reload systemctl enable laptop-mode systemctl restart laptop-mode systemctl restart acpid fi : %posttrans # clean old sysv broken links find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \; : %files %defattr(-,root,root) %{_sysconfdir}/acpi/actions/lm_*.sh %{_sysconfdir}/acpi/events/lm_* %{_sysconfdir}/apm/event.d/laptop-mode %dir %{_sysconfdir}/pm/sleep.d %{_sysconfdir}/power/event.d/laptop-mode %{_sysconfdir}/power/scripts.d/laptop-mode %dir %{_sysconfdir}/laptop-mode %dir %{_sysconfdir}/laptop-mode/conf.d %{_sysconfdir}/laptop-mode/conf.d/*.conf #%dir %{_sysconfdir}/laptop-mode/conf.d/board-specific %config(noreplace) %{_sysconfdir}/laptop-mode/laptop-mode.conf %config(noreplace) %{_sysconfdir}/laptop-mode/lm-profiler.conf /lib/udev/rules.d/99-laptop-mode.rules %{_sbindir}/laptop_mode %{_sbindir}/lm-profiler %{_sbindir}/lm-syslog-setup /lib/udev/lmt-udev %{_unitdir}/laptop-mode.service %{_prefix}/lib/pm-utils/sleep.d/01laptop-mode %{_prefix}/lib/tmpfiles.d/laptop-mode.conf %dir %{_datadir}/laptop-mode-tools %dir %{_datadir}/laptop-mode-tools/modules %{_datadir}/laptop-mode-tools/modules/* %dir %{_datadir}/laptop-mode-tools/module-helpers %{_datadir}/laptop-mode-tools/module-helpers/lm-polling-daemon %{_datadir}/laptop-mode-tools/module-helpers/pm-* %{_mandir}/man8/laptop-mode.conf.8* %{_mandir}/man8/laptop_mode.8* %{_mandir}/man8/lm-profiler.8* %{_mandir}/man8/lm-profiler.conf.8* %{_mandir}/man8/lm-syslog-setup.8* %doc COPYING %changelog * Sat Oct 31 2015 Silvan Calarco 1.67-2mamba - fix previous patch to disable only usbhid autosuspend in runtime-pm * Fri Oct 30 2015 Silvan Calarco 1.67-1mamba - update to 1.67 - added patch to disable usbhid autosuspend for mice * Mon Dec 29 2014 Silvan Calarco 1.66-2mamba - remove obsoleted sysv initscript * Mon Dec 29 2014 Silvan Calarco 1.66-1mamba - update to 1.66 * Sat Sep 14 2013 Automatic Build System 1.64-1mamba - automatic version update by autodist * Tue Jul 02 2013 Silvan Calarco 1.63-2mamba - update scripts to use systemd to manage service * Mon Apr 22 2013 Automatic Build System 1.63-1mamba - automatic version update by autodist * Tue Dec 11 2012 Silvan Calarco 1.62-3mamba - disable runtime-pm automatic module execution (causes e1000e ethernet not to work on a Vaio VGN-Z) - remove module for obsoleted HAL * Tue Dec 11 2012 Silvan Calarco 1.62-2mamba - fix udevadm path after throttling again from /bin to /usr/bin in systemd-udev version - really remove hdparm.orig installation due to patch applied * Sat Nov 24 2012 Silvan Calarco 1.62-1mamba - update to 1.62 * Wed Sep 26 2012 Silvan Calarco 1.61-3mamba - install directory %{_sysconfdir}/laptop-mode/conf.d/board-specific to remove a warning * Sun Sep 02 2012 Silvan Calarco 1.61-2mamba - remove hdparm.orig file created by patch and causing an error - require ethtool * Thu Aug 09 2012 Automatic Build System 1.61-1mamba - automatic version update by autodist * Sat Feb 11 2012 Silvan Calarco 1.60-1mamba - update to 1.60 - added patch for udev >= 179 * Wed Aug 17 2011 Stefano Cotta Ramusino 1.59-1mamba - update to 1.59 - added patch to avoid usb autosuspend for user input devices * Mon May 09 2011 Silvan Calarco 1.57-2mamba - set init script stop order to 93 before mountfs or it hangs shutdown in monothreaded mode * Thu Apr 07 2011 Silvan Calarco 1.57-1mamba - package created by autospec