From 034eaac04f8e0ff618434268aea815133a8c0030adbba14735f111c304eb47bf Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Mon, 29 Apr 2024 07:43:23 +0000 Subject: [PATCH] Accepting request 1167813 from home:trenn:branches:hardware - Parse turbostat and intel-speed-select version from kernel sources and add them to %description OBS-URL: https://build.opensuse.org/request/show/1167813 OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=136 --- cpupower.changes | 6 ++++++ cpupower.spec | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cpupower.changes b/cpupower.changes index 6cf862e..d33c239 100644 --- a/cpupower.changes +++ b/cpupower.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 15 12:57:13 UTC 2024 - Thomas Renninger + +- Parse turbostat and intel-speed-select version from kernel sources and + add them to %description + ------------------------------------------------------------------- Mon Feb 26 10:55:54 UTC 2024 - Dominique Leuenberger diff --git a/cpupower.spec b/cpupower.spec index 3192bb9..1a4cfa3 100644 --- a/cpupower.spec +++ b/cpupower.spec @@ -1,7 +1,7 @@ # # spec file for package cpupower # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,6 +22,8 @@ %define ssdir tools/power/x86/intel-speed-select # Use this as version when things are in mainline kernel %define version %(rpm -q --qf '%%{VERSION}' kernel-source) +%global turbover %(grep -o "turbostat version [0-9.]*" %{_prefix}/src/linux/tools/power/x86/turbostat/turbostat.c) +%global issver %(grep -o "version_str =.*" %{_prefix}/src/linux/tools/power/x86/intel-speed-select/isst-config.c | grep -o "[0-9]\.[0-9][0-9]") Name: cpupower Version: %{version} Release: 0 @@ -42,6 +44,9 @@ BuildRequires: pciutils-devel %description This tool accesses the Linux kernel's processor power subsystems like CPU frequency switching (cpufreq) or CPU sleep states (cpuidle). +Also part of the package are: +%turbover +intel-speed-select %issver %package -n libcpupower1 Summary: Processor power related C-library