* Migrating primary build script to Python for maintainablity

* Created individual spec files per distro
* Created distro specific post install scripts (Debian/RHEL, Arch does not need one)
This commit is contained in:
2025-09-08 11:05:12 +08:00
committed by Jason Ross
parent 083f2a3f86
commit 8a5a7bf11f
9 changed files with 376 additions and 10 deletions
+4 -4
View File
@@ -7,16 +7,16 @@ poetry install
# Build using the Linux spec so the build is reproducible and uses the project spec
poetry run pyinstaller /home/jasonross/workspace/android_file_handler_adb/scripts/spec_scripts/android-file-handler-linux.spec --distpath dist
# Package into a Debian .deb using fpm
# Package into a Linux .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)
# explicit filename into dist/ (Linux .(binary type))
# 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
# Linux
# Prepare packaging layout in a separate directory to avoid clobbering build artifacts
PKG_DIR="pkg_dist"
rm -rf "$PKG_DIR"
@@ -56,7 +56,7 @@ StartupNotify=true
EOF
chmod 644 "$PKG_DIR/usr/share/applications/android-file-handler.desktop"
# Build the Debian package and include postinst script
# Build the Linux package and include postinst script
PKG_ITEMS=( "usr/local/bin/android-file-handler" "usr/share/applications/android-file-handler.desktop" )
if [ "$ICON_INCLUDED" = true ]; then
PKG_ITEMS+=( "usr/share/icons/hicolor/256x256/apps/android-file-handler.png" )