Document Debian installation via release and package registry

Option A adds the Gitea Debian registry as an apt source (updates land
with apt upgrade), option B installs a release .deb directly; both share
the same per-user setup steps.
This commit is contained in:
Bastian Mäuser committed 2026-11-05 17:03:06 +01:00
1 parent b93c0134dd
commit 38087583cf
1 file changed
+57 -12
+57 -12
View File
@@ -59,7 +59,57 @@ proof of absence.
factor; OS-generated advertisements (Fast Pair, Continuity) are too
intermittent to rely on.
## Build & install
## Install (Debian packages)
Prebuilt `.deb` packages for amd64 and arm64 are attached to the
[releases](https://git.netz.org/bmaeuser/btle-proximity/releases) and
available through the Gitea Debian package registry.
### Option A — apt repository (recommended, delivers updates)
```sh
sudo install -d /etc/apt/keyrings
curl -fsSL https://git.netz.org/api/packages/bmaeuser/debian/repository.key \
| sudo gpg --dearmor -o /etc/apt/keyrings/btle-proximity.gpg
echo "deb [signed-by=/etc/apt/keyrings/btle-proximity.gpg] https://git.netz.org/api/packages/bmaeuser/debian stable main" \
| sudo tee /etc/apt/sources.list.d/btle-proximity.list
sudo apt update
sudo apt install btle-proximity
```
Future releases land with the usual `apt upgrade`.
### Option B — manual .deb from a release
```sh
curl -fLO https://git.netz.org/bmaeuser/btle-proximity/releases/download/v0.1.0/btle-proximity_0.1.0-1_amd64.deb
sudo apt install ./btle-proximity_0.1.0-1_amd64.deb
# arm64: btle-proximity_0.1.0-1_arm64.deb (fully static musl binary)
```
Both options install the binary to `/usr/bin`, the user unit to
`/usr/lib/systemd/user/`, a man page and the config example to
`/usr/share/doc/btle-proximity/`.
### Per-user setup
```sh
mkdir -p ~/.config/btle-proximity
cp /usr/share/doc/btle-proximity/examples/config.toml ~/.config/btle-proximity/config.toml
btle-proximity list-paired # pick your phone's MAC, edit config.toml
systemctl --user enable --now btle-proximity
journalctl --user -u btle-proximity -f
```
Coming from the `cargo install` flow? Remove that copy first
(`cargo uninstall btle-proximity`) and the unit copied to
`~/.config/systemd/user/`, so neither shadows the package.
The Android app (`btle-proximity-beacon-release.apk`) is attached to the
same releases; Obtainium can track the repo for automatic updates — see
`android/README.md`.
## Build & install from source
```sh
cargo install --path . # installs to ~/.cargo/bin
@@ -83,24 +133,15 @@ RUST_LOG=debug btle-proximity --dry-run
```
Tune `rssi_lock` / `presence_timeout_secs` / `missing_after_secs` to your
room. Then install the user service (runs inside your session, Type=notify):
room.
### Debian package
### Building the Debian packages
```sh
cargo install cargo-deb --version 2.12.1 # 3.x needs rustc > 1.85
cargo deb # -> target/debian/btle-proximity_*.deb
sudo apt install ./target/debian/btle-proximity_0.1.0-1_amd64.deb
systemctl --user enable --now btle-proximity
```
Installs the binary to `/usr/bin`, the user unit to
`/usr/lib/systemd/user/`, a man page and the config example to
`/usr/share/doc/btle-proximity/`. Per-user config still lives at
`~/.config/btle-proximity/config.toml`. If you previously installed via
`cargo install`, remove that copy (`cargo uninstall btle-proximity`) to
avoid PATH shadowing.
#### arm64 (aarch64)
Cross-built as a **static musl binary**, so no cross-gcc/sysroot is needed
@@ -122,6 +163,10 @@ linker, and the host `strip` cannot read aarch64 objects.
### Manual install (dev flow)
The unit in `systemd/` runs the cargo-installed binary
(`%h/.cargo/bin/btle-proximity`); the packaged variant under
`packaging/` points at `/usr/bin` instead.
```sh
cp systemd/btle-proximity.service ~/.config/systemd/user/
systemctl --user daemon-reload