diff options
author | Siôn Le Roux | 2015-11-02 01:10:18 +0100 |
---|---|---|
committer | Siôn Le Roux | 2015-11-02 01:10:18 +0100 |
commit | 5c6aa1acab9c000ab7b194e2b250f692012d7911 (patch) | |
tree | 18219b797e15fd532a4cd653df782ae892d72f84 | |
download | aur-5c6aa1acab9c000ab7b194e2b250f692012d7911.tar.gz |
Initial commit: working build for Adafruit GPIO library
* Uses git revision info for version number
* Converts source to python3 code before install
* Installs files using python's easy_install
* .SRCINFO contains a hard-coded version because AUR4 is strict
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..669740e9c21f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = python-adafruit-gpio-git + pkgdesc = Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries. + pkgver = r75.cdf7a7b + pkgrel = 1 + url = https://github.com/adafruit/Adafruit_Python_GPIO + arch = any + license = MIT + makedepends = git + depends = python + depends = python-raspberry-gpio + depends = python-smbus + provides = python-adafruit-gpio + conflicts = python-adafruit-gpio + source = python-adafruit-gpio::git+https://github.com/adafruit/Adafruit_Python_GPIO.git + md5sums = SKIP + +pkgname = python-adafruit-gpio-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..09734dd21e52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.xz +/python-adafruit-gpio/ +/src/ +/pkg/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c2b58e364ac6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Siôn le Roux <sinisterstuf@gmail.com> +# Please submit issues/patches/pull-requests at: +# https://github.com/sinisterstuf/PKGBUILD-python-adafruit-gpio-git + +pkgname=python-adafruit-gpio-git +pkgver=r75.cdf7a7b +pkgrel=1 +pkgdesc="Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries." +arch=('any') +url="https://github.com/adafruit/Adafruit_Python_GPIO" +license=('MIT') +groups=() +depends=('python' 'python-raspberry-gpio' 'python-smbus') +makedepends=('git') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=("${pkgname%-git}::git+https://github.com/adafruit/Adafruit_Python_GPIO.git") +md5sums=('SKIP') + +pkgver() { + # Git, no tags available + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$srcdir/${pkgname%-git}" + 2to3 -wn . +} + +build() { + cd "$srcdir/${pkgname%-git}" + python setup.py clean --all + python setup.py build +} + +package() { + cd "$srcdir/${pkgname%-git}" + python setup.py install --root "${pkgdir}/" +} |