SHA256
1
0
forked from pool/powertop
powertop/powertop.spec
2012-02-06 14:55:14 +00:00

84 lines
2.5 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: http://www.lesswatts.org
Summary: A Linux Tool to Find out What is Using Power on a Laptop
Version: 1.98
Release: 1
License: GPL-2.0+
Group: System/Monitoring
Source0: %{name}-%{version}.tar.bz2
Patch1: powertop_set_cflags_override.patch
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++
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: libnl-1_1-devel
BuildRequires: zlib-devel
BuildRequires: pciutils-devel
BuildRequires: gettext
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
%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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
%install
mkdir -p %{buildroot}/%{_bindir}
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}
%clean
rm -rf %{_buildroot}
#%files -f %{name}.lang
%files
%defattr(-,root,root)
%doc COPYING README
%dir %{_localstatedir}/cache/powertop
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
%{_bindir}/%{name}
%changelog