Skip to content

Instantly share code, notes, and snippets.

@WoefulDerelict
Created February 8, 2023 03:20
VCS guideline compliant PKGBUILD for qFlipper
# Maintainer: L. Bradley LaBoon <me@bradleylaboon.com>
# Contributor: Llewelyn Trahaearn <WoefulDerelict [at] GMail [dot] com>
pkgname=qflipper-git
pkgver=1.3.0.rc1.r0.g6857416
pkgrel=1
pkgdesc="Desktop application for updating Flipper Zero firmware via PC"
url="https://flipperzero.one/update"
license=('GPL3')
arch=('x86_64')
depends=('libusb' 'qt6-5compat' 'qt6-quickcontrols2' 'qt6-serialport' 'qt6-svg')
makedepends=('git' 'qt6-tools')
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=(${pkgname%-*}::git+https://github.com/flipperdevices/qFlipper
libwdi::git+https://github.com/pbatard/libwdi
nanopb::git+https://github.com/nanopb/nanopb)
sha256sums=('SKIP'
'SKIP'
'SKIP')
prepare() {
cd ${pkgname%-*}
git submodule init
git config submodule.driver-tool/libwdi.url "$srcdir/libwdi"
git config submodule.3rdparty/nanopb.url "$srcdir/nanopb"
git -c protocol.file.allow=always submodule update
}
pkgver() {
cd ${pkgname%-*}
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
mkdir -p ${pkgname%-*}/build
cd ${pkgname%-*}/build
qmake6 ../qFlipper.pro -spec linux-g++ CONFIG+=qtquickcompiler DEFINES+=DISABLE_APPLICATION_UPDATES PREFIX=/usr
make qmake_all
make
}
package() {
make -C ${pkgname%-*}/build INSTALL_ROOT="${pkgdir}" install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment