aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-protobuf
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-03-27 13:26:54 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2017-03-27 13:27:35 +0000
commit84449a9919936568696cf786b3876fc9ce2b1587 (patch)
tree09940cae993a2a603c100eec0cc910b9f23cd9f8 /testing/py-protobuf
parentc28e4f974a8891af13c532c314c85c6ce4fe6216 (diff)
downloadaports-84449a9919936568696cf786b3876fc9ce2b1587.tar.bz2
aports-84449a9919936568696cf786b3876fc9ce2b1587.tar.xz
testing/py-protobuf: ugprade to 3.2.0
Diffstat (limited to 'testing/py-protobuf')
-rw-r--r--testing/py-protobuf/APKBUILD42
1 files changed, 32 insertions, 10 deletions
diff --git a/testing/py-protobuf/APKBUILD b/testing/py-protobuf/APKBUILD
index a1b584b973..dc05a72e44 100644
--- a/testing/py-protobuf/APKBUILD
+++ b/testing/py-protobuf/APKBUILD
@@ -2,27 +2,49 @@
# Contributor: Corentin Henry <corentinhenry@gmail.com>
pkgname=py-protobuf
_pkgname=${pkgname#py-}
-pkgver=2.6.1
-pkgrel=2
+pkgver=3.2.0
+pkgrel=0
pkgdesc="Google's data interchange format."
url="https://github.com/google/protobuf"
arch="noarch"
license="BSD"
-depends="python2 py-six>=1.9"
-makedepends="python2-dev py-setuptools py-google-apputils"
+depends="py-six>=1.9"
+makedepends="python2-dev python3-dev py-setuptools py-google-apputils"
+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"
-builddir="$srcdir"/$_pkgname-$pkgver
+builddir="$srcdir"/protobuf-$pkgver
build() {
cd "$builddir"
- python2 setup.py build
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
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"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+ # correct permissions
+ chmod +r "$subpkgdir"/usr/lib/*/site-packages/*/*
}
-md5sums="6bf843912193f70073db7f22e2ea55e2 py-protobuf-2.6.1.tar.gz"
-sha256sums="8faca1fb462ee1be58d00f5efb4ca4f64bde92187fe61fde32615bbee7b3e745 py-protobuf-2.6.1.tar.gz"
-sha512sums="c345b5b2822e7142e27cd6ff4ca4e8cc307acd3673043428073ed260a899c48ac6afa32e290b2d2f0ee54316d1a0f0ec72287604fb372992715a2191fe5623d4 py-protobuf-2.6.1.tar.gz"
+sha512sums="d20ecd17712ff66033f73747d789fdb0b8b46f692e6655608a6c1c141fa4f9f489dfccd91653c6876b12b40309c7a462a8c1024e2161e01041f2859f4353dedd py-protobuf-3.2.0.tar.gz"