aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-30 05:55:20 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-30 14:57:46 +0100
commite01ae805e5b356a814c3e24e6ef2c1983422754e (patch)
tree76be04f9f64d421ec462833ae6da7337172fd56b
parentaf81303355c3dfbff02227727ee93f43ec29eb94 (diff)
downloadaports-e01ae805e5b356a814c3e24e6ef2c1983422754e.tar.bz2
aports-e01ae805e5b356a814c3e24e6ef2c1983422754e.tar.xz
main/py-country: upgrade to 16.11.27.1 and add py2/py3 subpackages
-rw-r--r--main/py-country/APKBUILD55
1 files changed, 32 insertions, 23 deletions
diff --git a/main/py-country/APKBUILD b/main/py-country/APKBUILD
index bb2c262fe4..6b2e3a4539 100644
--- a/main/py-country/APKBUILD
+++ b/main/py-country/APKBUILD
@@ -2,37 +2,46 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-country
_pkgname=pycountry
-pkgver=1.10
-pkgrel=1
+pkgver=16.11.27.1
+pkgrel=0
pkgdesc="ISO country, subdivision, language, currency and script definitions and their translations"
-url=https://pypi.python.org/pypi/pycountry
+url="https://pypi.python.org/pypi/pycountry"
arch="noarch"
license="LGPL2+"
-depends="python2"
-makedepends="python2-dev py-setuptools"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip"
-
-_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
-}
+makedepends="python2-dev py-setuptools python3-dev"
+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"
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="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="617635a7e94dc3d18ebcb5382cd3c93f pycountry-1.10.zip"
-sha256sums="29bd07e5f0d0471c260cea14e2ca4b7d705228ebb024b4de139dc87795576e67 pycountry-1.10.zip"
-sha512sums="076de329c5b9d7626fbf0aace654504a2cd2d1d7bdf2ec89ba4763b38b756a6e75c7f3032c4b8785693d291ace7a206673cac1a457c4dd59e8c3ce1cd70d7d60 pycountry-1.10.zip"
+md5sums="edf4f7cd4748a48e3a47ac50a61dc363 pycountry-16.11.27.1.tar.gz"
+sha256sums="08c17eec56bba50f8d66529ce90fc343d75d77280537141ee65e61b41936aa1d pycountry-16.11.27.1.tar.gz"
+sha512sums="a35430fd7cc7008bb278cca4c6bd4d42fec9f974cf7c90f7883cf89b828e8816da13c10ceaf55a47174453163d1fa5c0cbf2a04f41c1418f2564d1fdc03901db pycountry-16.11.27.1.tar.gz"