Accepting request 295362 from home:hillwood:branches:Base:System

- Add a systemd script.

OBS-URL: https://build.opensuse.org/request/show/295362
OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=32
This commit is contained in:
Fridrich Strba 2015-04-11 17:21:51 +00:00 committed by Git OBS Bridge
parent 6e85bcfe9d
commit 3d5828551c
3 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Apr 11 04:56:30 UTC 2015 - hillwood@linuxfans.org
- Add a systemd script.
-------------------------------------------------------------------
Sun Feb 8 22:02:17 UTC 2015 - p.drouand@gmail.com

11
powertop.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Extend the battery life of laptop
[Service]
Type=oneshot
Environment="TERM=xterm"
ExecStart=/usr/sbin/powertop --auto-tune
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
#
# spec file for package powertop
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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
@ -24,7 +24,8 @@ License: GPL-2.0+
Group: System/Monitoring
Version: 2.7
Release: 0
Source: https://01.org/sites/default/files/downloads/%name/%name-%version.tar.gz
Source0: https://01.org/sites/default/files/downloads/%name/%name-%version.tar.gz
Source1: powertop.service
Patch2: powertop-1.98-always-create-params.patch
Patch3: powertop-fix-crash-with-autotune.patch
Patch5: powertop-no-date.patch
@ -37,6 +38,7 @@ BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(libpci)
BuildRequires: pkgconfig(zlib)
Requires: xterm
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -64,6 +66,8 @@ make %{?_smp_mflags}
make install DESTDIR="%buildroot"
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
install -d %{buildroot}%{_unitdir}
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
%find_lang %{name}
%post
@ -79,6 +83,7 @@ touch %{_localstatedir}/cache/powertop/saved_results.powertop
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
%_sbindir/%name
%{_mandir}/man8/powertop.8.gz
%{_unitdir}/%{name}.service
%files lang -f %{name}.lang