File intel-lpmd.spec of Package intel-lpmd
#
# spec file for package intel-lpmd
#
# 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
# 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: intel-lpmd
Version: 0.0.9
Release: 0
Summary: Intel Low Power Mode Daemon
Group: System/Daemons
License: GPL-2.0-or-later
URL: https://github.com/intel/intel-lpmd
Source0: https://github.com/intel/%{name}/archive/refs/tags/v%{version}.tar.gz
Patch0: remove-mobile-platform-check.patch
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: gtk-doc
BuildRequires: gcc
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.22
BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(libxml-2.0) >= 2.4
BuildRequires: pkgconfig(libnl-3.0)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(upower-glib)
BuildRequires: systemd-rpm-macros
ExclusiveArch: %ix86 x86_64
%description
Intel Low Power Model Daemon is a Linux daemon used to optimize active idle
power. It selects a set of most power efficient CPUs based on configuration
file or CPU topology. Based on system utilization and other hints, it puts the
system into Low Power Mode by activate the power efficient CPUs and disable the
rest, and restore the system from Low Power Mode by activating all CPUs.
%prep
%autosetup -p1
NO_CONFIGURE=1 ./autogen.sh
%build
%configure --with-dbus-sys-dir=%{_datadir}/dbus-1/system.d --disable-werror
make %{?_smp_mflags}
%install
%make_install
%check
%pre
%service_add_pre intel_lpmd.service
%post
%service_add_post intel_lpmd.service
%preun
%service_del_preun intel_lpmd.service
%postun
%service_del_postun intel_lpmd.service
%files
%license COPYING
%doc README.md
%{_sbindir}/intel_lpmd
%{_bindir}/intel_lpmd_control
%{_mandir}/man*/intel_lpmd*.gz
%{_datadir}/dbus-1/system.d/org.freedesktop.intel_lpmd.conf
%{_datadir}/dbus-1/system-services/org.freedesktop.intel_lpmd.service
%{_unitdir}/intel_lpmd.service
%dir %{_sysconfdir}/intel_lpmd
%config %{_sysconfdir}/intel_lpmd/intel_lpmd_config*.xml
%changelog