cleanup, automate variables, add MAKEFLAGS to build script
This commit is contained in:
parent
9c75621702
commit
20cca31c14
3 changed files with 20 additions and 30 deletions
2
.SRCINFO
2
.SRCINFO
|
@ -33,6 +33,6 @@ pkgbase = edgetx-companion
|
||||||
source = git+https://github.com/EdgeTX/edgetx.git#tag=v2.5.0
|
source = git+https://github.com/EdgeTX/edgetx.git#tag=v2.5.0
|
||||||
source = install.patch
|
source = install.patch
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = 36bf7c59adfe9221f8b03809e0ca0dc537328e239b2384829fb17290137e5005
|
sha256sums = f9b62f82f402ea96153a7e45ec22aeaa4780039d57b28cc8ca8456e05c34ffe7
|
||||||
|
|
||||||
pkgname = edgetx-companion
|
pkgname = edgetx-companion
|
||||||
|
|
31
PKGBUILD
31
PKGBUILD
|
@ -1,11 +1,9 @@
|
||||||
# Maintainer: lod <aur@cyber-anlage.de>
|
# Maintainer: lod <aur@cyber-anlage.de>
|
||||||
# Maintainer(opentx-version): Ysblokje <ysblokje at gmail dot com>
|
# Contributer: Ysblokje <ysblokje at gmail dot com>
|
||||||
# Previous Maintainer(opentx-version): Jeff Youdontneedtoknow <jeffpublicjr at gmail dot com>
|
# Contributer: Jeff Youdontneedtoknow <jeffpublicjr at gmail dot com>
|
||||||
# Contributer(opentx-version): Arnaud
|
# Contributer: Arnaud
|
||||||
|
|
||||||
_pkgbase=edgetx
|
pkgname=edgetx-companion
|
||||||
_version_suffix=25
|
|
||||||
pkgname=${_pkgbase}-companion
|
|
||||||
pkgver=2.5.0
|
pkgver=2.5.0
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="EEPROM Editor and Simulator for EdgeTX RC radio transmitter firmwares"
|
pkgdesc="EEPROM Editor and Simulator for EdgeTX RC radio transmitter firmwares"
|
||||||
|
@ -14,15 +12,18 @@ url='https://edgetx.org/'
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
depends=('hicolor-icon-theme' 'qt5-base' 'qt5-multimedia' 'sdl')
|
depends=('hicolor-icon-theme' 'qt5-base' 'qt5-multimedia' 'sdl')
|
||||||
optdepends=('dfu-util: tool for flashing stm32 based radios')
|
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' 'cmake' 'fox' 'gcc' 'git' 'python' 'python-pillow' 'python-pyqt5' 'qt5-svg' 'qt5-tools' 'qt5-translations' 'sed' 'xsd')
|
makedepends=('arm-none-eabi-binutils' 'arm-none-eabi-gcc' 'arm-none-eabi-newlib'
|
||||||
|
'avr-gcc' 'avr-libc' 'bc' 'cmake' 'fox' 'gcc' 'git' 'python'
|
||||||
|
'python-pillow' 'python-pyqt5' 'qt5-svg' 'qt5-tools' 'qt5-translations'
|
||||||
|
'sed' 'xsd')
|
||||||
provides=('companion')
|
provides=('companion')
|
||||||
conflicts=('companion')
|
conflicts=('companion')
|
||||||
|
_pkgbase=${pkgname%%-*}
|
||||||
|
_versuff=${pkgver/./} && _versuff=${_versuff%%.*}
|
||||||
source=("git+https://github.com/EdgeTX/edgetx.git#tag=v${pkgver}"
|
source=("git+https://github.com/EdgeTX/edgetx.git#tag=v${pkgver}"
|
||||||
"install.patch"
|
install.patch)
|
||||||
)
|
|
||||||
|
|
||||||
sha256sums=('SKIP'
|
sha256sums=('SKIP'
|
||||||
'36bf7c59adfe9221f8b03809e0ca0dc537328e239b2384829fb17290137e5005')
|
'f9b62f82f402ea96153a7e45ec22aeaa4780039d57b28cc8ca8456e05c34ffe7')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${_pkgbase}
|
cd ${_pkgbase}
|
||||||
|
@ -32,13 +33,13 @@ prepare() {
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd ${_pkgbase}
|
cd ${_pkgbase}
|
||||||
./tools/build-companion-nightly.sh ${srcdir}/${_pkgbase} ${srcdir}/build ${_version_suffix}
|
./tools/build-companion-nightly.sh ${MAKEFLAGS} ${srcdir}/${_pkgbase} ${srcdir}/build ${_versuff}
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd ${srcdir}/build
|
cd ${srcdir}/build
|
||||||
make -j`nproc` DESTDIR=${pkgdir}/ install
|
make DESTDIR=${pkgdir}/ install
|
||||||
cd ${pkgdir}/usr/share/applications
|
cd ${pkgdir}/usr/share/applications
|
||||||
sed -i -e 's/Categories=Application/Categories=Utility/' companion${_version_suffix}.desktop
|
sed -i -e 's/Categories=Application/Categories=Utility/' companion${_versuff}.desktop
|
||||||
sed -i -e 's/Categories=Application/Categories=Utility/' simulator${_version_suffix}.desktop
|
sed -i -e 's/Categories=Application/Categories=Utility/' simulator${_versuff}.desktop
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,4 @@
|
||||||
@@ -4,7 +4,9 @@
|
@@ -30,7 +30,7 @@
|
||||||
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 +32,7 @@
|
|
||||||
SRCDIR=$1
|
SRCDIR=$1
|
||||||
OUTDIR=$2
|
OUTDIR=$2
|
||||||
|
|
||||||
|
@ -18,7 +7,7 @@
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
|
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
|
||||||
elif [ "$(uname)" != "Linux" ]; then
|
elif [ "$(uname)" != "Linux" ]; then
|
||||||
@@ -41,9 +43,9 @@
|
@@ -41,9 +41,9 @@
|
||||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DVERSION_SUFFIX=$3"
|
COMMON_OPTIONS="${COMMON_OPTIONS} -DVERSION_SUFFIX=$3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -31,7 +20,7 @@
|
||||||
|
|
||||||
cmake ${COMMON_OPTIONS} -DPCB=X9LITE ${SRCDIR}
|
cmake ${COMMON_OPTIONS} -DPCB=X9LITE ${SRCDIR}
|
||||||
make -j${JOBS} libsimulator
|
make -j${JOBS} libsimulator
|
||||||
@@ -128,13 +130,3 @@
|
@@ -128,13 +128,3 @@
|
||||||
cmake ${COMMON_OPTIONS} -DPCB=X12S ${SRCDIR}
|
cmake ${COMMON_OPTIONS} -DPCB=X12S ${SRCDIR}
|
||||||
make -j${JOBS} libsimulator
|
make -j${JOBS} libsimulator
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue