wok-current annotate python-rpi-gpio/receipt @ rev 16495
Add python-smbus (from i2c-tools) + python-rpi-gpio to handle R-Pi gpio
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 23 16:32:16 2014 +0200 (2014-04-23) |
parents | |
children | c16799d15080 |
rev | line source |
---|---|
pankso@16495 | 1 # SliTaz package receipt. |
pankso@16495 | 2 |
pankso@16495 | 3 PACKAGE="python-rpi-gpio" |
pankso@16495 | 4 VERSION="0.5.5" |
pankso@16495 | 5 CATEGORY="raspberrypi" |
pankso@16495 | 6 SHORT_DESC="Python class to control the GPIO on a Raspberry Pi." |
pankso@16495 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@16495 | 8 LICENSE="BSD" |
pankso@16495 | 9 SOURCE="RPi.GPIO" |
pankso@16495 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
pankso@16495 | 11 WEB_SITE="https://pypi.python.org/pypi/RPi.GPIO" |
pankso@16495 | 12 WGET_URL="https://pypi.python.org/packages/source/R/$SOURCE/$TARBALL" |
pankso@16495 | 13 HOST_ARCH="arm" |
pankso@16495 | 14 |
pankso@16495 | 15 DEPENDS="python python-smbus" |
pankso@16495 | 16 BUILD_DEPENDS="python-dev setuptools" |
pankso@16495 | 17 |
pankso@16495 | 18 # Rules to configure and make the package. |
pankso@16495 | 19 compile_rules() |
pankso@16495 | 20 { |
pankso@16495 | 21 # Cross compilation hack |
pankso@16495 | 22 case "$ARCH" in |
pankso@16495 | 23 arm*) |
pankso@16495 | 24 mv /usr/bin/i486-slitaz-linux-gcc /tmp && |
pankso@16495 | 25 ln -s /cross/${ARCH}/tools/bin/arm-slitaz-linux-gnueabi-gcc \ |
pankso@16495 | 26 /usr/bin/i486-slitaz-linux-gcc ;; |
pankso@16495 | 27 esac && |
pankso@16495 | 28 python setup.py install --root=$DESTDIR |
pankso@16495 | 29 case "$ARCH" in |
pankso@16495 | 30 arm*) |
pankso@16495 | 31 rm /usr/bin/i486-slitaz-linux-gcc && |
pankso@16495 | 32 mv /tmp/i486-slitaz-linux-gcc /usr/bin ;; |
pankso@16495 | 33 esac |
pankso@16495 | 34 } |
pankso@16495 | 35 |
pankso@16495 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@16495 | 37 genpkg_rules() |
pankso@16495 | 38 { |
pankso@16495 | 39 cp -a $install/usr $fs |
pankso@16495 | 40 } |