`--config` reads the same directives as the command line, one per line with the rest of the line as the command, so a unit can carry the kiosk's events without shell quoting. presence.service is a systemd --user unit that runs it from ~/.config/presence/config, restarts on failure, and only starts when the file exists; config.example is the starting point. The x86_64 release job failed on makepkg's runtime dependency check because bluez was not in the container. It is now. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
34 lines
1.2 KiB
Bash
34 lines
1.2 KiB
Bash
# Maintainer: bl <bendik@lynghaug.me>
|
|
# Built from the checkout it sits in: .gitea/workflows/release.yml runs makepkg
|
|
# at the repo root on a v* tag, natively per arch, and uploads to the [uhhm]
|
|
# registry. pkgver must match Cargo.toml and the tag; CI checks all three.
|
|
#
|
|
# source=() and $startdir on purpose: makepkg's own $srcdir is ./src, which is
|
|
# where the Rust sources live, so copying into it would nest src/src. Cargo
|
|
# builds in place into ./target (gitignored) instead.
|
|
|
|
pkgname=presence
|
|
pkgver=0.1.0
|
|
pkgrel=1
|
|
pkgdesc="BLE proximity events for a kiosk screen, swayidle style"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://project.uhhm.no/uhhm/presence"
|
|
license=('MIT')
|
|
depends=('bluez' 'dbus' 'gcc-libs' 'glibc')
|
|
makedepends=('cargo')
|
|
source=()
|
|
|
|
build() {
|
|
cd "$startdir"
|
|
CARGO_TARGET_DIR="$startdir/target" cargo build --release --locked
|
|
}
|
|
|
|
package() {
|
|
cd "$startdir"
|
|
install -Dm755 target/release/presence "$pkgdir/usr/bin/presence"
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/presence/README.md"
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/presence/LICENSE"
|
|
install -Dm644 config.example "$pkgdir/usr/share/doc/presence/config.example"
|
|
install -Dm644 presence.service "$pkgdir/usr/lib/systemd/user/presence.service"
|
|
}
|