%global debug_package %{nil} Name: apple-powerd Version: 0.15.1 Release: 1%{?dist} Summary: macOS-style power, idle and brightness management License: MIT Source0: %{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: gcc BuildRequires: pkgconfig(dbus-1) BuildRequires: systemd-rpm-macros Requires: systemd Requires: upower %description One user service for the power behaviour of an M-series MacBook Pro: auto-brightness that learns from adjustments, a dim stage before display off, slight dimming on battery, a low-light keyboard backlight that is never lit with the displays off, separate battery and adapter timings, lock before every sleep, lid sleep unless docked, audio keeping the machine awake, a low battery notification and sleep, and a per-sleep battery drain log. Uses only logind, UPower, ext-idle-notify and wlr-output-power-management (niri IPC as a fallback), so it runs on any Wayland laptop. %prep %autosetup -n %{name}-%{version} %cargo_prep -N # build online: the crates are not packaged for Fedora sed -i 's/^offline = true$//' .cargo/config.toml %build %{__cargo} build %{__cargo_common_opts} --profile rpm -p apple-powerd %install install -Dpsm0755 target/rpm/apple-powerd %{buildroot}%{_bindir}/apple-powerd install -Dm644 crates/apple-powerd/apple-powerd.service %{buildroot}%{_userunitdir}/apple-powerd.service %check %{__cargo} test %{__cargo_common_opts} --profile rpm --no-fail-fast -p apple-powerd %post %systemd_user_post apple-powerd.service %preun %systemd_user_preun apple-powerd.service %postun %systemd_user_postun_with_restart apple-powerd.service %files %license LICENSE %doc crates/apple-powerd/README.md crates/apple-powerd/config.toml %{_bindir}/apple-powerd %{_userunitdir}/apple-powerd.service %changelog * Tue Nov 10 2026 Lachlan Marie - 0.15.1-1 - Lock screen off after 20 s of no input - Ignore idle inhibitors while locked * Mon Nov 09 2026 Lachlan Marie - 0.15.0-1 - Split from apple-extras