summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 99ec2633fc677d0fc6cfc7f9b34e7a23ed5de10f (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
# Maintainer: Julian Oes <julian at oes dot ch>
pkgname=mavsdk
pkgver=0.27.0
pkgrel=1
epoch=
pkgdesc="API and library for MAVLink compatible systems written in C++11"
arch=('i686' 'x86_64')
url="https://mavsdk.mavlink.io"
license=('BSD-3-Clause')
groups=()
depends=('curl' 'jsoncpp' 'tinyxml2' 'zlib')
makedepends=('git' 'cmake')
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("git://github.com/mavlink/mavsdk.git#tag=v$pkgver"
        "git://github.com/mavlink/mavsdk-proto.git"
        "git://github.com/google/googletest.git"
        "git://github.com/mavlink/c_library_v2.git")
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP')
noextract=()
validpgpkeys=()

prepare() {
	cd "$pkgname"
    git submodule init
    git config submodule.proto.url $srcdir/mavsdk-proto
    git config submodule.src/third_party/gtest.url $srcdir/googletest
    git config submodule.src/third_party/mavlink/include/mavlink/v2.0.url $srcdir/c_library_v2
    git submodule update
}

build() {
	cd "$pkgname"
    cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$pkgdir/usr -DSUPERBUILD=OFF -DBUILD_BACKEND=OFF -Bbuild -S.
    cmake  --build build
}

check() {
	cd "$pkgname"
    build/src/unit_tests_runner
}

package() {
	cd "$pkgname"
    cmake --install build
}