summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 116ed86a91785d6d078dc2b6bdfbd95d10503292 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer: lod <aur@cyber-anlage.de>
# Contributer: Ysblokje <ysblokje at gmail dot com>
# Contributer: Jeff Youdontneedtoknow <jeffpublicjr at gmail dot com>
# Contributer: Arnaud

pkgname=edgetx-companion
pkgver=2.10.6
pkgrel=1
pkgdesc="EEPROM Editor and Simulator for EdgeTX RC radio transmitter firmwares"
arch=('x86_64')
url='https://edgetx.org/'
license=('GPL-2.0-only')
depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'qt5-base' 'qt5-multimedia' 'sdl2')
optdepends=('dfu-util: tool for flashing stm32 based radios')
makedepends=('arm-none-eabi-binutils' 'arm-none-eabi-gcc' 'arm-none-eabi-newlib'
             'avr-gcc' 'avr-libc' 'bc' 'clang' 'cmake' 'fox' 'gcc' 'git' 'icu' 'python'
             'python-jinja' 'python-lz4' 'python-pillow' 'python-pyqt5' 'qt5-svg'
             'qt5-tools' 'qt5-translations' 'sed' 'xsd')
options=('!debug')
provides=('companion')
conflicts=('companion')
source=("git+https://github.com/EdgeTX/edgetx.git#tag=v$pkgver"
        "git+https://github.com/raphaelcoeffic/AccessDenied.git"
        "git+https://github.com/FreeRTOS/FreeRTOS-Kernel.git"
        "git+https://github.com/adfernandes/segger-rtt.git"
        "git+https://github.com/FreeRTOS/FreeRTOS-Kernel-Community-Supported-Ports.git"
        "git+https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports.git"
        "git+https://github.com/EdgeTX/lvgl.git"
        "git+https://github.com/nothings/stb.git"
        install.patch)
b2sums=('df729e121cb29e2bc0976a57b8071172a978aef0f0b44d2d4a58967fccf920a076ae03b6a552a777e3a8e3c517d21148cb12445a60003c29cde334d7345ffce6'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        'SKIP'
        '97badff74d64db444a780f48a3003e4a7232e7c0ab1ef43f9adbf20044c988f41dd455dc5aad548e5d3501ccc7a1ad9967a69bf43cbd2bb133eb6d00d50f210c')

prepare() {
  export EDGETX_VERSION_TAG=$pkgver
  _pkgbase=$srcdir/${pkgname%%-*}
  cd $_pkgbase
   
  patch ./tools/build-companion.sh < $srcdir/install.patch

  # Deactivate these functions; they bundle the libs for AppImage.
  for pattern in "LIBSSL1" "LIBUSB1" "DFU_UTIL"; do
      sed -i "s/if(${pattern}_FOUND)/if(false)/g" ./companion/src/CMakeLists.txt
  done
  
  cd "$_pkgbase/radio/src/thirdparty/"
  git submodule init
  git config submodule.AccessDenied.url $srcdir/AccessDenied
  git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS-Kernel
  git config submodule.Segger_RTT.url $srcdir/Segger_RTT
  git submodule update --init

  cd "$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/"
  git submodule init
  git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Community-Supported-Ports
  git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Partner-Supported-Ports
  git submodule update --init

  cd "$_pkgbase/radio/src/thirdparty/libopenui/thirdparty/"
  git submodule init
  git config submodule.lvgl.url $srcdir/lvgl
  git config submodule.stb.url $srcdir/stb
  git submodule update --init
}

build() {
  cd $srcdir/edgetx
  ./tools/build-companion.sh $MAKEFLAGS $srcdir/edgetx $srcdir/build
}

package() {
  cd $srcdir/build/native
  make DESTDIR=$pkgdir/ install
}