commit 4137e7f7dbaff7f28694eb03b4bd7db771f27b07 Author: horstderheld Date: Fri Nov 5 17:51:09 2021 +0100 initial commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..a082081 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = edgetx-companion + pkgdesc = EEPROM Editor for EdgeTX RC transmitter firmwares + pkgver = 2.5.0 + pkgrel = 1 + url = https://edgetx.org/ + arch = x86_64 + license = GPL-2.0 + makedepends = cmake + makedepends = gcc + makedepends = git + makedepends = xsd + makedepends = bc + makedepends = python + makedepends = avr-gcc + makedepends = avr-libc + makedepends = sed + makedepends = qt5-tools + makedepends = python-pyqt5 + makedepends = arm-none-eabi-gcc + makedepends = arm-none-eabi-binutils + makedepends = arm-none-eabi-newlib + makedepends = fox + makedepends = python-pillow + depends = qt5-base + depends = qt5-multimedia + depends = sdl + depends = hicolor-icon-theme + optdepends = dfu-util: tool for flashing stm32 based radios + provides = companion + conflicts = companion + source = git+https://github.com/EdgeTX/edgetx.git#tag=v2.5.0 + source = install.patch + sha256sums = SKIP + sha256sums = f156dfd0800251ea78ff01fb32704e5a5a826360d3f2da57b7d877521ba61a45 + +pkgname = edgetx-companion diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..e2f73c6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: lod +# Maintainer(opentx-version): Ysblokje +# Previous Maintainer(opentx-version): Jeff Youdontneedtoknow +# Contributer(opentx-version): Arnaud + +_pkgbase=edgetx +_version_suffix=25 +pkgname=${_pkgbase}-companion +pkgver=2.5.0 +pkgrel=1 +pkgdesc="EEPROM Editor for EdgeTX RC transmitter firmwares" +arch=('x86_64') +url='https://edgetx.org/' +license=('GPL-2.0') +depends=('qt5-base' 'qt5-multimedia' 'sdl' 'hicolor-icon-theme') +optdepends=('dfu-util: tool for flashing stm32 based radios') +makedepends=('cmake' 'gcc' 'git' 'xsd' 'bc' 'python' 'avr-gcc' 'avr-libc' 'sed' 'qt5-tools' 'python-pyqt5' 'arm-none-eabi-gcc' 'arm-none-eabi-binutils' 'arm-none-eabi-newlib' 'fox' 'python-pillow') +provides=('companion') +conflicts=('companion') +source=("git+https://github.com/EdgeTX/edgetx.git#tag=v${pkgver}" + "install.patch" + +) +sha256sums=('SKIP' + 'f156dfd0800251ea78ff01fb32704e5a5a826360d3f2da57b7d877521ba61a45') + +prepare() { + cd ${_pkgbase} + patch ./tools/build-companion-nightly.sh < ${srcdir}/install.patch + git submodule update --init --recursive +} + +build() { + cd ${_pkgbase} + ./tools/build-companion-nightly.sh ${srcdir}/${_pkgbase} ${srcdir}/build ${_version_suffix} +} + +package() { + cd ${srcdir}/build + make -j`nproc` DESTDIR=${pkgdir}/ install + cd ${pkgdir}/usr/share/applications + sed -i -e 's/Categories=Application/Categories=Development;/' companion${_version_suffix}.desktop + sed -i -e 's/Categories=Application/Categories=Development;/' simulator${_version_suffix}.desktop +} + diff --git a/install.patch b/install.patch new file mode 100644 index 0000000..f8d5ec1 --- /dev/null +++ b/install.patch @@ -0,0 +1,48 @@ +@@ -4,7 +4,10 @@ + set -e + set -x + +-if [ "$(uname)" = "Darwin" ]; then ++if [[ ! -z "MAKEFLAGS" ]] ++then ++ JOBS="${MAKEFLAGS:2}" ++elif [ "$(uname)" = "Darwin" ]; then + num_cpus=$(sysctl -n hw.ncpu) + : "${JOBS:=$num_cpus}" + else +@@ -30,7 +33,7 @@ + SRCDIR=$1 + OUTDIR=$2 + +-COMMON_OPTIONS="-DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" ++COMMON_OPTIONS="-DCMAKE_INSTALL_PREFIX=/usr -DGVARS=YES -DHELI=YES -DLUA=YES -Wno-dev -DCMAKE_BUILD_TYPE=Release" + if [ "$(uname)" = "Darwin" ]; then + COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'" + elif [ "$(uname)" != "Linux" ]; then +@@ -41,9 +44,9 @@ + COMMON_OPTIONS="${COMMON_OPTIONS} -DVERSION_SUFFIX=$3" + fi + +-rm -rf build +-mkdir build +-cd build ++rm -rf ${OUTDIR} ++mkdir ${OUTDIR} ++cd ${OUTDIR} + + cmake ${COMMON_OPTIONS} -DPCB=X9LITE ${SRCDIR} + make -j${JOBS} libsimulator +@@ -128,13 +131,3 @@ + cmake ${COMMON_OPTIONS} -DPCB=X12S ${SRCDIR} + make -j${JOBS} libsimulator + +-if [ "$(uname)" = "Darwin" ]; then +- make -j${JOBS} package +- cp *.dmg ${OUTDIR} +-elif [ "$(uname)" = "Linux" ]; then +- make -j${JOBS} package +- cp *.AppImage ${OUTDIR} +-else +- make installer +- cp companion/*.exe ${OUTDIR} +-fi