Skip to content

Commit

Permalink
Merge pull request mavlink#157 from thomasgubler/archlinux
Browse files Browse the repository at this point in the history
PKGBUILD for archlinux AUR
  • Loading branch information
LorenzMeier committed Dec 23, 2013
2 parents db8c7d9 + 13e97fa commit 136aa5d
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions pymavlink/files/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Maintainer: Thomas Gubler <thomasgubler@gmail.com>
pkgname=python2-mavlink
pkgver=20131223
pkgrel=1
pkgdesc="Python implementation of the MAVLink protocol"
arch=(any)
url="http://qgroundcontrol.org/mavlink/pymavlink"
license=('LGPL3')
depends=('python2')
makedepends=('git' 'python2' 'python2-setuptools')
optdepends=()
provides=('python2-mavlink')
conflicts=()
options=(!emptydirs)

_gitroot="https://github.com/mavlink/mavlink/"
_gitname="mavlink"
_subfoldername="pymavlink"

build() {
cd "$srcdir"
msg "Connecting to GIT server..."

if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi

msg "GIT checkout done or server timeout"

cd "$srcdir/$_gitname/$_subfoldername"
git clean -fdx

msg "Starting make..."
python2 setup.py build
}

package() {
cd "$srcdir/$_gitname/$_subfoldername"
python2 setup.py install --prefix=/usr --root=$pkgdir/ --optimize=1

install -Dm644 "$srcdir/$_gitname/$_subfoldername/README.txt" "$pkgdir/usr/share/licenses/$pkgname/README.txt"
}

pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# vim:set ts=2 sw=2 et:

0 comments on commit 136aa5d

Please sign in to comment.