Accepting request 295463 from home:pluskalm:branches:Base:System
- Add systemd dependencies - Add pre/post macros for service - Add rcservice symlink - Remove double depenency on pkg-config - Cleanup spec file with spec-cleaner OBS-URL: https://build.opensuse.org/request/show/295463 OBS-URL: https://build.opensuse.org/package/show/Base:System/powertop?expand=0&rev=33
This commit is contained in:
parent
3d5828551c
commit
02bc4a34aa
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 12 08:50:44 UTC 2015 - mpluskal@suse.com
|
||||||
|
|
||||||
|
- Add systemd dependencies
|
||||||
|
- Add pre/post macros for service
|
||||||
|
- Add rcservice symlink
|
||||||
|
- Remove double depenency on pkg-config
|
||||||
|
- Cleanup spec file with spec-cleaner
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 11 04:56:30 UTC 2015 - hillwood@linuxfans.org
|
Sat Apr 11 04:56:30 UTC 2015 - hillwood@linuxfans.org
|
||||||
|
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: powertop
|
Name: powertop
|
||||||
Url: https://01.org/powertop/
|
Version: 2.7
|
||||||
|
Release: 0
|
||||||
#Git-Clone: git://github.com/fenrus75/powertop
|
#Git-Clone: git://github.com/fenrus75/powertop
|
||||||
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
Summary: A Linux Tool to Find out What is Using Power on a Laptop
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
Version: 2.7
|
Url: https://01.org/powertop/
|
||||||
Release: 0
|
Source0: https://01.org/sites/default/files/downloads/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source0: https://01.org/sites/default/files/downloads/%name/%name-%version.tar.gz
|
|
||||||
Source1: powertop.service
|
Source1: powertop.service
|
||||||
Patch2: powertop-1.98-always-create-params.patch
|
Patch2: powertop-1.98-always-create-params.patch
|
||||||
Patch3: powertop-fix-crash-with-autotune.patch
|
Patch3: powertop-fix-crash-with-autotune.patch
|
||||||
@ -33,7 +33,7 @@ BuildRequires: gcc-c++
|
|||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: pkgconfig(libnl-3.0)
|
BuildRequires: pkgconfig(libnl-3.0)
|
||||||
BuildRequires: pkgconfig(libnl-genl-3.0)
|
BuildRequires: pkgconfig(libnl-genl-3.0)
|
||||||
BuildRequires: pkgconfig(libpci)
|
BuildRequires: pkgconfig(libpci)
|
||||||
@ -41,6 +41,7 @@ BuildRequires: pkgconfig(zlib)
|
|||||||
Requires: xterm
|
Requires: xterm
|
||||||
Recommends: %{name}-lang
|
Recommends: %{name}-lang
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
PowerTOP is a program that collects the various pieces of information
|
PowerTOP is a program that collects the various pieces of information
|
||||||
@ -63,28 +64,41 @@ find . -name '*.o' -delete
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR="%buildroot"
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
|
install -Dd %{buildroot}%{_localstatedir}/cache/powertop
|
||||||
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop}
|
||||||
install -d %{buildroot}%{_unitdir}
|
install -d %{buildroot}%{_unitdir}
|
||||||
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||||
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre %{name}.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
%service_add_post %{name}.service
|
||||||
# Hack for powertop not to show warnings on first start
|
# Hack for powertop not to show warnings on first start
|
||||||
touch %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
touch %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
||||||
touch %{_localstatedir}/cache/powertop/saved_results.powertop
|
touch %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %{name}.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun %{name}.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc COPYING README
|
%doc COPYING README
|
||||||
%dir %{_localstatedir}/cache/powertop
|
%dir %{_localstatedir}/cache/powertop
|
||||||
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
||||||
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||||
%_sbindir/%name
|
%{_sbindir}/%{name}
|
||||||
%{_mandir}/man8/powertop.8.gz
|
%{_mandir}/man8/powertop.8.gz
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
|
%{_sbindir}/rc%{name}
|
||||||
|
|
||||||
%files lang -f %{name}.lang
|
%files lang -f %{name}.lang
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user