summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKye Morton2019-04-18 18:57:50 +1000
committerKye Morton2019-04-18 18:57:50 +1000
commite2a31863e51857ee4a8a03c911fe2347cca6bea3 (patch)
tree988fb5d66fbbba9c0d7323cf533663291d17fb1b
parent3dbc8afc6771ff18a940a2abb772cd09d3feb887 (diff)
downloadaur-e2a31863e51857ee4a8a03c911fe2347cca6bea3.tar.gz
Switched to source build, and included upstream patch to fix hardlink to libraries
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD82
-rw-r--r--qgroundcontrol-3.5.0.patch18
3 files changed, 102 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 44bdf6f1c94..037a56e9d20 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,12 @@
pkgbase = qgroundcontrol
- pkgdesc = Ground control for unmanned vehicles.
+ pkgdesc = Micro air vehicle ground control station.
pkgver = 3.5.0
- pkgrel = 1
+ pkgrel = 2
url = http://qgroundcontrol.org/
- arch = any
+ arch = x86_64
license = GPL3
+ makedepends = git
+ makedepends = qt5-base
depends = bzip2
depends = dbus
depends = flac
@@ -28,8 +30,20 @@ pkgbase = qgroundcontrol
depends = sdl2
depends = xz
depends = zlib
- source = qgroundcontrol-3.5.0-1::https://github.com/mavlink/qgroundcontrol/releases/download/v3.5.0/qgroundcontrol.tar.bz2
- sha256sums = fc2bed2d25a44b2848e7c836779d9cc7746d4c8eb884971b1c5e92699858e1ca
+ depends = qt5-speech
+ depends = qt5-multimedia
+ depends = qt5-serialport
+ depends = qt5-charts
+ depends = qt5-quickcontrols
+ depends = qt5-quickcontrols2
+ source = qgroundcontrol-3.5.0.tar.gz::https://github.com/mavlink/qgroundcontrol/archive/v3.5.0.tar.gz
+ source = mavlink-v2.0-qgc3.5.0.zip::https://github.com/mavlink/c_library_v2/archive/e302e1b735e47e9d33c3bad579dd7c6c089c1bb3.zip
+ source = gps-drivers-qgc3.5.0.zip::https://github.com/PX4/GpsDrivers/archive/2a4865adc3808687d6c6f550f497a02eb920c382.zip
+ source = qgroundcontrol-3.5.0.patch
+ sha256sums = e3657f8ba6f88019a42a2fdbd735931c7463143e068352868ae60146c5434ae2
+ sha256sums = f7afee4aa96b8eac0a039fe62c2bff19a9a962e94a32a43b7c2211e589b85a10
+ sha256sums = 1ab58c633edcfff9288bd868bf33e2c9990afa27fa5df8f1731675d98a4ce6e4
+ sha256sums = 188b71bf75c61f0463da180b45663d5057118008d97b05a53fe620a6a3a207ae
pkgname = qgroundcontrol
diff --git a/PKGBUILD b/PKGBUILD
index 31e47875147..3ae33c84e62 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,10 @@
-# Maintainer: Kye Morton <pryre.dev@outlook.com>
+# Maintainer: K. Morton <pryre.dev@outlook.com>
+# Contributor: Anselmo L. S. Melo <anselmo.melo@intel.com>
pkgname=qgroundcontrol
pkgver=3.5.0
-pkgrel=1
-pkgdesc="Ground control for unmanned vehicles."
-arch=('any')
+pkgrel=2
+pkgdesc="Micro air vehicle ground control station."
+arch=('x86_64')
url="http://qgroundcontrol.org/"
license=('GPL3')
depends=( 'bzip2' \
@@ -28,28 +29,75 @@ depends=( 'bzip2' \
'pcre' \
'sdl2' \
'xz' \
- 'zlib')
+ 'zlib' \
+ 'qt5-speech' \
+ 'qt5-multimedia' \
+ 'qt5-serialport' \
+ 'qt5-charts' \
+ 'qt5-quickcontrols' \
+ 'qt5-quickcontrols2' \
+)
+
+makedepends=('git' 'qt5-base')
-source=('qgroundcontrol-'${pkgver}'-'${pkgrel}'::https://github.com/mavlink/qgroundcontrol/releases/download/v'${pkgver}'/qgroundcontrol.tar.bz2')
-sha256sums=('fc2bed2d25a44b2848e7c836779d9cc7746d4c8eb884971b1c5e92699858e1ca')
+#TODO: Download source release instead
+#TODO: Figure out which releases should be used for Mavlink and GPS
+source=("qgroundcontrol-${pkgver}.tar.gz::https://github.com/mavlink/qgroundcontrol/archive/v${pkgver}.tar.gz" \
+ "mavlink-v2.0-qgc${pkgver}.zip::https://github.com/mavlink/c_library_v2/archive/e302e1b735e47e9d33c3bad579dd7c6c089c1bb3.zip" \
+ "gps-drivers-qgc${pkgver}.zip::https://github.com/PX4/GpsDrivers/archive/2a4865adc3808687d6c6f550f497a02eb920c382.zip" \
+ "${pkgname}-${pkgver}.patch")
+sha256sums=('e3657f8ba6f88019a42a2fdbd735931c7463143e068352868ae60146c5434ae2' \
+ 'f7afee4aa96b8eac0a039fe62c2bff19a9a962e94a32a43b7c2211e589b85a10' \
+ '1ab58c633edcfff9288bd868bf33e2c9990afa27fa5df8f1731675d98a4ce6e4' \
+ '188b71bf75c61f0463da180b45663d5057118008d97b05a53fe620a6a3a207ae')
+
+prepare() {
+ mavlinkdir='c_library_v2-e302e1b735e47e9d33c3bad579dd7c6c089c1bb3'
+ gpsdir='GpsDrivers-2a4865adc3808687d6c6f550f497a02eb920c382'
+
+ mkdir -p "${srcdir}/${pkgname}-${pkgver}/build"
+
+ # Copy in the mavlink source
+ rm -r "${srcdir}/${pkgname}-${pkgver}/libs/mavlink/include/mavlink/v2.0"
+ cp -R "${srcdir}/${mavlinkdir}" "${srcdir}/${pkgname}-${pkgver}/libs/mavlink/include/mavlink/"
+ mv "${srcdir}/${pkgname}-${pkgver}/libs/mavlink/include/mavlink/${mavlinkdir}" "${srcdir}/${pkgname}-${pkgver}/libs/mavlink/include/mavlink/v2.0"
+ # Copy in the GPS source
+ rm -r "${srcdir}/${pkgname}-${pkgver}/src/GPS/Drivers"
+ cp -R "${srcdir}/${gpsdir}" "${srcdir}/${pkgname}-${pkgver}/src/GPS/"
+ mv "${srcdir}/${pkgname}-${pkgver}/src/GPS/${gpsdir}" "${srcdir}/${pkgname}-${pkgver}/src/GPS/Drivers"
+
+ cd "${srcdir}/${pkgname}-${pkgver}/"
+ patch --strip=1 < "${srcdir}/${pkgname}-${pkgver}.patch"
+}
build() {
- echo "[Desktop Entry]
+ cd "$srcdir/${pkgname}-${pkgver}/build"
+ qmake ../qgroundcontrol.pro
+ make
+
+ echo "[Desktop Entry]
Type=Application
-Name=QGroundControl
+Name=QGroundControl Release
Comment=Ground control for unmanned vehicles
-Path=/opt/qgroundcontrol/
-Exec=/usr/bin/qgroundcontrol
-Icon=/opt/qgroundcontrol/qgroundcontrol.png
+Path=/opt/${pkgname}/
+Exec=/usr/bin/${pkgname}
+Icon=/opt/${pkgname}/qgroundcontrol.png
Terminal=false
-Categories=Qt;Utility;" > "$srcdir/${pkgname}/qgroundcontrol.desktop"
+Categories=Qt;Utility;" > "$srcdir/${pkgname}.desktop"
}
package() {
- mkdir -p "${pkgdir}/opt" "${pkgdir}/usr/bin" "${pkgdir}/usr/share/applications"
- cp -R "$srcdir/${pkgname}" "${pkgdir}/opt/qgroundcontrol"
- ln -s "/opt/qgroundcontrol/qgroundcontrol-start.sh" "${pkgdir}/usr/bin/qgroundcontrol"
- ln -s "/opt/qgroundcontrol/qgroundcontrol.desktop" "${pkgdir}/usr/share/applications/qgroundcontrol.desktop"
+ mkdir -p "${pkgdir}/opt" "${pkgdir}/usr/bin" "${pkgdir}/usr/share/applications"
+ cp -R "${srcdir}/${pkgname}-${pkgver}/build/release" "${pkgdir}/opt/${pkgname}"
+ cp "${srcdir}/${pkgname}-${pkgver}/resources/icons/qgroundcontrol.png" "${pkgdir}/opt/${pkgname}"
+ cp "${srcdir}/${pkgname}-${pkgver}/deploy/qgroundcontrol-start.sh" "${pkgdir}/opt/${pkgname}"
+
+ # Remove the default one as we want to use our own desktop file
+ rm "${pkgdir}/opt/${pkgname}/${pkgname}.desktop"
+ cp "${srcdir}/${pkgname}.desktop" "${pkgdir}/opt/${pkgname}"
+
+ ln -s "/opt/${pkgname}/qgroundcontrol-start.sh" "${pkgdir}/usr/bin/${pkgname}"
+ ln -s "/opt/${pkgname}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}
# vim:set ts=2 sw=2 et:
diff --git a/qgroundcontrol-3.5.0.patch b/qgroundcontrol-3.5.0.patch
new file mode 100644
index 00000000000..213223db823
--- /dev/null
+++ b/qgroundcontrol-3.5.0.patch
@@ -0,0 +1,18 @@
+diff --unified --recursive --text qgroundcontrol-3.5.0/QGCSetup.pri qgroundcontrol-3.5.0.new/QGCSetup.pri
+--- qgroundcontrol-3.5.0/QGCSetup.pri 2019-02-05 07:38:43.000000000 +1000
++++ qgroundcontrol-3.5.0.new/QGCSetup.pri 2019-04-18 18:35:13.792079826 +1000
+@@ -135,10 +135,11 @@
+ libQt5TextToSpeech.so.5
+
+ !contains(DEFINES, __rasp_pi2__) {
++ # Some Qt distributions link with *.so.56
+ QT_LIB_LIST += \
+- libicudata.so.56 \
+- libicui18n.so.56 \
+- libicuuc.so.56
++ libicudata.so.* \
++ libicui18n.so.* \
++ libicuuc.so.*
+ }
+
+ for(QT_LIB, QT_LIB_LIST) {