Commit 7bb766d0 authored by Francesco Colista's avatar Francesco Colista
Browse files

community/py-rpigpio: upgrade to 0.6.3, added py2/py3 package. Fixes #8278

parent df99ec2c
...@@ -2,27 +2,52 @@ ...@@ -2,27 +2,52 @@
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to> # Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=py-rpigpio pkgname=py-rpigpio
_pkgname=RPi.GPIO _pkgname=RPi.GPIO
pkgver=0.6.2 pkgver=0.6.3
pkgrel=1 pkgrel=0
pkgdesc="This package provides a class to control the GPIO on a Raspberry Pi." pkgdesc="This package provides a class to control the GPIO on a Raspberry Pi."
url="https://pypi.python.org/pypi/RPi.GPIO" url="https://pypi.python.org/pypi/RPi.GPIO"
arch="armhf" arch="armhf"
license="MIT" license="MIT"
depends="python2" makedepends="python2-dev python3-dev py-setuptools"
makedepends="python2-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver" builddir="$srcdir/$_pkgname-$pkgver"
build() { build() {
cd "$builddir" cd "$builddir"
python2 setup.py build || return 1 python2 setup.py build
python3 setup.py build
}
check() {
cd "$builddir"
python2 setup.py check
python3 setup.py check
} }
package() { package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
depends="${depends//py-/py2-}"
_py python2
}
_py3() {
depends="${depends//py-/py3-}"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python" ## remove if arch isn't noarch
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir" cd "$builddir"
python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 $python setup.py install --prefix=/usr --root="$subpkgdir"
} }
md5sums="9db86fd5f3bae872de9dbb068ee0b096 py-rpigpio-0.6.2.tar.gz" sha512sums="b2fd08d9db1a2d58bdfed9d27c279d1f8c5cb6923ebd61253dae257b7271a7c5dec2271d6a426c9d1c67fc0444e18057e2e12ed8c3aa0f3d847291ba64beccf4 py-rpigpio-0.6.3.tar.gz"
sha256sums="82acff0ef6bbe3cdf6f4dbdd73d96add5294bb94baf7f51c1d901861af3c2392 py-rpigpio-0.6.2.tar.gz"
sha512sums="a6fbea51ffd07d33425f66deb1afcd7c3c7334d9e8a7c7ff793fc41e11a744e31003b9553384f0ac29da6576a071caae269ae6f1a681a9ebc5f7914955d84de1 py-rpigpio-0.6.2.tar.gz"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment