summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e21b55243cf4df1923fa2378bbf1a2afe7801b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Maintainer: isaacify (isaac@bingoisaac.dev)

_pkgname="qflipper"
pkgname="$_pkgname-momentum-git"
pkgver=1.3.3.r7.g25691ce
pkgrel=1
pkgdesc="Desktop qFlipper app configured with Momentum Firmware update server"
license=('GPL3')
arch=('x86_64')
depends=(
  'libusb'
  'qt6-5compat'
  'qt6-declarative'
  'qt6-serialport'
  'qt6-svg'
)
makedepends=(
  'git'
  'qt6-tools'
)
source=(
  "libwdi"::"git+https://github.com/pbatard/libwdi"
  "nanopb"::"git+https://github.com/nanopb/nanopb"
  "$_pkgname"::"git+https://github.com/Next-Flip/qFlipper"
)
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
  
  sed -i 's/dialout/uucp/g' installer-assets/udev/42-flipperzero.rules
}

build() {
  local _qmake_options=(
    ../qFlipper.pro
    -spec linux-g++
    CONFIG+=qtquickcompiler
    DEFINES+=DISABLE_APPLICATION_UPDATES
    PREFIX=/usr
  )

  mkdir -p "$_pkgname/build"
  cd "$_pkgname/build"

  qmake6 "${_qmake_options[@]}"
  make qmake_all
  make
}

package() {
  make -C "$_pkgname/build" INSTALL_ROOT="$pkgdir" install
}