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
|
|
|
#
|
2012-02-06 15:55:14 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-06-25 22:10:48 +02:00
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
Name: powertop
|
2012-02-06 15:55:14 +01:00
|
|
|
Url: http://www.lesswatts.org
|
2010-09-24 01:00:24 +02:00
|
|
|
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
2012-02-06 15:55:14 +01:00
|
|
|
Version: 1.98
|
2010-09-24 01:00:24 +02:00
|
|
|
Release: 1
|
2011-12-06 18:52:56 +01:00
|
|
|
License: GPL-2.0+
|
2007-05-16 04:41:40 +02:00
|
|
|
Group: System/Monitoring
|
2010-09-24 01:00:24 +02:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
Patch1: powertop_set_cflags_override.patch
|
2012-02-06 15:55:14 +01:00
|
|
|
Patch2: powertop-1.98-always-create-params.patch
|
|
|
|
Patch3: powertop-1.98-unknown-readings-fix.patch
|
|
|
|
Patch4: powertop-1.98-compile-fix.patch
|
|
|
|
Patch5: powertop-no-date.patch
|
|
|
|
BuildRequires: gcc-c++
|
2007-05-26 10:57:42 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2012-02-06 15:55:14 +01:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: libnl-1_1-devel
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
BuildRequires: pciutils-devel
|
|
|
|
BuildRequires: gettext
|
2007-05-16 04:41:40 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-10-11 01:33:48 +02:00
|
|
|
AutoReqProv: on
|
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.
|
|
|
|
|
|
|
|
%prep
|
2012-02-06 15:55:14 +01:00
|
|
|
%setup -q
|
2010-05-14 00:47:35 +02:00
|
|
|
%patch1 -p1
|
2012-02-06 15:55:14 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%build
|
2012-02-06 15:55:14 +01:00
|
|
|
make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%install
|
2007-05-17 11:52:51 +02:00
|
|
|
mkdir -p %{buildroot}/%{_bindir}
|
|
|
|
make install DESTDIR=%{buildroot}
|
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}
|
|
|
|
#%find_lang %{name}
|
|
|
|
|
|
|
|
%post
|
|
|
|
# Hack for powertop not to show warnings on first start
|
|
|
|
touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
2007-05-16 04:41:40 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{_buildroot}
|
|
|
|
|
2012-02-06 15:55:14 +01:00
|
|
|
#%files -f %{name}.lang
|
|
|
|
|
|
|
|
%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
|
2007-05-17 11:52:51 +02:00
|
|
|
%{_bindir}/%{name}
|
2008-06-25 22:10:48 +02:00
|
|
|
|
2007-05-16 04:41:40 +02:00
|
|
|
%changelog
|