From fba78a205c9c19bb7830255dbcce10925f444beb Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Tue, 16 Jun 2026 13:13:44 -0500 Subject: [PATCH] chore (amdctl): cleanup spec (#13111) (#13123) --- ...ile-Remove-unused-Makefile-variables.patch | 22 -------- anda/tools/amdctl/amdctl.spec | 55 +++++++++++-------- 2 files changed, 32 insertions(+), 45 deletions(-) delete mode 100644 anda/tools/amdctl/0001-RPM-makefile-Remove-unused-Makefile-variables.patch diff --git a/anda/tools/amdctl/0001-RPM-makefile-Remove-unused-Makefile-variables.patch b/anda/tools/amdctl/0001-RPM-makefile-Remove-unused-Makefile-variables.patch deleted file mode 100644 index e0e225078b..0000000000 --- a/anda/tools/amdctl/0001-RPM-makefile-Remove-unused-Makefile-variables.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paskal Sitepu -Date: Sat, 4 Nov 2023 09:54:38 +0700 -Subject: [PATCH] (RPM) makefile: Remove unused Makefile variables - -Signed-off-by: Paskal Sitepu ---- - makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/makefile b/makefile -index 5ca6bab..0091429 100644 ---- a/makefile -+++ b/makefile -@@ -1,5 +1,3 @@ --CC=gcc --CFLAGS=-Wall -pedantic -Wextra -std=c99 -O2 - all: amdctl - %.o: %.c - $(CC) -c -o $@ $< $(CFLAGS) --- -2.41.0 diff --git a/anda/tools/amdctl/amdctl.spec b/anda/tools/amdctl/amdctl.spec index c0a18e54d3..5ca8435c9e 100644 --- a/anda/tools/amdctl/amdctl.spec +++ b/anda/tools/amdctl/amdctl.spec @@ -1,34 +1,40 @@ -Name: amdctl -Summary: Set P-State voltages and clock speeds on recent AMD CPUs on Linux -License: GPLv3 -URL: https://github.com/kevinlekiller/%{name} +Name: amdctl +Summary: Set P-State voltages and clock speeds on recent AMD CPUs on Linux +License: GPL-3.0-or-later +URL: https://github.com/kevinlekiller/%{name} +Version: 0.11 +Release: 2%{?dist} +Source0: https://github.com/kevinlekiller/%{name}/archive/refs/tags/v%{version}.tar.gz -Version: 0.11 -Release: 2%{?dist} -Source0: https://github.com/kevinlekiller/%{name}/archive/refs/tags/v%{version}.tar.gz -# Remove hardcoded CFLAGS and CC -Patch0: 0001-RPM-makefile-Remove-unused-Makefile-variables.patch - -# `msr` is a builtin kernel module -Requires: kernel-core systemd-udev coreutils -BuildRequires: make gcc kernel-headers glibc-headers +BuildRequires: make +BuildRequires: gcc +BuildRequires: kernel-headers +BuildRequires: glibc-headers +BuildRequires: cmake-rpm-macros +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: systemd-rpm-macros +Requires: kernel-core +Requires: systemd-udev +Requires: coreutils %description Tool for changing voltages and clock speeds for AMD processors with control over every power state and CPU core. %prep -%setup -qn %{name}-%{version} -patch -p1 -i %{PATCH0} +%autosetup + +%conf +%cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 %build -%set_build_flags -%make_build +%cmake_build %install # install the 'amdctl' binary mkdir -p %{buildroot}/%{_bindir} -install -m 0755 ./%{name} %{buildroot}/%{_bindir}/ +install -m 0755 redhat-linux-build/%{name} %{buildroot}/%{_bindir}/ # add modules.load.d entry mkdir -p %{buildroot}/%{_modulesloaddir}/ @@ -51,12 +57,15 @@ EOF %files %license LICENSE %doc README.md -/%{_bindir}/%{name} -/%{_libexecdir}/%{name} -/%{_modulesloaddir}/%{name}.conf -/%{_udevrulesdir}/99-%{name}.rules +%{_bindir}/%{name} +%{_libexecdir}/%{name} +%{_modulesloaddir}/%{name}.conf +%{_udevrulesdir}/99-%{name}.rules %changelog +* Tue Jun 16 2026 Owen-sz - 0.11-2 +- Clean up spec + * Sat Nov 4 2023 - 0.11-1 - Track upstream to 0.11 @@ -76,4 +85,4 @@ EOF - Track upstream to 0.6.1 * Mon May 24 2021 rmnscnce - 0.2-2.git+gb0ffbad -- Initial packaging \ No newline at end of file +- Initial packaging