# Built by quine-global/app-build (kind go), which compiles the binaries first; not a# from-source spec (no %prep/%build).%global debug_package %{nil}Name: swap-watchdogVersion: %{version_}Release: %{release_}%{?dist}Summary: Reveals a Force Quit window when swap or memory pressure turns criticalLicense: Apache-2.0URL: https://forge.in.quineglobal.com/quine-global-labs/swap-watchdogExclusiveArch: x86_64 aarch64Requires: gtk3Requires: kdotool%descriptionswap-watchdog polls swap and memory pressure, and when either turns criticalreveals the Force Quit Monitor (force-quit-gui), which runs minimized fromlogin so it's there without starting anything new under memory pressure.Both run as systemd user services.%install# %%license and %%doc read from the build directory, not the checkout.cp -p %{srcdir}/LICENSE %{srcdir}/README.md .install -D -m 0755 %{srcdir}/bin/swap-watchdog %{buildroot}%{_bindir}/swap-watchdoginstall -D -m 0755 %{srcdir}/bin/force-quit-gui %{buildroot}%{_bindir}/force-quit-guimkdir -p %{buildroot}%{_userunitdir}for u in swap-watchdog force-quit-gui; dosed -e "s|^ExecStart=%%h/Code/swap-watchdog/bin/|ExecStart=%{_bindir}/|" \-e "s|^Environment=PATH=%%h/.local/bin:|Environment=PATH=|" \%{srcdir}/systemd/$u.service > %{buildroot}%{_userunitdir}/$u.servicegrep -q "^ExecStart=%{_bindir}/$u$" %{buildroot}%{_userunitdir}/$u.servicedoneinstall -D -m 0644 /dev/stdin %{buildroot}%{_userpresetdir}/80-swap-watchdog.preset <<'PRESET'enable force-quit-gui.serviceenable swap-watchdog.servicePRESET%post%systemd_user_post force-quit-gui.service swap-watchdog.service%preun%systemd_user_preun force-quit-gui.service swap-watchdog.service%files%license LICENSE%doc README.md%{_bindir}/swap-watchdog%{_bindir}/force-quit-gui%{_userunitdir}/swap-watchdog.service%{_userunitdir}/force-quit-gui.service%{_userpresetdir}/80-swap-watchdog.preset