From 274b0c47ce2b16120e1e1ccd2f7e0b3019ec0ecd Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:07:06 -0800 Subject: [PATCH] package system76-power (#9018) (#9476) --- anda/system/system76-power/anda.hcl | 5 ++ .../system/system76-power/system76-power.spec | 57 +++++++++++++++++++ anda/system/system76-power/update.rhai | 1 + 3 files changed, 63 insertions(+) create mode 100644 anda/system/system76-power/anda.hcl create mode 100644 anda/system/system76-power/system76-power.spec create mode 100644 anda/system/system76-power/update.rhai diff --git a/anda/system/system76-power/anda.hcl b/anda/system/system76-power/anda.hcl new file mode 100644 index 0000000000..690acd49e5 --- /dev/null +++ b/anda/system/system76-power/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "system76-power.spec" + } +} \ No newline at end of file diff --git a/anda/system/system76-power/system76-power.spec b/anda/system/system76-power/system76-power.spec new file mode 100644 index 0000000000..f4882ceea7 --- /dev/null +++ b/anda/system/system76-power/system76-power.spec @@ -0,0 +1,57 @@ +%global appid com.system76.PowerDaemon + +Name: system76-power +Version: 1.2.8 +Release: 1%{?dist} +Summary: Power Profiles and dGPU Hotplug for System76 Laptops +License: GPL-3.0-only + +Packager: Jaiden Riordan +URL: https://github.com/pop-os/system76-power +Source0: %{url}/archive/refs/tags/%{version}.tar.gz + +BuildRequires: libusb-compat-0.1-devel +BuildRequires: dbus-devel +BuildRequires: systemd-rpm-macros +BuildRequires: cargo-rpm-macros +BuildRequires: mold + +%description +%summary. + +%prep +%autosetup +%cargo_prep_online + +%build +%cargo_build + +%install +install -Dm 644 data/%{appid}.conf %{buildroot}%{_datadir}/dbus-1/system.d/%{appid}.conf +install -Dm 644 data/%{appid}.policy %{buildroot}%{_datadir}/polkit-1/actions/%{appid}.policy +install -Dm 644 data/%{appid}.service %{buildroot}%{_unitdir}/%{appid}.service +install -Dm 644 data/%{appid}.xml %{buildroot}%{_datadir}/dbus-1/interfaces/%{appid}.xml +install -Dm 755 target/rpm/%{name} %{buildroot}%{_bindir}/%{name} + +%post +%systemd_post com.system76.PowerDaemon.service + +%preun +%systemd_preun com.system76.PowerDaemon.service + +%postun +%systemd_postun_with_restart com.system76.PowerDaemon.service + +%files +%doc README.md TESTING.md +%license LICENSE +%{_bindir}/%{name} +%{_unitdir}/%{appid}.service +%{_datadir}/dbus-1/interfaces/%{appid}.xml +%{_datadir}/dbus-1/system.d/%{appid}.conf +%{_datadir}/polkit-1/actions/%{appid}.policy + +%changelog +* Fri Jan 9 2026 Jaiden Riordan +- Port to Terra + diff --git a/anda/system/system76-power/update.rhai b/anda/system/system76-power/update.rhai new file mode 100644 index 0000000000..c4d96350fc --- /dev/null +++ b/anda/system/system76-power/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("pop-os/system76-power"));