2019-09-30 11:14:08 -04:00
|
|
|
Name: powertop
|
2023-05-06 17:32:59 +08:00
|
|
|
Version: 2.15
|
2025-01-07 01:24:22 +08:00
|
|
|
Release: 2
|
2019-09-30 11:14:08 -04:00
|
|
|
Summary: Power consumption tool for Linux
|
2025-01-07 01:24:22 +08:00
|
|
|
License: GPL-2.0-only AND LGPL-2.1-only AND ISC
|
|
|
|
|
URL: https://github.com/fenrus75/powertop
|
|
|
|
|
Source0: https://github.com/fenrus75/%{name}/archive/v%{version}/%{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
|
2025-01-07 01:24:22 +08:00
|
|
|
Patch2: powertop-2.15-gettext-0.19.patch
|
|
|
|
|
Patch6001: backport-powertop-2.15-fix-configure-to-support-ncurses-w-tinfo.patch
|
|
|
|
|
Patch6002: backport-powertop-2.15-fixed-riscv-t-head-1520-cpu-identification.patch
|
2019-09-30 11:14:08 -04:00
|
|
|
|
2023-05-06 17:32:59 +08:00
|
|
|
BuildRequires: autoconf autoconf-archive automake libtool
|
2021-07-30 23:17:27 +08:00
|
|
|
BuildRequires: gcc gcc-c++ systemd
|
2025-01-07 01:24:22 +08:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
|
BuildRequires: pkgconfig(bash-completion)
|
|
|
|
|
BuildRequires: pkgconfig(libnl-3.0) >= 3.0
|
|
|
|
|
BuildRequires: pkgconfig(libnl-genl-3.0) >= 3.0
|
|
|
|
|
BuildRequires: pkgconfig(libpci)
|
|
|
|
|
BuildRequires: pkgconfig(ncursesw)
|
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2019-09-30 11:14:08 -04:00
|
|
|
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-07-30 23:17:27 +08:00
|
|
|
%autosetup -n %{name}-%{version} -p1
|
2019-09-30 11:14:08 -04:00
|
|
|
|
|
|
|
|
%build
|
2022-02-21 17:08:43 +08:00
|
|
|
# workaroud for 'error: too many loops'
|
|
|
|
|
autoreconf -fi || autoreconf -fi
|
2019-09-30 11:14:08 -04:00
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
%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
|
2025-01-07 01:24:22 +08:00
|
|
|
%license COPYING
|
|
|
|
|
%doc README.md README.traceevent CONTRIBUTE.md TODO
|
2019-09-30 11:14:08 -04:00
|
|
|
%{_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
|
2025-01-07 01:24:22 +08:00
|
|
|
* Tue Jan 07 2025 Funda Wang <fundawang@yeah.net> - 2.15-2
|
|
|
|
|
- fix build with latest gettext
|
|
|
|
|
- harden systemd service file from openSUSE
|
|
|
|
|
- add patch regarding risc-v arch support
|
|
|
|
|
|
2023-05-06 17:32:59 +08:00
|
|
|
* Sat May 6 2023 panxiaohe <pan_xiaohe@hoperun.com> - 2.15-1
|
|
|
|
|
- update to 2.15
|
|
|
|
|
|
2022-02-24 16:27:32 +08:00
|
|
|
* Thu Feb 24 2022 wangchen <wangchen137@h-partners.com> - 2.14-2
|
|
|
|
|
- fix compatibility with ncurses-6.3
|
|
|
|
|
|
2022-02-21 17:08:43 +08:00
|
|
|
* Mon Feb 21 2022 panxiaohe <panxh.life@foxmail.com> - 2.14-1
|
|
|
|
|
- update to 2.14
|
|
|
|
|
|
2021-07-30 23:17:27 +08:00
|
|
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 2.13-2
|
|
|
|
|
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
|
|
|
|
|
|
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
|