From 9e156eac50786616ef423c1c574e74a5706dae9b Mon Sep 17 00:00:00 2001 From: pyamsoft Date: Sat, 6 Apr 2024 10:42:26 -0700 Subject: [PATCH] Add RPM I don't have an rpm machine so this file was tested in a Fedora 39 container Inspired by this almost 8 year old PR that I forgot about, sorry :( https://github.com/pyamsoft/pstate-frequency/issues/25 --- assets/rpm/pstate-frequency.spec | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 assets/rpm/pstate-frequency.spec diff --git a/assets/rpm/pstate-frequency.spec b/assets/rpm/pstate-frequency.spec new file mode 100644 index 0000000..5aeab92 --- /dev/null +++ b/assets/rpm/pstate-frequency.spec @@ -0,0 +1,42 @@ +# Put the spec in ~/rpmbuild/SPECS and clone the repo as ~/rpmbuild/SOURCES + +Name: pstate-frequency +Version: 3.15.1 +Release: 1 +License: GPLv2 +Summary: Easily control moden CPU p-state driver on Linux +Url: https://pyamsoft.github.io/pstate-frequency +Group: System +Source0: https://github.com/pyamsoft/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Requires: coreutils +Requires: grep +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Pstate-frequency is able to adjust the modern CPU p-state driver values for the minimum and maximum scaling frequencies and the state of turbo boost. + +%prep +%setup -q + +%install +patch -p1 -i "./assets/pkgbuild/patches/00-fix-prefix.patch" +make PREFIX=%{_prefix} DESTDIR=%{buildroot} install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_bindir}/%{name} +/etc/%{name}.d/*.plan +/usr/lib/systemd/system/%{name}@.service +/usr/lib/systemd/system/%{name}-sleep.service +/usr/lib/udev/rules.d/99-%{name}.rules +/usr/share/bash-completion/completions/%{name} +%doc %{_docdir}/%{name}/README.md +%doc %{_docdir}/%{name}/LICENSE + +%changelog +* Sat Apr 06 2024 3.15.1-1 +- Initial RPM release (3.15.1-1) +