2007-05-16 04:41:40 +02:00
|
|
|
#
|
2012-02-06 15:55:14 +01:00
|
|
|
# spec file for package powertop
|
2007-05-16 04:41:40 +02:00
|
|
|
#
|
2019-01-09 12:09:55 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-05-16 04:41:40 +02:00
|
|
|
#
|
2009-03-04 00:58:57 +01:00
|
|
|
# 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.
|
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: powertop
|
2019-01-09 12:09:55 +01:00
|
|
|
Version: 2.10
|
2015-04-13 11:01:05 +02:00
|
|
|
Release: 0
|
2012-05-14 11:40:37 +02:00
|
|
|
#Git-Clone: git://github.com/fenrus75/powertop
|
2010-09-24 01:00:24 +02:00
|
|
|
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
2019-01-09 12:09:55 +01:00
|
|
|
License: GPL-2.0-only
|
2007-05-16 04:41:40 +02:00
|
|
|
Group: System/Monitoring
|
2019-01-09 12:09:55 +01:00
|
|
|
URL: https://01.org/powertop/
|
|
|
|
Source0: https://01.org/sites/default/files/downloads/%{name}-v%{version}.tar.gz
|
2015-04-11 19:21:51 +02:00
|
|
|
Source1: powertop.service
|
2012-02-06 15:55:14 +01:00
|
|
|
BuildRequires: gcc-c++
|
2012-05-14 11:40:37 +02:00
|
|
|
BuildRequires: gettext
|
2007-05-26 10:57:42 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2019-01-09 12:09:55 +01:00
|
|
|
BuildRequires: pkgconfig
|
2015-04-13 11:01:05 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2012-05-14 11:40:37 +02:00
|
|
|
BuildRequires: pkgconfig(libnl-3.0)
|
|
|
|
BuildRequires: pkgconfig(libnl-genl-3.0)
|
|
|
|
BuildRequires: pkgconfig(libpci)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2015-02-09 07:09:33 +01:00
|
|
|
Recommends: %{name}-lang
|
2015-04-13 11:01:05 +02:00
|
|
|
%{?systemd_requires}
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
PowerTOP is a program that collects the various pieces of information
|
|
|
|
from your system and presents an overview of how well your laptop is
|
|
|
|
doing in terms of power savings.
|
|
|
|
|
2015-02-09 07:09:33 +01:00
|
|
|
%lang_package
|
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
%prep
|
2019-01-09 12:09:55 +01:00
|
|
|
%setup -q -n powertop-v%{version}
|
2007-05-16 04:41:40 +02:00
|
|
|
|
2012-08-30 22:20:45 +02:00
|
|
|
# Delete objects files left in tarball
|
|
|
|
find . -name '*.o' -delete
|
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
%build
|
2016-02-04 13:57:10 +01:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
|
|
|
%configure
|
|
|
|
make %{?_smp_mflags} V=1
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%install
|
2019-01-09 12:09:55 +01:00
|
|
|
%make_install
|
2012-02-06 15:55:14 +01:00
|
|
|
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
|
|
|
|
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
2016-02-04 13:57:10 +01:00
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service
|
2015-04-13 11:01:05 +02:00
|
|
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
2012-05-14 11:40:37 +02:00
|
|
|
%find_lang %{name}
|
2012-02-06 15:55:14 +01:00
|
|
|
|
2015-04-13 11:01:05 +02:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
|
2012-02-06 15:55:14 +01:00
|
|
|
%post
|
2015-04-13 11:01:05 +02:00
|
|
|
%service_add_post %{name}.service
|
2012-02-06 15:55:14 +01:00
|
|
|
# Hack for powertop not to show warnings on first start
|
2014-11-10 07:02:54 +01:00
|
|
|
touch %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
|
|
|
touch %{_localstatedir}/cache/powertop/saved_results.powertop
|
2007-05-16 04:41:40 +02:00
|
|
|
|
2015-04-13 11:01:05 +02:00
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
2015-02-09 07:09:33 +01:00
|
|
|
%files
|
2019-01-09 12:09:55 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README
|
2012-02-06 15:55:14 +01:00
|
|
|
%dir %{_localstatedir}/cache/powertop
|
|
|
|
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
|
|
|
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
2015-04-13 11:01:05 +02:00
|
|
|
%{_sbindir}/%{name}
|
2019-01-09 12:09:55 +01:00
|
|
|
%{_mandir}/man8/powertop.8%{?ext_man}
|
2015-04-11 19:21:51 +02:00
|
|
|
%{_unitdir}/%{name}.service
|
2015-04-13 11:01:05 +02:00
|
|
|
%{_sbindir}/rc%{name}
|
2008-06-25 22:10:48 +02:00
|
|
|
|
2015-02-09 07:09:33 +01:00
|
|
|
%files lang -f %{name}.lang
|
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
%changelog
|