.gear/powertop.init | 35 ++++++++++ .gear/powertop.service | 9 +++ .gear/powertop.spec | 170 +++++++++++++++++++++++++++++++++++++++++++++++++ .gear/powertop.watch | 2 + .gear/rules | 6 ++ .gear/tags/list | 1 + 6 files changed, 223 insertions(+) diff --git a/.gear/powertop.init b/.gear/powertop.init new file mode 100755 index 0000000..0876561 --- /dev/null +++ b/.gear/powertop.init @@ -0,0 +1,35 @@ +#!/bin/sh +# +# powertop PowerTOP autotuner +# +# chkconfig: 345 90 10 +# description: PowerTOP autotuner + +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + +# Source function library. +. /etc/init.d/functions + +RETVAL=0 + +start() +{ + start_daemon --background -- powertop --auto-tune + RETVAL=$? + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop|reload|restart|condstop|condrestart|condreload|status) + ;; + *) + msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/.gear/powertop.service b/.gear/powertop.service new file mode 100644 index 0000000..96669ae --- /dev/null +++ b/.gear/powertop.service @@ -0,0 +1,9 @@ +[Unit] +Description=PowerTOP autotuner + +[Service] +Type=oneshot +ExecStart=/usr/sbin/powertop --auto-tune + +[Install] +WantedBy=multi-user.target diff --git a/.gear/powertop.spec b/.gear/powertop.spec new file mode 100644 index 0000000..335bc20 --- /dev/null +++ b/.gear/powertop.spec @@ -0,0 +1,170 @@ +Name: powertop +Version: 2.15 +Release: alt1 +Epoch: 1 + +Summary: Tool that helps you find what software is using the most power +License: GPLv2 +Group: System/Kernel and hardware + +Url: https://01.org/powertop/ +Source0: %name-%version.tar +Source1: %name.service +Source2: %name.init +Source100: %name.watch +Patch0: %name-%version-%release.patch + +BuildRequires: gcc-c++ libncursesw-devel libnl-devel libpci-devel zlib-devel +BuildRequires: autoconf-archive + +%define cachedir %_cachedir/%name + +%description +PowerTOP is a Linux tool that finds the software component(s) that make +your laptop use more power than necessary while it is idle. + +PowerTOP works best on a laptop computer, or at least a computer with an +Intel mobile processor (certain small non-laptop devices also contain a +mobile processor). When using PowerTOP on a laptop, do so when running +on battery. + +Please note that it also runs just fine with e.g. AMD CPUs. :) + +%prep +%setup +%patch0 -p1 + +%build +./autogen.sh +%configure +%make_build + +%install +%makeinstall_std +%find_lang %name +install -d %buildroot%cachedir +touch %buildroot%cachedir/saved_{parameters,results}.powertop +install -pDm644 %SOURCE1 %buildroot%_unitdir/%name.service +install -pDm755 %SOURCE2 %buildroot%_initdir/%name + +%post +%post_service %name +# Hack for powertop not to show warnings on first start +touch %cachedir/saved_{parameters,results}.powertop + +%preun +%preun_service %name + +%files -f %name.lang +%_sbindir/* +%_datadir/bash-completion +%_man8dir/* +%doc README.md +%dir %cachedir +%ghost %cachedir/saved_*.powertop +%_unitdir/%name.service +%_initdir/%name + +%changelog +* Sat Nov 12 2022 Anton Farygin 1:2.15-alt1 +- 2.15 + +* Tue Apr 20 2021 Anton Farygin 1:2.14-alt1 +- 2.14 + +* Fri Jun 26 2020 Anton Farygin 1:2.13-alt1 +- 2.13 + +* Fri Apr 24 2020 Anton Farygin 1:2.12-alt1 +- 2.12 + +* Mon Oct 07 2019 Anton Farygin 1:2.11-alt1 +- 2.11 + +* Sat Jan 19 2019 Anton Farygin 1:2.10-alt1 +- 2.10 + +* Sun Jun 18 2017 Anton Farygin 1:2.9-alt1 +- new version (closes: #32459) + +* Tue Nov 10 2015 Michael Shigorin 1:2.8-alt1 +- new version (watch file uupdate) + +* Sun May 31 2015 Michael Shigorin 1:2.7-alt2 +- add the initscript + +* Sun Mar 22 2015 Michael Shigorin 1:2.7-alt1 +- new version (watch file uupdate) + +* Mon Mar 09 2015 Michael Shigorin 1:2.6.1-alt3 +- added proper sysv initscript + +* Mon Jan 26 2015 Michael Shigorin 1:2.6.1-alt2 +- rolled back to version that actually works + +* Mon Jan 26 2015 Michael Shigorin 2.7-alt2 +- applied Fedora patches to fix --auto-tune overflow + +* Wed Nov 26 2014 Michael Shigorin 2.7-alt1 +- new version (watch file uupdate) + +* Mon May 26 2014 Michael Shigorin 2.6.1-alt1 +- new version (watch file uupdate) + +* Sat Nov 23 2013 Michael Shigorin 2.5-alt1 +- new version (watch file uupdate) + +* Mon Jul 22 2013 Michael Shigorin 2.4-alt1 +- new version (watch file uupdate) + +* Mon Apr 08 2013 Michael Shigorin 2.3-alt1 +- new version (watch file uupdate) + +* Mon Apr 08 2013 Michael Shigorin 2.1-alt2 +- added watch file (thanks debian with its #695891) + +* Mon Sep 03 2012 Michael Shigorin 2.1-alt1 +- 2.1 + +* Wed May 16 2012 Michael Shigorin 2.0-alt2 +- re-added %_cachedir/%name created by hand +- NB: Url: has changed + +* Tue May 15 2012 Michael Shigorin 2.0-alt1 +- 2.0 + + autoconf based build + + binary moved from %_bindir to %_sbindir +- added a tiny explanatory note to package description :) + +* Sat Aug 20 2011 Victor Forsiuk 1.98-alt1 +- 1.98 + +* Wed Aug 04 2010 Victor Forsiuk 1.13-alt1 +- 1.13 + +* Fri Jan 15 2010 Victor Forsyuk 1.11-alt2 +- Increase config lines buffer size. Closes ALT #22750. + +* Thu Jun 18 2009 Victor Forsyuk 1.11-alt1 +- 1.11 + +* Tue Jun 17 2008 Victor Forsyuk 1.10-alt1 +- 1.10 + +* Thu Dec 27 2007 Victor Forsyuk 1.9-alt1 +- 1.9 + +* Thu Aug 30 2007 Victor Forsyuk 1.8-alt1 +- 1.8 + +* Mon Jul 09 2007 Victor Forsyuk 1.7-alt1 +- 1.7 + +* Tue May 29 2007 Victor Forsyuk 1.5-alt1 +- 1.5 + +* Wed May 16 2007 Victor Forsyuk 1.2-alt1 +- 1.2 + +* Mon May 14 2007 Victor Forsyuk 1.1-alt1 +- Initial build. diff --git a/.gear/powertop.watch b/.gear/powertop.watch new file mode 100644 index 0000000..788dc39 --- /dev/null +++ b/.gear/powertop.watch @@ -0,0 +1,2 @@ +version=3 +https://01.org/powertop/downloads https://01.org/sites/default/files/downloads/powertop/powertop-v([\d\.]*).tar.gz diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..79ccc61 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,6 @@ +copy: .gear/*.init +copy: .gear/*.service +copy: .gear/*.watch +tar: v@version@:. +diff: v@version@:. . +spec: .gear/powertop.spec diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..418896d --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +d51ad395436d4d1dcc3ca46e1519ffeb475bf651 v2.15