- Require xterm-bin on openSUSE and xterm on other systems.

xterm was splitted on openSUSE to have fewer dependencies.

OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=42
This commit is contained in:
Michael Vetter 2016-02-24 14:02:34 +00:00 committed by Git OBS Bridge
parent d680628c92
commit 11ef918ebb
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 24 14:01:33 UTC 2016 - mvetter@suse.com
- Require xterm-bin on openSUSE and xterm on other systems.
xterm was splitted on openSUSE to have fewer dependencies.
-------------------------------------------------------------------
Mon Feb 8 14:44:26 UTC 2016 - mvetter@suse.com

View File

@ -26,7 +26,7 @@ Group: System/Monitoring
Url: https://01.org/powertop/
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-%{version}.tar.gz
Source1: powertop.service
Patch5: powertop-no-date.patch
Patch0: powertop-no-date.patch
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: ncurses-devel
@ -36,10 +36,15 @@ BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(libpci)
BuildRequires: pkgconfig(zlib)
Requires: xterm-bin
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
#xterm has been splitted in openSUSE to have fewer dependencies
%if 0%{?is_opensuse}
Requires: xterm-bin
%else
Requires: xterm
%endif
%description
PowerTOP is a program that collects the various pieces of information
@ -50,7 +55,7 @@ doing in terms of power savings.
%prep
%setup -q
%patch5 -p1
%patch0 -p1
# Delete objects files left in tarball
find . -name '*.o' -delete
@ -61,7 +66,7 @@ export CFLAGS="%{optflags} -D_GNU_SOURCE"
make %{?_smp_mflags} V=1
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/powertop.service