Files
CoreFreq/CoreFreq.spec

89 lines
2.4 KiB
RPMSpec
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#
# spec file for package CoreFreq
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: CoreFreq
Version: 2.0.9
Release: 0
Summary: CPU monitoring software for 64-bit processors
License: GPL-2.0-or-later
URL: https://github.com/cyring/CoreFreq
Source: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source100: corefreqd.service
Source101: preamble
# PATCH-FIX-OPENSUSE fix-leap16-compilation.patch bsc#1247592
Patch: fix-leap16-compilation.patch
BuildRequires: %{kernel_module_package_buildreqs}
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libsystemd)
Requires: CoreFreq-kmp = %{version}
ExclusiveArch: x86_64 aarch64
%systemd_ordering
%kernel_module_package -p preamble -x preempt 64kb
%description
A CPU monitoring software with BIOS-like functionalities for
64-bit processors like Intel Atom, Core2, Nehalem, SandyBridge
and superiors, and AMD Families 0Fh17h (Zen), 18h (Hygon
Dhyana).
%prep
%setup
%if 0%{?suse_version} == 1600 && 0%{?is_opensuse}
%patch -P 0 -p 1
%endif
%build
%make_build
%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_unitdir} %{buildroot}%{_sbindir}
PREFIX=%{buildroot}%{_prefix} make install
cp %{SOURCE100} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sbindir}
ln -s service %{buildroot}%{_sbindir}/rccorefreqd
%files
%license LICENSE
%doc README.md
%{_bindir}/corefreq-cli
%{_bindir}/corefreqd
%{_unitdir}/corefreqd.service
%{_sbindir}/rccorefreqd
%pre
%service_add_pre corefreqd.service
%post
%service_add_post corefreqd.service
%preun
%service_del_preun corefreqd.service
%postun
%service_del_postun corefreqd.service
%check
%changelog