blob: 98a51465c4ff45accc31f038f6c824cb8ee7014a (
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
|
# Maintainer: Raimar Bühmann <raimar _at_ buehmann _dot_ de>
pkgname=('anki-drive-sdk-git')
pkgdesc="C SDK for message protocols and data parsing to communicate with Anki Drive vehicles"
pkgver=0.3.0.r41.20191106
pkgrel=1
arch=('i686' 'x86_64')
#url='https://github.com/anki/drive-sdk.git'
url='https://github.com/OpenHelios/drive-sdk.git'
license=('Apache')
depends=('glib2')
optdepends=(
'bluez-utils: for command line tool btmgmt (hciconfig is deprecated)'
'readline: for command line tool vehicle-tool to communicate with Anki cars'
)
makedepends=('cmake')
conflicts=('libankidrive')
replaces=('libankidrive')
source=(
"$pkgname::git+$url"
)
md5sums=('SKIP')
pkgver() {
# remove ".r*.*" from package version
_pkgverTriple=$(echo $pkgver | sed "s/\.r.*//g")
cd $pkgname
# get number of last git commit
_commitCount=$(git rev-list --count HEAD)
# get time of last git commit
_commitTime=$(git show -s --format="%ci" | grep -o "....-..-.." | sed "s/-//g")
# add ".r*.*" to package version
echo "$_pkgverTriple.r$_commitCount.$_commitTime"
}
build() {
cd "$pkgbase"
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX= -DBUILD_EXAMPLES=ON
}
package() {
pushd "$pkgbase/build/src"
cmake --install . --prefix="$pkgdir/usr"
popd
pushd "$pkgbase/build/examples"
cmake --install . --prefix="$pkgdir/usr"
popd
cd "$pkgbase"
install -Dm644 'include/ankidrive.h' "${pkgdir}/usr/include/ankidrive.h"
install -dm755 "$pkgdir/usr/include/ankidrive"
cp -a include/ankidrive/*.h "$pkgdir/usr/include/ankidrive/."
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|