diff options
-rw-r--r-- | testing/py-paho-mqtt/APKBUILD | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/testing/py-paho-mqtt/APKBUILD b/testing/py-paho-mqtt/APKBUILD index 4b081e4dd5..2ff5916afc 100644 --- a/testing/py-paho-mqtt/APKBUILD +++ b/testing/py-paho-mqtt/APKBUILD @@ -2,40 +2,46 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-paho-mqtt _pkgname=paho-mqtt -pkgver=1.1 +pkgver=1.2 pkgrel=0 pkgdesc="A python MQTT version 3.1/3.1.1 client class" -url="https://pypi.python.org/pypi/paho-mqtt" +url="http://www.eclipse.org/paho/" arch="noarch" license="EPL" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="a6407b74eb5e5411e157be1de5c11366 paho-mqtt-1.1.tar.gz" -sha256sums="0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e paho-mqtt-1.1.tar.gz" -sha512sums="e0b918406a1a551cded15313807ab508d3cd6a3c09aa8a0e6c105598e3e5f0d80d5974afe1352b604f428310ccb82a20c757a4da9934c7e0fb63337def312906 paho-mqtt-1.1.tar.gz" +md5sums="241150b3fcb920ddca4d33181f3238b1 paho-mqtt-1.2.tar.gz" +sha256sums="9100a6aa706ab699d414ec02705a21eb66f436184691d0bf1f2a85a6213c6c1f paho-mqtt-1.2.tar.gz" +sha512sums="19ed426da15b156a54c472f712cec5326f98675a5605be666e1a4fece45ef9274192c8dc7fdd5a79d096e5c6ff754c3c5c408c9ef17c03d285bb72cd13dfe827 paho-mqtt-1.2.tar.gz" |