summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 61314f80333f7d868ffe47da94eb2b556f134e8e (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
# Maintainer: bobpaul <bobpaul@users.noreply.github.com>
# contact me via AUR or archlinux forums
project='pymavlink'
pkgname=python-${project}-git # '-bzr', '-git', '-hg' or '-svn'
pkgver=r2452.a1c7106
pkgrel=1
pkgdesc="python MAVLink interface and utilities"
arch=('x86_64')
url="https://github.com/ArduPilot/pymavlink/"
license=('LGPL v3')
groups=()
depends=('python-future' 'python-lxml')
makedepends=('git') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}" "python2-pymavlink" "python2-pymavlink-git")
replaces=()
backup=()
options=()
install=
source=('git+https://github.com/mavlink/mavlink/')
noextract=()
md5sums=('SKIP')

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

prepare() {
	cd "$srcdir/mavlink"
    git submodule init
    git submodule update
}

pkgver() {
	cd "$srcdir/mavlink/${project}"

# Git, tags available
#	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

# Git, no tags available
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

build() {
	cd "$srcdir/mavlink/${project}"
    python setup.py build
}

package() {
	cd "$srcdir/mavlink/${project}"
	python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build

    install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname%-git}
}