Skip to content

Instantly share code, notes, and snippets.

@ssorgatem
Created May 23, 2024 08:03
Show Gist options
  • Save ssorgatem/fa54f5ef994f5b7a6001cc9863ddf774 to your computer and use it in GitHub Desktop.
Save ssorgatem/fa54f5ef994f5b7a6001cc9863ddf774 to your computer and use it in GitHub Desktop.
PixelFLasher as a system python app rather than a Pyinstaller binary
diff --git a/PKGBUILD b/PKGBUILD
index 34d4808..bcfc808 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=pixelflasher
pkgver=6.9.5.0
-pkgrel=1
+pkgrel=2
pkgdesc="Pixel phone flashing GUI utility with features."
arch=('x86_64')
url="https://github.com/badabing2005/PixelFlasher"
@@ -19,16 +19,13 @@ depends=(
'python-pyperclip'
'python-rsa'
'zlib'
-)
-makedepends=(
- 'pyinstaller'
- 'python-darkdetect'
'python-httplib2'
'python-markdown'
'python-protobuf'
'python-requests'
'python-six'
'python-wxpython'
+ 'python-darkdetect'
)
optdepends=(
'android-tools: Use system platform tools'
@@ -40,14 +37,16 @@ source=("PixelFlasher-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
sha256sums=('683512df9d369ec106ca8fe6a1915d9317c757943ff8129594f2910ed882f6de'
'3f503e3e3b819562669e1d0a8a25043c478c8c1709b376642fd678caf3d8ee34')
-build() {
- cd "PixelFlasher-$pkgver"
- pyinstaller --noconfirm build-on-linux.spec
-}
-
package() {
cd "PixelFlasher-$pkgver"
- install -Dm755 dist/PixelFlasher -t "$pkgdir/usr/bin/"
+ for f in *.py *.json *.pem; do
+ install -Dm755 $f -t "$pkgdir/usr/lib/pixelflasher"
+ done
+ install -Dm755 bin/* -t "$pkgdir/usr/lib/pixelflasher/bin/"
+ install -D images/*.* -t "$pkgdir/usr/lib/pixelflasher/images/"
+ install -D images/pif/*.* -t "$pkgdir/usr/lib/pixelflasher/images/pif"
+ mkdir "$pkgdir/usr/bin/"
+ ln -s /usr/lib/pixelflasher/PixelFlasher.py "$pkgdir/usr/bin/PixelFlasher"
for i in 64 128 256; do
install -Dm644 "images/icon-${i}.png" \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment