blob: 3136479f8198ff541677923bf3f6774535d7a31a (
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
# Maintainer: bobosito <bobosito000@gmail.com>
pkgname=qgroundcontrol-git
pkgver=v4.2.0.r47.96401ec30
pkgrel=1.2
epoch=
pkgdesc="ground control system for px4 autopilot"
arch=('any')
url=""
license=('GPL')
groups=()
depends=('bzip2'
'dbus'
'flac'
'gst-plugins-base-libs'
'libasyncns'
'libffi'
'libgcrypt'
'libgpg-error'
'libogg'
'libsndfile'
'libsystemd'
'libunwind'
'libx11'
'libxau'
'libxcb'
'libxdmcp'
'libxext'
'lz4'
'orc'
'pcre'
'sdl2'
'xz'
'zlib'
'icu'
'qt5-connectivity'
'qt5-speech'
'qt5-multimedia'
'qt5-serialport'
'qt5-charts'
'qt5-quickcontrols'
'qt5-quickcontrols2'
'qt5-location'
'qt5-svg'
'qt5-graphicaleffects'
'qt5-tools'
'qt5-wayland'
'qt5-x11extras'
)
makedepends=('git' 'qt5-base')
checkdepends=()
optdepends=()
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
changelog=
source=(
"git://github.com/mavlink/qgroundcontrol.git"
"git://github.com/PX4/GpsDrivers.git"
"git://github.com/mavlink/c_library_v2.git"
"git://github.com/Auterion/android_openssl.git"
"git://github.com/mavlink/gst-plugins-good.git"
"git://github.com/Auterion/xz-embedded.git"
"git://github.com/mavlink/libevents.git"
"eigen::git+https://gitlab.com/libeigen/eigen.git"
"git://github.com/patrickelectric/qmdnsengine.git"
"git://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git"
# "gst-plugins-good-volatile.patch"::"https://patch-diff.githubusercontent.com/raw/mavlink/gst-plugins-good/pull/1.patch"
)
sha256sums=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
# '8e32ff6ff83cbe12a798920a010061cf9f4ec7b178362dde517b4bc71555f8a2'
)
# noextract=("v2020.3.tar.gz")
md5sums=()
validpgpkeys=()
pkgver() {
src_qgc=$srcdir/${pkgname%-git}
cd $src_qgc
# Git, tags available
printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}
prepare() {
src_qgc=$srcdir/${pkgname%-git}
cd "$srcdir/GpsDrivers"
git submodule init
rm -rf $src_qgc/GPS/Drivers
git config submodule.GpsDrivers.url $src_qgc/GPS/Drivers
cd $srcdir/c_library_v2
git submodule init
cd $srcdir/android_openssl
git submodule init
rm -rf ""
git config submodule.android_openssl.url $src_qgc/libs/OpenSSL/android_openssl
cd $srcdir/gst-plugins-good
git submodule init
# git apply "$srcdir/gst-plugins-good-volatile.patch"
git config submodule.gst-plugins-good.url $src_qgc/libs/qmlglsink/gst-plugins-good
cd $srcdir/xz-embedded
git submodule init
git config submodule.xz-embedded.url $src_qgc/libs/xz-embedded
cd $srcdir/libevents
git submodule init
git config submodule.libevents.url $src_qgc/libs/libevents/libevents
cd $srcdir/eigen
git submodule init
git config submodule.eigen.url $src_qgc/libs/eigen
cd $srcdir/qmdnsengine
git submodule init
git config submodule.qmdnsengine.url $src_qgc/libs/qmdnsengine
cd $srcdir/nlohmann_json_cmake_fetchcontent
git submodule init
git config submodule.nlohmann_json_cmake_fetchcontent.url $src_qgc/libs/nlohmann_json
cd $src_qgc
# git submodule update --init --recursive
# git apply $srcdir/patch
# echo $PWD
# patch -p1 -i "$srcdir/patch"
cmake . -B ./build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
}
build() {
cd $srcdir/${pkgname%-git}
cmake --build ./build
}
# check() {
# cd build
# # ctest --output-on-failure
# }
package() {
cd $srcdir/${pkgname%-git}/build
DESTDIR=$pkgdir make install
cd $pkgdir
mkdir -p $pkgdir/opt/${pkgname%-git} $pkgdir/usr/bin $pkgdir/usr/share/applications
cp $srcdir/${pkgname%-git}/deploy/linux-fixup-rpaths.bash $pkgdir/opt/${pkgname%-git}
cp $srcdir/${pkgname%-git}/deploy/qgroundcontrol-start.sh $pkgdir/opt/${pkgname%-git}
cp $srcdir/${pkgname%-git}/deploy/org.mavlink.qgroundcontrol.desktop $pkgdir/opt/${pkgname%-git}
cp $srcdir/${pkgname%-git}/deploy/org.mavlink.qgroundcontrol.metainfo.xml $pkgdir/opt/${pkgname%-git}
cp $srcdir/${pkgname%-git}/resources/icons/qgroundcontrol.png $pkgdir/opt/${pkgname%-git}
echo "[Desktop Entry]
Type=Application
Name=QGroundControl Release
Comment=Ground control for unmanned vehicles
Path=/opt/${pkgname%-git}/
Exec=/usr/bin/${pkgname%-git}
Icon=/opt/${pkgname%-git}/qgroundcontrol.png
Terminal=false
Categories=Qt;Utility;" > "$srcdir/${pkgname%-git}.desktop"
# rm "$pkgdir/opt/${pkgname%-git}/${pkgname%-git}.desktop"
cp "$srcdir/${pkgname%-git}.desktop" $pkgdir/opt/${pkgname%-git}
ln -s "/opt/${pkgname%-git}/QGroundControl" "$pkgdir/usr/bin/${pkgname%-git}"
ln -s "/opt/${pkgname%-git}/${pkgname%-git}.desktop" "$pkgdir/usr/share/applications/${pkgname%-git}.desktop"
}
|