mirror of
https://github.com/playit-cloud/playit-agent.git
synced 2026-07-02 09:12:29 +00:00
* Adopt nFPM for Linux release packages - Build deb, rpm, apk, archlinux, and ipk artifacts - Update service, socket, and install scripts for the new package layout - Adjust Linux socket permissions for the playit runtime directory * Normalize package input paths in nfpm script - Resolve relative inputs from the start directory - Canonicalize directory portions when possible - Preserve absolute paths unchanged * Install Arch service file under /usr/lib/systemd/system - Update nfpm packaging path for the Arch Linux systemd unit - Keep the service install location aligned with Arch packaging conventions * Handle permission-denied socket inspection on Linux - Fall back to parent directory group checks when socket metadata is unreadable - Reuse playit group access classification for socket and parent paths * Package playitd alongside playit in nfpm builds - Add `/usr/local/bin/playitd` symlink to the package manifest - Create and remove the `playitd` launcher during install and uninstall * Drop IPK packaging and split APK nfpm config - Remove ipk outputs from download and package scripts - Use a dedicated nfpm config for APK packages - Keep shared service install paths on the main config
46 lines
889 B
Bash
Executable File
46 lines
889 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
|
|
|
if [[ $# -ne 2 && $# -ne 3 ]]; then
|
|
echo "usage: $0 <playit-cli-binary> [playitd-binary] <deb-arch>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $# -eq 3 ]]; then
|
|
CLI_BIN="$1"
|
|
DAEMON_BIN="$2"
|
|
DEB_ARCH="$3"
|
|
else
|
|
CLI_BIN="$1"
|
|
DAEMON_BIN=""
|
|
DEB_ARCH="$2"
|
|
fi
|
|
|
|
case "${DEB_ARCH}" in
|
|
amd64)
|
|
NFPM_ARCH=amd64
|
|
;;
|
|
arm64)
|
|
NFPM_ARCH=arm64
|
|
;;
|
|
armhf)
|
|
NFPM_ARCH=arm7
|
|
;;
|
|
i386)
|
|
NFPM_ARCH=386
|
|
;;
|
|
*)
|
|
echo "unsupported Debian architecture: ${DEB_ARCH}" >&2
|
|
echo "supported Debian architectures: amd64 arm64 armhf i386" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [[ -n "${DAEMON_BIN}" ]]; then
|
|
"${SCRIPT_DIR}/package-linux-nfpm.sh" "${CLI_BIN}" "${DAEMON_BIN}" "${NFPM_ARCH}" deb
|
|
else
|
|
"${SCRIPT_DIR}/package-linux-nfpm.sh" "${CLI_BIN}" "${NFPM_ARCH}" deb
|
|
fi
|