From eb9d3c3ce0f6063ceaf50cd527158fd800c56607 Mon Sep 17 00:00:00 2001 From: salmon Date: Sun, 9 Aug 2026 23:24:03 +0200 Subject: Document FreeBSD requirements in README --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7826c41..9cc85fb 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,37 @@ install.sh will: - install shell autocompletions (zsh, bash and fish supported) - install user systemd service and activate it +## FreeBSD + +FreeBSD is supported out of the box; no code changes or extra Rust crates are needed. +The audio backend (cpal) uses ALSA on FreeBSD, which is provided by the ports as a +userspace shim over the kernel's OSS (/dev/dsp). + +Requirements: +``` +pkg install alsa-lib alsa-plugins # audio: ALSA API + OSS backend plugin (mandatory) +pkg install cmake # build-time only, for the rustls TLS stack (aws-lc-sys) +pkg install rust # if you don't have a Rust toolchain yet +``` + +Build and install (FreeBSD convention is /usr/local/bin): +``` +cargo build --release +install -m 755 target/release/rsp /usr/local/bin/rsp +``` + +FreeBSD notes: +- There is no systemd: run `rsp start-daemon` manually, from your login shell, + or via an rc.d script. `start-daemon`/`stop-daemon`/`restart` behave the same. +- XDG_RUNTIME_DIR is not set by default on FreeBSD, so the daemon socket and PID + file fall back to /tmp/rsplayer/. Set XDG_RUNTIME_DIR in your rc.d script or + shell profile if you prefer a private runtime dir. +- Desktop notifications and MPRIS (playerctl etc.) require a running D-Bus session + bus (`pkg install dbus`) and a notification daemon; without them the daemon runs + fine, those features are just disabled. +- If you have multiple sound cards, pick the output with: + `sysctl hw.snd.default_unit=N` (persist in /etc/sysctl.conf). + ## Usage configuration is generated at startup in $XDG_CONFIG_HOME/rsplayer/config.toml @@ -26,7 +57,7 @@ all other values can be changed in runtime using commands as for commands: RSP will be installed as rsp, in this fragment, rsp will be ommited -these commands should only be used in testing or by systemd service: +these commands should only be used in testing or by the init system (systemd/rc.d): - `start-daemon` Start the daemon - `stop-daemon` Stop the daemon - `restart` Restart the daemon (kill existing and start new) -- cgit v1.2.3