forked from pool/powertop
Dirk Mueller
ccc6279728
update to 'silent' 2.2 release, changelog constructed from gitlog and todo file, also uses two patches found on fedora build servers - this time patches documented in .changes OBS-URL: https://build.opensuse.org/request/show/146912 OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=16
83 lines
2.7 KiB
RPMSpec
83 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package powertop
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products 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/
|
|
#
|
|
|
|
|
|
Name: powertop
|
|
Url: https://01.org/powertop/
|
|
#Git-Clone: git://github.com/fenrus75/powertop
|
|
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
|
License: GPL-2.0+
|
|
Group: System/Monitoring
|
|
Version: 2.2
|
|
Release: 0
|
|
Source: https://01.org/powertop/sites/default/files/downloads/%name-%version.tar.gz
|
|
Patch2: powertop-1.98-always-create-params.patch
|
|
Patch5: powertop-no-date.patch
|
|
# Following patches were found by the mindful fedora maintainer
|
|
Patch6: powertop-2.2-version-fix.patch
|
|
Patch7: powertop-2.2-fix-crash-on-readonly-fs.patch
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gettext
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: pkg-config
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: pkgconfig(libnl-3.0)
|
|
BuildRequires: pkgconfig(libnl-genl-3.0)
|
|
BuildRequires: pkgconfig(libpci)
|
|
BuildRequires: pkgconfig(zlib)
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%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.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch2 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
|
|
# Delete objects files left in tarball
|
|
find . -name '*.o' -delete
|
|
|
|
%build
|
|
%configure
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR="%buildroot"
|
|
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
|
|
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
|
%find_lang %{name}
|
|
|
|
%post
|
|
# Hack for powertop not to show warnings on first start
|
|
touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
|
|
|
%files -f %name.lang
|
|
%defattr(-,root,root)
|
|
%doc COPYING README
|
|
%dir %{_localstatedir}/cache/powertop
|
|
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
|
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
|
%_sbindir/%name
|
|
%{_mandir}/man8/powertop.8.gz
|
|
|
|
%changelog
|