From acfa78fa92723d587969c83dc86332da3ba39663 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:41:00 -0700 Subject: [PATCH] add: intel-lpmd (#5265) (#5267) (cherry picked from commit ba60deaaf34b3e0d4bedd1139bfd0f1471e6945d) Co-authored-by: madomado --- anda/system/intel-lpmd/anda.hcl | 6 ++++ anda/system/intel-lpmd/intel-lpmd.spec | 47 ++++++++++++++++++++++++++ anda/system/intel-lpmd/update.rhai | 1 + 3 files changed, 54 insertions(+) create mode 100644 anda/system/intel-lpmd/anda.hcl create mode 100644 anda/system/intel-lpmd/intel-lpmd.spec create mode 100644 anda/system/intel-lpmd/update.rhai diff --git a/anda/system/intel-lpmd/anda.hcl b/anda/system/intel-lpmd/anda.hcl new file mode 100644 index 0000000000..f838f1d9ff --- /dev/null +++ b/anda/system/intel-lpmd/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "intel-lpmd.spec" + } +} diff --git a/anda/system/intel-lpmd/intel-lpmd.spec b/anda/system/intel-lpmd/intel-lpmd.spec new file mode 100644 index 0000000000..5230bc8c80 --- /dev/null +++ b/anda/system/intel-lpmd/intel-lpmd.spec @@ -0,0 +1,47 @@ +%global _distro_extra_cflags -Wno-unused-variable -Wno-unused-function -Wno-switch -I/usr/lib/gcc/**/include/ + +Name: intel-lpmd +Version: 0.0.9 +Release: 1%?dist +Summary: Linux daemon designed to optimize active idle power +License: GPL-2.0-only +URL: https://github.com/intel/intel-lpmd +Packager: madonuko +Source0: %url/archive/refs/tags/v%version.tar.gz +ExclusiveArch: x86_64 +BuildRequires: automake autoconf-archive glib2-devel dbus-glib-devel libxml2-devel libnl3-devel systemd-devel gtk-doc upower-devel +BuildRequires: gcc + +%description +Intel Low Power Mode Daemon (lpmd) is a Linux daemon designed to optimize active idle power. It selects the most power-efficient CPUs based on a configuration file or CPU topology. Depending on system utilization and other hints, it puts the system into Low Power Mode by activating the power-efficient CPUs and disabling the rest, and restores the system from Low Power Mode by activating all CPUs. + +%prep +%autosetup +sed -i 's@mandb || true@@' Makefile.am + +%conf +./autogen.sh --prefix=%_usr + +%build +%make_build + +%install +%make_install + +mv %buildroot{%_usr%_sysconfdir/intel_lpmd,%_sysconfdir} +%if "%_sbindir" == "%_bindir" +mv %buildroot{%_usr/sbin/*,%_bindir} +%endif + +%files +%doc README.md ChangeLog AUTHORS NEWS security.md +%license COPYING +%_bindir/intel_lpmd_control +%_sbindir/intel_lpmd +%_datadir/dbus-1/system-services/org.freedesktop.intel_lpmd.service +%_mandir/man5/intel_lpmd_config.xml.5.gz +%_mandir/man8/intel_lpmd.8.* +%_mandir/man8/intel_lpmd_control.8.* +%_sysconfdir/intel_lpmd/ +%_sysconfdir/dbus-1/system.d/org.freedesktop.intel_lpmd.conf +%_unitdir/intel_lpmd.service diff --git a/anda/system/intel-lpmd/update.rhai b/anda/system/intel-lpmd/update.rhai new file mode 100644 index 0000000000..c7a632c5f3 --- /dev/null +++ b/anda/system/intel-lpmd/update.rhai @@ -0,0 +1 @@ +rpm.version(`(?m)^### Release ([\d.]+)$`.find(gh_rawfile("intel/intel-lpmd", "main", "README.md"), 1));