Package not found: openSUSE:Factory/kde-cli-tools5

File laptop-mode-tools.spec of Package laptop-mode-tools

#
# spec file for package laptop-mode-tools
#
# Copyright (c) 2015 SUSE LINUX 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/
#


%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
%{!?_udevdir:%global _udevdir  %{_libexecdir}/udev}

Name:           laptop-mode-tools
Version:        1.64
Release:        0
Summary:        The Laptop Mode Tools
License:        GPL-2.0+
Group:          System/Base
Url:            http://www.samwel.tk/laptop_mode/
Source:         http://samwel.tk/laptop_mode/tools/downloads/%{name}_%{version}.tar.gz
Source1:        laptop-mode-tools.pm-utils-hook
Source2:        README.SUSE
Patch1:         laptop-mode-1.53-install_sh.diff
Patch2:         laptop-mode-1.53_conf.diff
Patch4:         laptop-mode-1.49-new-dirty-ratio-defaults.diff
Patch5:         laptop-mode-1.53-fix-pm-utils-sleep-script.diff
Patch6:         laptop-mode-1.53-moblin-enable-intel-hda-powersave.patch
%if 0%{?suse_version} < 1315
BuildRequires:  pm-utils
%else
BuildRequires:  systemd
%endif
BuildRequires:  systemd-rpm-macros
BuildRequires:  udev
BuildArch:      noarch
%{?systemd_requires}

%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}
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
cp %{SOURCE2} .

%build

%install
DESTDIR=%{buildroot} MAN_D=%{_mandir} INSTALL=install INIT_D=%{_initddir} LIB_D=%{_libdir} UDEV_D=%{_udevdir} SYSTEMD_UNIT_D=%{_unitdir} ACPI=DISABLED PMU=disabled APM=disabled ./install.sh
install -D -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/pm-utils/power.d/laptop-mode-tools
chmod 644 %{buildroot}/%{_mandir}/man8/*
# Don't ship sysvinit script
rm -r %{buildroot}%{_sysconfdir}/init.d
# Hack to remove sysvinit script link in usr/sbin
ln -s service %{buildroot}/%{_sbindir}/rclaptop-mode

%pre
%service_add_pre laptop-mode.service

%post
%service_add_post laptop-mode.service
systemd-tmpfiles --create %{_tmpfilesdir}/laptop-mode.conf

%preun
%service_del_preun laptop-mode.service

%postun
%service_del_postun laptop-mode.service

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/laptop-mode
%config %{_sysconfdir}/laptop-mode/*
%{_sbindir}/*
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/modules/
%dir %{_datadir}/%{name}/module-helpers/
%{_datadir}/%{name}/modules/*
%{_datadir}/%{name}/module-helpers/lm-polling-daemon
%{_datadir}/%{name}/module-helpers/pm-helper
%{_datadir}/%{name}/module-helpers/pm-hibernate
%{_datadir}/%{name}/module-helpers/pm-suspend
%dir %{_libexecdir}/pm-utils
%dir %{_libexecdir}/pm-utils/power.d
%dir %{_libexecdir}/pm-utils/sleep.d
%{_libexecdir}/pm-utils/power.d/laptop-mode-tools
%{_sbindir}/rclaptop-mode
%{_udevdir}/lmt-udev
%{_udevrulesdir}/99-laptop-mode.rules
%{_libexecdir}/pm-utils/sleep.d/01laptop-mode
%{_mandir}/man8/*
%doc README.SUSE
%{_tmpfilesdir}/laptop-mode.conf
%{_unitdir}/laptop-mode.service

%changelog
openSUSE Build Service is sponsored by