Files
netflex/package.sh
2026-10-25 14:01:47 +01:00

29 lines
973 B
Bash
Executable File

#!/usr/bin/env bash
# Builds the three store release assets into dist/: app.toml,
# support.bluefox.netflex-<version>.tar.zst and its .sig.
#
# SF_SIGNING_KEY=<base64 of key.pem> ./package.sh (CI)
# SF_SIGNING_KEY_FILE=key.pem ./package.sh (by hand)
#
# Runs inside a SmartFox checkout (this repo at apps/netflex-tv), on Debian
# trixie or older (the TV's glibc), with the GStreamer dev packages:
# libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
set -euo pipefail
cd "$(dirname "$0")"
cargo build --release --locked
target="${CARGO_TARGET_DIR:-target}"
rm -rf pkg dist
mkdir -p pkg/bin
cp app.toml icon.png pkg/
install -m755 "$target/release/netflex-tv" pkg/bin/netflex-tv
# sf-pack from PATH, else the one in the SmartFox checkout around us.
if command -v sf-pack >/dev/null; then
pack=(sf-pack)
else
pack=(cargo run -q --release --manifest-path ../../Cargo.toml -p sf-pack --)
fi
"${pack[@]}" build pkg dist
"${pack[@]}" verify dist