Files
es5-clap/install.sh
T
sub 4d0ad127b5 Add shared memory daemon architecture and systemd service
Move ES-5 encoding from the CLAP plugin to a standalone PipeWire
daemon (es5d) communicating via POSIX shared memory. The plugin now
acts as a parameter/state frontend while es5d outputs directly to
the ES-9. Includes systemd user service for autostart after reboot
and an install script for local deployment.
2026-03-27 22:01:04 +01:00

33 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR="${SCRIPT_DIR}/build"
# Build if needed
if [[ ! -f "${BUILD_DIR}/es5d" ]] || [[ ! -f "${BUILD_DIR}/es5-clap.clap" ]]; then
echo "Building..."
cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}" -DCMAKE_BUILD_TYPE=Release
cmake --build "${BUILD_DIR}" -j"$(nproc)"
fi
# Install CLAP plugin
CLAP_DIR="${HOME}/.clap"
mkdir -p "${CLAP_DIR}"
install -m 755 "${BUILD_DIR}/es5-clap.clap" "${CLAP_DIR}/"
echo "Installed plugin to ${CLAP_DIR}/es5-clap.clap"
# Install daemon binary
install -Dm 755 "${BUILD_DIR}/es5d" "${HOME}/.local/bin/es5d"
echo "Installed daemon to ${HOME}/.local/bin/es5d"
# Install and enable systemd user service
SYSTEMD_DIR="${HOME}/.config/systemd/user"
mkdir -p "${SYSTEMD_DIR}"
install -m 644 "${SCRIPT_DIR}/dist/es5d.service" "${SYSTEMD_DIR}/"
systemctl --user daemon-reload
systemctl --user enable --now es5d.service
echo "Enabled and started es5d.service"
echo "Done. Check status with: systemctl --user status es5d"