diff --git a/powertop.changes b/powertop.changes index c9a7cae..f864b68 100644 --- a/powertop.changes +++ b/powertop.changes @@ -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 diff --git a/powertop.spec b/powertop.spec index 5937a85..cb47f77 100644 --- a/powertop.spec +++ b/powertop.spec @@ -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