Compare commits

..

3 commits

View file

@ -19,8 +19,6 @@ makedepends=('arm-none-eabi-binutils' 'arm-none-eabi-gcc' 'arm-none-eabi-newlib'
options=('!debug')
provides=('companion')
conflicts=('companion')
_pkgbase=${pkgname%%-*}
_versuff=${pkgver/./} && _versuff=${_versuff%%.*}
source=("git+https://github.com/EdgeTX/edgetx.git#tag=v$pkgver"
"git+https://github.com/jbeder/yaml-cpp.git"
"git+https://github.com/raphaelcoeffic/AccessDenied.git"
@ -45,6 +43,8 @@ b2sums=('SKIP'
'6ad8cfff9f623c1d0182713839419b633f421e762d01cd46b2ce817c1552929d9ffadcb38f112d6ac9d3d196346b781d842ad0d9c34d4dbe0d5709a3edbc6026')
prepare() {
_pkgbase=$srcdir/${pkgname%%-*}
export EDGETX_VERSION_TAG=$pkgver
cd $_pkgbase
@ -52,40 +52,29 @@ prepare() {
patch ./tools/build-companion.sh < $srcdir/install.patch
patch ./companion/src/CMakeLists.txt < $srcdir/remove-ssl-check.patch
cd $srcdir/$_pkgbase/companion/src/thirdparty/
git submodule init
git config submodule.yaml-cpp.url $srcdir/yaml-cpp
git submodule update --init
declare -A submodules=(
["$_pkgbase/companion/src/thirdparty/"]="yaml-cpp"
["$_pkgbase/radio/src/thirdparty/"]="AccessDenied FreeRTOS-Kernel libopenui"
["$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/"]="FreeRTOS-Kernel-Community-Supported-Ports FreeRTOS-Kernel-Partner-Supported-Ports"
["$_pkgbase/radio/src/thirdparty/libopenui/thirdparty/"]="lvgl stb"
)
cd $srcdir/$_pkgbase/radio/src/thirdparty/
git submodule init
git config submodule.AccessDenied.url $srcdir/AccessDenied
git config submodule.FreeRTOS-Kernel.url $srcdir/FreeRTOS
git config submodule.libopenui.url $srcdir/libopenui
git submodule update --init
cd $srcdir/$_pkgbase/radio/src/thirdparty/FreeRTOS/portable/ThirdParty/
git submodule init
git config submodule.FreeRTOS-Kernel-Community-Supported-Ports.url $srcdir/Community-Supported-Ports
git config submodule.FreeRTOS-Kernel-Partner-Supported-Ports.url $srcdir/FreeRTOS-Kernel-Partner-Supported-Ports
git submodule update --init
cd $srcdir/$_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
for path in "${!submodules[@]}"; do
cd $path
git submodule init
for module in ${submodules[$path]}; do
git config submodule.$module.url $srcdir/$module
done
git submodule update --init
done
}
build() {
cd $_pkgbase
./tools/build-companion.sh $MAKEFLAGS $srcdir/$_pkgbase $srcdir/build $_versuff
./tools/build-companion.sh $MAKEFLAGS $_pkgbase $srcdir/build
}
package() {
cd $srcdir/build/native
make DESTDIR=$pkgdir/ install
cd $pkgdir/usr/share/applications
sed -i -e 's/Categories=Application/Categories=Utility/' companion$_versuff.desktop
sed -i -e 's/Categories=Application/Categories=Utility/' simulator$_versuff.desktop
}