%define debug_package %{nil} Name: ryzen-stabilizator Version: 0.1 Release: 1%{?dist} Summary: Program to help with the infamous "MCE-random-reboots-while-idle" issue on Ryzen License: ASL2.0 URL: https://github.com/qrwteyrutiyoup/ryzen-stabilizator Source0: https://github.com/qrwteyrutiyoup/%{name}/archive/master.zip Source1: %{name}.conf BuildRequires: golang-bin BUildRequires: git-core BuildRequires: systemd-rpm-macros %description Ryzen Stabilizator Tabajara is a Simple Go program to enable/disable C6 C-state, processor boosting, address space layout randomization (ASLR) and the Power Supply Idle Control workaround on an AMD Ryzen processor, in order to help with the infamous "MCE-random-reboots-while-idle" issue. %prep %autosetup -p1 -n %{name}-master %build go get || : go build -ldflags "-X main.version=%{version}-%{release}" %install install -Dm 0755 %{name}-master "%{buildroot}/%{_bindir}/%{name}" install -Dm 0644 %{SOURCE1} "%{buildroot}/%{_sysconfdir}/%{name}.conf" for s in ryzen-stabilizator ryzen-stabilizator@boot ryzen-stabilizator@resume; do install -Dm 0644 contrib/systemd/${s}.service \ "%{buildroot}/%{_unitdir}/${s}.service" done install -Dm 0644 contrib/systemd/%{name}.target \ "%{buildroot}/%{_unitdir}/%{name}.target" install -Dm 0644 contrib/settings.toml.sample \ "%{buildroot}/%{_sysconfdir}/%{name}/settings.toml" %files %license LICENSE %{_bindir}/%{name} %config %{_sysconfdir}/%{name}.conf %config(noreplace) %{_sysconfdir}/%{name}/ %{_unitdir}/%{name}*