2019-09-30 11:14:08 -04:00
|
|
|
Name: powertop
|
2021-01-21 18:10:52 +08:00
|
|
|
Version: 2.13
|
|
|
|
|
Release: 1
|
2019-09-30 11:14:08 -04:00
|
|
|
Summary: Power consumption tool for Linux
|
|
|
|
|
License: GPLv2
|
|
|
|
|
URL: http://01.org/powertop/
|
2021-01-21 18:10:52 +08:00
|
|
|
Source0: https://01.org/sites/default/files/downloads//%{name}-%{version}.tar.gz
|
2019-09-30 11:14:08 -04:00
|
|
|
Source1: powertop.service
|
|
|
|
|
|
2021-01-21 18:10:52 +08:00
|
|
|
Patch1: backport-powertop-2.7-always-create-params.patch
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
BuildRequires: gcc gcc-c++ git systemd
|
|
|
|
|
BuildRequires: gettext-devel ncurses-devel pciutils-devel zlib-devel libnl3-devel
|
|
|
|
|
Requires(post): coreutils
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
Provides: bundled(kernel-event-lib)
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Powertop is a Linux tool to diagnose issues with power consumption and
|
|
|
|
|
power management.In addition to being a diagnostic tool, powertop also
|
|
|
|
|
has an interactive mode where the user can experiment various power
|
|
|
|
|
management settings for cases where the Linux distribution has not enabled these settings.
|
|
|
|
|
|
|
|
|
|
%package_help
|
|
|
|
|
|
|
|
|
|
%prep
|
2021-01-21 18:10:52 +08:00
|
|
|
%autosetup -n %{name}-%{version} -p1 -Sgit
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%configure
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
install -Dd $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}
|
|
|
|
|
touch $RPM_BUILD_ROOT%{_localstatedir}/cache/%{name}/{saved_parameters.powertop,saved_results.powertop}
|
|
|
|
|
%find_lang %{name}
|
|
|
|
|
|
|
|
|
|
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/powertop.service
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
%preun
|
2020-09-19 11:44:13 +08:00
|
|
|
%systemd_preun powertop.service
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
%postun
|
2020-09-19 11:44:13 +08:00
|
|
|
%systemd_postun_with_restart powertop.service
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
%post
|
2020-09-19 11:44:13 +08:00
|
|
|
%systemd_post powertop.service
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.powertop} &> /dev/null || :
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README TODO
|
|
|
|
|
%{_sbindir}/powertop
|
|
|
|
|
%{_unitdir}/powertop.service
|
|
|
|
|
%dir %{_localstatedir}/cache/powertop
|
|
|
|
|
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
|
|
|
|
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
2021-01-21 18:10:52 +08:00
|
|
|
%{_datadir}/bash-completion/completions/powertop
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%{_mandir}/man8/powertop.8*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-01-21 18:10:52 +08:00
|
|
|
* Thu Jan 21 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.13-1
|
|
|
|
|
- Type:requirement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:update to 2.13
|
|
|
|
|
|
2020-09-19 11:44:13 +08:00
|
|
|
* Sat Sep 19 2020 liquor <lirui130@huawei.com> - 2.9-12
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:modify the service file path to load the service correctly
|
|
|
|
|
|
2019-09-30 11:14:08 -04:00
|
|
|
* Fri Sep 27 2019 chengquan<chengquan3@huawei.com> - 2.9-11
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:fix spec rule in openeuler
|
|
|
|
|
|
|
|
|
|
* Fri Sep 06 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9-10
|
|
|
|
|
- Package init
|