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
|
|
|
#
|
2015-04-11 19:21:51 +02:00
|
|
|
# Copyright (c) 2015 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
|
2015-04-13 11:01:05 +02:00
|
|
|
Version: 2.7
|
|
|
|
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
|
2011-12-06 18:52:56 +01:00
|
|
|
License: GPL-2.0+
|
2007-05-16 04:41:40 +02:00
|
|
|
Group: System/Monitoring
|
2015-04-13 11:01:05 +02:00
|
|
|
Url: https://01.org/powertop/
|
|
|
|
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-%{version}.tar.gz
|
2015-04-11 19:21:51 +02:00
|
|
|
Source1: powertop.service
|
2012-02-06 15:55:14 +01:00
|
|
|
Patch2: powertop-1.98-always-create-params.patch
|
2015-02-09 07:09:33 +01:00
|
|
|
Patch3: powertop-fix-crash-with-autotune.patch
|
2012-02-06 15:55:14 +01:00
|
|
|
Patch5: powertop-no-date.patch
|
|
|
|
BuildRequires: gcc-c++
|
2012-05-14 11:40:37 +02:00
|
|
|
BuildRequires: gettext
|
2007-05-26 10:57:42 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2012-02-06 15:55:14 +01:00
|
|
|
BuildRequires: pkg-config
|
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-04-27 18:31:45 +02:00
|
|
|
Requires: xterm-bin
|
2015-02-09 07:09:33 +01:00
|
|
|
Recommends: %{name}-lang
|
2007-05-16 04:41:40 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
2012-02-06 15:55:14 +01:00
|
|
|
%setup -q
|
|
|
|
%patch2 -p1
|
2015-02-09 07:09:33 +01:00
|
|
|
%patch3 -p1
|
2012-02-06 15:55:14 +01:00
|
|
|
%patch5 -p1
|
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
|
2014-03-21 15:40:59 +01:00
|
|
|
%configure CFLAGS=-D_GNU_SOURCE
|
2012-05-14 11:40:37 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%install
|
2015-04-13 11:01:05 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
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}
|
2015-04-11 19:21:51 +02:00
|
|
|
install -d %{buildroot}%{_unitdir}
|
|
|
|
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
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
|
2007-05-16 04:41:40 +02:00
|
|
|
%defattr(-,root,root)
|
2012-02-06 15:55:14 +01:00
|
|
|
%doc COPYING README
|
|
|
|
%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}
|
2012-08-22 08:39:56 +02:00
|
|
|
%{_mandir}/man8/powertop.8.gz
|
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
|
2015-04-13 11:01:05 +02:00
|
|
|
%defattr(-,root,root)
|
2015-02-09 07:09:33 +01:00
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
%changelog
|