aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-08 21:28:31 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 09:50:08 +0200
commit68d8c189bf578b5caf4283bf2827852aeaa974d4 (patch)
treece1ec6289d05e9cd9d01f4843158735fc9427f8f /testing
parent3ed6b015e4afbcf9ffa8d4d4ff04ebb7f1db9a1a (diff)
downloadaports-68d8c189bf578b5caf4283bf2827852aeaa974d4.tar.bz2
aports-68d8c189bf578b5caf4283bf2827852aeaa974d4.tar.xz
testing/py-dnslib: upgrade to 0.9.6 and enable py3
Diffstat (limited to 'testing')
-rw-r--r--testing/py-dnslib/APKBUILD52
1 files changed, 29 insertions, 23 deletions
diff --git a/testing/py-dnslib/APKBUILD b/testing/py-dnslib/APKBUILD
index 47bcc2f100..40ec431796 100644
--- a/testing/py-dnslib/APKBUILD
+++ b/testing/py-dnslib/APKBUILD
@@ -2,40 +2,46 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-dnslib
_pkgname=dnslib
-pkgver=0.9.0
+pkgver=0.9.6
pkgrel=0
pkgdesc="A simple library to encode/decode DNS wire-format packets"
url="https://bitbucket.org/paulc/dnslib/"
arch="noarch"
license="BSD"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev"
-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="0d7b6434f00a2411e2e8cc15878ac4ba dnslib-0.9.0.tar.gz"
-sha256sums="60a75ce1ccbac64b9e0137b2a542b35df19491fcf66d18a0d8eb06757ae11f56 dnslib-0.9.0.tar.gz"
-sha512sums="5bf0033f8aa9e770987940ad70151091395fe470c880047d81bc9969769bfb1eaec92705ae9aeb5875f2d70debbf944e4d239caea3ac4d4c3376c5775dbf4dc6 dnslib-0.9.0.tar.gz"
+md5sums="794028e9b92b8fad9712ac6655b7fb1d dnslib-0.9.6.tar.gz"
+sha256sums="6ba31ae2014644901a301727cc4e22844eb19295a959c362568f08aee9b3bfa8 dnslib-0.9.6.tar.gz"
+sha512sums="c733803a9b25356c82afb4ce853a681545aebdb5fbd4f8a544eea9bb61ff354acc044a43357435e02b8b787a17fec99ea7e9f01b1c1e93a2e39945657c495105 dnslib-0.9.6.tar.gz"