aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 10:55:03 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 10:56:27 +0000
commit644bfb80dfab8f384e4147be4514ea8f9c1ebc67 (patch)
tree7b364a0f2a9a68b39cf19eae4d788ff3bd60b0f5
parentdda35839c9bd2eb44c4d81a9ae1be7e6bf50a444 (diff)
downloadaports-644bfb80dfab8f384e4147be4514ea8f9c1ebc67.tar.bz2
aports-644bfb80dfab8f384e4147be4514ea8f9c1ebc67.tar.xz
community/py-dnspython: upgrade to 1.14.0, moved from testing, added py2/py3 subpackages
-rw-r--r--community/py-dnspython/APKBUILD49
-rw-r--r--testing/py-dnspython/APKBUILD31
2 files changed, 49 insertions, 31 deletions
diff --git a/community/py-dnspython/APKBUILD b/community/py-dnspython/APKBUILD
new file mode 100644
index 0000000000..e14a13c051
--- /dev/null
+++ b/community/py-dnspython/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-dnspython
+_pkgname=dnspython
+pkgver=1.14.0
+pkgrel=0
+pkgdesc="A DNS toolkit for Python"
+url="http://www.dnspython.org"
+arch="noarch"
+license="BSD"
+depends=
+depends_dev=""
+makedepends="python2-dev py-setuptools python3-dev"
+install=""
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="http://www.dnspython.org/kits/$pkgver/$_pkgname-$pkgver.tar.gz"
+
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+ replaces="$pkgname"
+}
+
+_py3() {
+ _py python3
+}
+
+md5sums="d8971c0c957abceb92c7d36170d07bc6 dnspython-1.14.0.tar.gz"
+sha256sums="1406421e208931a66fef38ef0106711e1da277c9f40ed935ec1ab7374c1687fc dnspython-1.14.0.tar.gz"
+sha512sums="c2fa2148ea8c2c33c43dc7c2a08798bb687c6e8ad506119d31adb17792c667f973f415ac3582e2fb36ad25c95b611eee558ffc02d81da17626ecf1ee21ab5c0a dnspython-1.14.0.tar.gz"
diff --git a/testing/py-dnspython/APKBUILD b/testing/py-dnspython/APKBUILD
deleted file mode 100644
index f370faaee5..0000000000
--- a/testing/py-dnspython/APKBUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# Contributor: Francesco Colista <francesco.colista@gmail.com>
-# Maintainer: Francesco Colista <francesco.colista@gmail.com>
-pkgname=py-dnspython
-_pkgname=dnspython
-pkgver=1.13.0
-pkgrel=0
-pkgdesc="A DNS toolkit for Python"
-url="http://www.dnspython.org"
-arch="noarch"
-license="BSD"
-depends=
-depends_dev=""
-makedepends="python-dev py-setuptools"
-install=""
-subpackages=""
-source="http://www.dnspython.org/kits/$pkgver/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-build() {
- cd "$_builddir"
- python setup.py build || return 1
-}
-
-package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
-}
-
-md5sums="e18c3c969f2ff075bec40bd119a56a4c dnspython-1.13.0.tar.gz"
-sha256sums="efd9cd95c0c40de97c21eabe4bb47bc3681942edae32a2e28cc6126ab6ce1dec dnspython-1.13.0.tar.gz"
-sha512sums="490107d860898120c2a05e04357e4522a59e3b866b74c8032423064494c26db2cf073eac9e0f3a16a2a5eff089af24d59aaadadeb953a145d9a42f6dec8292cb dnspython-1.13.0.tar.gz"