feat(jellyfin-kiosk): add debian package build and staging for jellyfin-kiosk
This commit is contained in:
@@ -56,7 +56,7 @@ jobs:
|
|||||||
- name: Install system runtime dependencies
|
- name: Install system runtime dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y python3 python3-pip python3-venv ffmpeg
|
sudo apt-get install -y python3 python3-pip python3-venv ffmpeg mpv yt-dlp libmpv2
|
||||||
|
|
||||||
- name: Test install eendoe-repository
|
- name: Test install eendoe-repository
|
||||||
run: |
|
run: |
|
||||||
@@ -90,10 +90,19 @@ jobs:
|
|||||||
test -f /usr/local/share/ca-certificates/bnhmeijer/bnhmeijer-root-ca.crt
|
test -f /usr/local/share/ca-certificates/bnhmeijer/bnhmeijer-root-ca.crt
|
||||||
echo "bnhmeijer-ca-certificates: OK"
|
echo "bnhmeijer-ca-certificates: OK"
|
||||||
|
|
||||||
|
- name: Test install jellyfin-kiosk
|
||||||
|
run: |
|
||||||
|
echo "=== Installing jellyfin-kiosk ==="
|
||||||
|
sudo apt-get install -y ./staging/jellyfin-kiosk-*.deb
|
||||||
|
dpkg -s jellyfin-kiosk | grep -q "Status: install ok installed"
|
||||||
|
test -x /usr/bin/jellyfin-kiosk
|
||||||
|
test -f /usr/lib/systemd/system/jellyfin-kiosk.service
|
||||||
|
echo "jellyfin-kiosk: OK"
|
||||||
|
|
||||||
- name: Test package uninstall and cleanup
|
- name: Test package uninstall and cleanup
|
||||||
run: |
|
run: |
|
||||||
echo "=== Testing package removal ==="
|
echo "=== Testing package removal ==="
|
||||||
sudo apt-get remove -y eendoe-hyperdeck eendoe-srs eendoe-repository bnhmeijer-ca-certificates
|
sudo apt-get remove -y eendoe-hyperdeck eendoe-srs eendoe-repository bnhmeijer-ca-certificates jellyfin-kiosk
|
||||||
echo "Package removal: OK"
|
echo "Package removal: OK"
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
|||||||
Executable
+79
@@ -0,0 +1,79 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
PKG_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
|
CLUSTER_ROOT="$(cd "$PKG_ROOT/../../.." && pwd)"
|
||||||
|
|
||||||
|
CONTROL_FILE=$(ls -1 "$PKG_ROOT"/*.control 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
|
if [ -z "$CONTROL_FILE" ]; then
|
||||||
|
echo "Fout: Geen .control bestand gevonden in $PKG_ROOT" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PACKAGE_NAME=$(awk '/^Package: /{print $NF}' "$CONTROL_FILE")
|
||||||
|
DETECTED_VERSION=$(awk '/^Version: /{print $NF}' "$CONTROL_FILE")
|
||||||
|
|
||||||
|
# Version resolution: CLI arg > ENV var > .control version > default 0.1.0
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
VERSION="$1"
|
||||||
|
elif [ -n "$PACKAGE_VERSION" ]; then
|
||||||
|
VERSION="$PACKAGE_VERSION"
|
||||||
|
elif [ -n "$VERSION" ]; then
|
||||||
|
VERSION="$VERSION"
|
||||||
|
elif [ "$DETECTED_VERSION" != "{VERSION}" ] && [ -n "$DETECTED_VERSION" ]; then
|
||||||
|
VERSION="$DETECTED_VERSION"
|
||||||
|
else
|
||||||
|
VERSION="0.1.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$PKG_ROOT"
|
||||||
|
|
||||||
|
TARGET_BIN="packaging/$PACKAGE_NAME/usr/bin/jellyfin-kiosk"
|
||||||
|
mkdir -p "packaging/$PACKAGE_NAME/usr/bin"
|
||||||
|
mkdir -p "packaging/$PACKAGE_NAME/etc/jellyfin-client"
|
||||||
|
mkdir -p "packaging/$PACKAGE_NAME/usr/lib/systemd/system"
|
||||||
|
|
||||||
|
RELEASE_BIN="$CLUSTER_ROOT/jellyfin-client/jellyfin-kiosk-rs/target/release/jellyfin-kiosk-rs"
|
||||||
|
if [ -f "$RELEASE_BIN" ]; then
|
||||||
|
echo "Copying compiled binary from $RELEASE_BIN to $TARGET_BIN..."
|
||||||
|
cp -f "$RELEASE_BIN" "$TARGET_BIN"
|
||||||
|
strip -s "$TARGET_BIN" 2>/dev/null || true
|
||||||
|
elif [ ! -f "$TARGET_BIN" ]; then
|
||||||
|
echo "Error: Binary not found at $RELEASE_BIN or $TARGET_BIN" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy config example if available
|
||||||
|
if [ -f "$CLUSTER_ROOT/jellyfin-client/config.yaml" ]; then
|
||||||
|
cp -f "$CLUSTER_ROOT/jellyfin-client/config.yaml" "packaging/$PACKAGE_NAME/etc/jellyfin-client/config.example.yaml"
|
||||||
|
elif [ -f "$CLUSTER_ROOT/jellyfin-client/config.example.yaml" ]; then
|
||||||
|
cp -f "$CLUSTER_ROOT/jellyfin-client/config.example.yaml" "packaging/$PACKAGE_NAME/etc/jellyfin-client/config.example.yaml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "packaging/$PACKAGE_NAME/DEBIAN"
|
||||||
|
sed "s/{VERSION}/${VERSION}/" "$CONTROL_FILE" > "packaging/$PACKAGE_NAME/DEBIAN/control"
|
||||||
|
|
||||||
|
ARCH=$(awk '/^Architecture: /{print $NF}' "packaging/$PACKAGE_NAME/DEBIAN/control")
|
||||||
|
ARCH="${ARCH:-amd64}"
|
||||||
|
DEB_FILENAME="${PACKAGE_NAME}-${VERSION}_${ARCH}.deb"
|
||||||
|
|
||||||
|
echo "Building package: $PACKAGE_NAME ($VERSION) [$ARCH] -> $DEB_FILENAME"
|
||||||
|
|
||||||
|
# Ensure correct Debian directory permissions
|
||||||
|
find "packaging/$PACKAGE_NAME" -type d -exec chmod 755 {} +
|
||||||
|
find "packaging/$PACKAGE_NAME" -type f -exec chmod 644 {} +
|
||||||
|
find "packaging/$PACKAGE_NAME/usr/bin" -type f -exec chmod 755 {} + 2>/dev/null || true
|
||||||
|
find "packaging/$PACKAGE_NAME/DEBIAN" -type f -exec chmod 755 {} + 2>/dev/null || true
|
||||||
|
chmod 644 "packaging/$PACKAGE_NAME/DEBIAN/control" 2>/dev/null || true
|
||||||
|
if [ -f "packaging/$PACKAGE_NAME/DEBIAN/conffiles" ]; then
|
||||||
|
chmod 644 "packaging/$PACKAGE_NAME/DEBIAN/conffiles"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build debian binary package
|
||||||
|
dpkg-deb --build "packaging/$PACKAGE_NAME" "$DEB_FILENAME"
|
||||||
|
|
||||||
|
# Cleanup temporary control file
|
||||||
|
rm -f "packaging/$PACKAGE_NAME/DEBIAN/control"
|
||||||
|
echo "Succesvol gebouwd: $DEB_FILENAME"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
Package: jellyfin-kiosk
|
||||||
|
Version: 0.1.1
|
||||||
|
Section: video
|
||||||
|
Maintainer: Bart Meijer <bart@bnhmeijer.nl>
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: libmpv2, mpv, yt-dlp
|
||||||
|
Description: Native Jellyfin HTPC Kiosk client with Yatse and YouTube support
|
||||||
|
High-performance Rust GUI client for Jellyfin, featuring hardware-accelerated
|
||||||
|
MPV playback, Yatse Kodi JSON-RPC & EventServer emulation, YouTube sharing receiver,
|
||||||
|
and TV-friendly interface.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/etc/jellyfin-client/config.example.yaml
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
mkdir -p /etc/jellyfin-client
|
||||||
|
if [ ! -f /etc/jellyfin-client/config.yaml ] && [ -f /etc/jellyfin-client/config.example.yaml ]; then
|
||||||
|
cp /etc/jellyfin-client/config.example.yaml /etc/jellyfin-client/config.yaml
|
||||||
|
chmod 644 /etc/jellyfin-client/config.yaml 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
systemctl daemon-reload || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -d /run/systemd/system ]; then
|
||||||
|
systemctl daemon-reload || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
# Jellyfin HTPC Client Configuration
|
||||||
|
|
||||||
|
jellyfin:
|
||||||
|
# Base URL of your Jellyfin server (can be internal IP or external domain with HTTPS)
|
||||||
|
server_url: "http://10.2.0.4:8096/jellyfin"
|
||||||
|
# Login credentials
|
||||||
|
|
||||||
|
username: "bart"
|
||||||
|
password: "8x5yPgAa"
|
||||||
|
# Device identification
|
||||||
|
client_name: "Jellyfin HTPC Client"
|
||||||
|
device_name: "HTPC Living Room"
|
||||||
|
device_id: "htpc-living-room-01"
|
||||||
|
|
||||||
|
player:
|
||||||
|
# Path to mpv binary
|
||||||
|
mpv_path: "mpv"
|
||||||
|
# MPV IPC socket location
|
||||||
|
ipc_socket: "/tmp/mpv-jellyfin.sock"
|
||||||
|
# Video output & hardware decoding
|
||||||
|
# Options for hwdec: auto, vaapi (Intel/AMD), nvdec (Nvidia), no
|
||||||
|
hwdec: "auto"
|
||||||
|
vo: "gpu"
|
||||||
|
fullscreen: false
|
||||||
|
# Audio device (use `mpv --audio-device=help` to list devices)
|
||||||
|
audio_device: "auto"
|
||||||
|
# Custom MPV arguments
|
||||||
|
extra_args:
|
||||||
|
- "--keep-open=yes"
|
||||||
|
- "--force-window=immediate"
|
||||||
|
- "--osd-font=sans-serif"
|
||||||
|
- "--osd-font-size=28"
|
||||||
|
|
||||||
|
kodi_rpc:
|
||||||
|
# Emulated Kodi JSON-RPC interface for Yatse and other Kodi remotes
|
||||||
|
enabled: true
|
||||||
|
http_port: 8080
|
||||||
|
ws_port: 9090
|
||||||
|
|
||||||
|
web_api:
|
||||||
|
# Direct REST API and web sharing page
|
||||||
|
enabled: true
|
||||||
|
host: "0.0.0.0"
|
||||||
|
port: 8097
|
||||||
|
|
||||||
|
youtube:
|
||||||
|
# Maximum resolution preference for YouTube streaming via yt-dlp
|
||||||
|
max_height: 1080
|
||||||
|
# Automatically extract metadata (title, uploader) using yt-dlp before playback
|
||||||
|
fetch_metadata: true
|
||||||
|
# Google OAuth 2.0 Client ID (Google Cloud Console -> APIs -> Credentials, type: TVs and Limited Input / Desktop)
|
||||||
|
client_id: "612788493042-0070gm71evodaajv02tcl9kjtk9s76au.apps.googleusercontent.com"
|
||||||
|
client_secret: "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"
|
||||||
|
# Pad voor het opslaan van de ingelogde YouTube sessie
|
||||||
|
token_path: "youtube_token.json"
|
||||||
|
|
||||||
|
mqtt:
|
||||||
|
# Enable MQTT client and Home Assistant auto-discovery
|
||||||
|
enabled: false
|
||||||
|
# MQTT broker host/IP
|
||||||
|
host: "10.2.0.4"
|
||||||
|
port: 1883
|
||||||
|
username: ""
|
||||||
|
password: ""
|
||||||
|
# Home Assistant MQTT discovery prefix (default: homeassistant)
|
||||||
|
discovery_prefix: "homeassistant"
|
||||||
|
# Base topic prefix for state updates and commands
|
||||||
|
topic_prefix: "jellyfin-kiosk"
|
||||||
Binary file not shown.
+18
@@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Jellyfin HTPC Kiosk & YouTube Receiver
|
||||||
|
After=network-online.target sound.target graphical-session.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=bart
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
Environment=WAYLAND_DISPLAY=wayland-0
|
||||||
|
ExecStart=/usr/bin/jellyfin-kiosk
|
||||||
|
WorkingDirectory=/home/bart
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3s
|
||||||
|
LimitNOFILE=65536
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
Binary file not shown.
Reference in New Issue
Block a user