build(packaging): add the Arch package, systemd unit and gamescope config

The PKGBUILD builds from the surrounding source tree (makepkg's -flto is
disabled because it breaks the libspa-sys C shim). The user unit and the
env example ship the intended deployment, and gamescope-tv.conf documents the
gamescope session it is meant to run against.
This commit is contained in:
2026-09-12 10:11:01 +03:00
parent e2b1c2983d
commit 9bb2d7d690
4 changed files with 125 additions and 0 deletions
@@ -0,0 +1,25 @@
# User unit for gamescope-hyperhdr. The Arch package installs it into /usr/lib/systemd/user;
# for a manual install copy it to ~/.config/systemd/user. It runs as the user of the PipeWire
# session and waits for the gamescope node, so it can simply stay enabled. To run it only
# together with gamescope-tv.service, add the gamescope-tv.conf drop-in.
[Unit]
Description=gamescope → HyperHDR ambilight feed
After=pipewire.service wireplumber.service
Wants=pipewire.service
[Service]
Type=simple
# System-wide settings, overridden by the per-user file.
EnvironmentFile=-/etc/gamescope-hyperhdr.env
EnvironmentFile=-%h/.config/gamescope-hyperhdr/env
# No absolute path: systemd searches /usr/local/bin and /usr/bin, which covers both the package
# and a manual install.
ExecStart=gamescope-hyperhdr
Restart=on-failure
RestartSec=2
# Exit code 2 is a configuration error (e.g. GSHDR_HOST not set); restarting will not help.
RestartPreventExitStatus=2
NoNewPrivileges=yes
[Install]
WantedBy=default.target
+13
View File
@@ -0,0 +1,13 @@
# Drop-in for gamescope-hyperhdr.service: run the feed only together with gamescope-tv.service,
# starting with it and stopping when it stops.
#
# install -Dm644 gamescope-tv.conf ~/.config/systemd/user/gamescope-hyperhdr.service.d/gamescope-tv.conf
# systemctl --user daemon-reload
# systemctl --user add-wants gamescope-tv.service gamescope-hyperhdr.service
#
# The Arch package ships this file as /usr/share/doc/gamescope-hyperhdr/gamescope-tv.conf.
# add-wants makes gamescope-tv.service pull the feed in. Do not also `enable` the feed:
# BindsTo= would then start gamescope-tv.service whenever the feed starts.
[Unit]
BindsTo=gamescope-tv.service
After=gamescope-tv.service