add linux local build script

This commit is contained in:
2025-08-26 14:56:35 -05:00
parent d654453a2f
commit d8b6bafc38
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
set -euo pipefail
poetry lock
poetry install
# Build using the Linux spec so the build is reproducible and uses the project spec
poetry run pyinstaller scripts/spec_scripts/android-file-handler-linux.spec --distpath dist
# Package into a Debian .deb using fpm
export PATH="$HOME/.local/bin:/usr/local/bin:$PATH"
VERSION="$(poetry version -s)"
mkdir -p dist
chmod +x dist/android-file-handler
# explicit filename into dist/ (Debian .deb)
# change directory into dist and package the binary named 'android-file-handler'
# this ensures the package installs /usr/local/bin/android-file-handler (no extra dist/ prefix)
# Debian
fpm -s dir -t deb -n android-file-handler -v "$VERSION" \
--architecture amd64 --prefix /usr/local/bin --deb-user root --deb-group root \
-p "dist/android-file-handler_${VERSION}_amd64.deb" -C dist android-file-handler