File laptop-mode-tools.spec of Package laptop-mode-tools
#
# spec file for package laptop-mode-tools (Version 1.41)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: laptop-mode-tools
Version: 1.41
Release: 51
License: GPL v2 or later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Base
Summary: The Laptop Mode Tools
Url: http://www.samwel.tk/laptop_mode/
PreReq: %insserv_prereq %fillup_prereq
Source: %{name}_%{version}.tar.gz
Source1: laptop-mode-tools.pm-utils-hook
Source2: README.SUSE
Patch1: install_sh.diff
Patch2: laptop_mode.diff
Patch3: laptop-mode_conf.diff
Patch4: latpop-mode-initscript.diff
Patch5: laptop-mode-udevadm.diff
BuildArch: noarch
BuildRequires: pm-utils
%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.
Authors:
--------
Bart Samwel <bart at samwel.tk>
%prep
%setup -n %{name}_%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
cp %{S:2} .
%build
%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
DESTDIR=$RPM_BUILD_ROOT MAN_D=/usr/share/man/man8 INSTALL=install INIT_D=/etc/init.d ./install.sh
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT/usr/lib/pm-utils/power.d/laptop-mode-tools
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
%{fillup_and_insserv -Y -f}
%preun
%stop_on_removal
%postun
%restart_on_update
%insserv_cleanup
%files
%defattr(-,root,root)
%dir /etc/laptop-mode
%config /etc/laptop-mode/*
/etc/init.d/laptop-mode
/usr/sbin/*
%dir /usr/share/laptop-mode-tools/
%dir /usr/share/laptop-mode-tools/modules/
/usr/share/laptop-mode-tools/modules/*
/usr/lib/pm-utils/power.d/laptop-mode-tools
%doc /usr/share/man/man8/*
%doc README.SUSE
%changelog
* Thu Sep 25 2008 ro@suse.de
- use udevadm info instead of udevinfo
* Tue Sep 16 2008 hmacht@suse.de
- fate#304737
start laptop-mode-tools by default
remount devices with relatime when on battery
set hard dist power management to 128 when on battery
* Tue Aug 19 2008 seife@suse.de
- Add "Default-Start:" and "Default-Stop:" to initscript
* Thu May 08 2008 seife@suse.de
- build fix
- add README.SUSE
- enhance the init script
- pm-utils integration
* Wed May 07 2008 seife@suse.de
- initial submission, version 1.41