aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-rsa
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-12-30 02:28:58 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-08 13:38:40 +0200
commit8e45b07e4544818d389d1a52f3f773869bbf9b47 (patch)
tree5314a7bb6c5ff05b3370b1e2b01f159ca3ca0e99 /main/py-rsa
parentb253e1fe9c7bb4b5f6fc211340420edf8056d35a (diff)
downloadaports-8e45b07e4544818d389d1a52f3f773869bbf9b47.tar.bz2
aports-8e45b07e4544818d389d1a52f3f773869bbf9b47.tar.xz
main/py-rsa: upgrade to 3.4.2
build for both python2, python3
Diffstat (limited to 'main/py-rsa')
-rw-r--r--main/py-rsa/APKBUILD58
1 files changed, 34 insertions, 24 deletions
diff --git a/main/py-rsa/APKBUILD b/main/py-rsa/APKBUILD
index 24c5ee4f68..bc646551b0 100644
--- a/main/py-rsa/APKBUILD
+++ b/main/py-rsa/APKBUILD
@@ -1,40 +1,50 @@
# Maintainer: Peter Bui <pnutzh4x0r@gmail.com>
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=py-rsa
-_pkgname=rsa
-pkgver=3.2.3
+_pkgname=${pkgname#py-}
+pkgver=3.4.2
pkgrel=0
pkgdesc="Pure-Python RSA implementation"
url="http://stuvel.eu/rsa"
arch="noarch"
license="BSD"
-depends="python2 py-asn1"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+depends="py-asn1"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
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"
+ 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"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="0e93ca942184650116d84452d4b90253 rsa-3.2.3.tar.gz"
-sha256sums="14db288cc40d6339dedf60d7a47053ab004b4a8976a5c59402a211d8fc5bf21f rsa-3.2.3.tar.gz"
-sha512sums="52b33e0278e6e1fed64b1cdebed29f7caa31fae733c2d5875e6cba5a045aaa829616799d8de84fdb63c546780dbdafcabf1f85f25930b8e663861151479ef7e2 rsa-3.2.3.tar.gz"
+md5sums="b315f47882c24030ee6b5aad628cccdb rsa-3.4.2.tar.gz"
+sha256sums="25df4e10c263fb88b5ace923dd84bf9aa7f5019687b5e55382ffcdb8bede9db5 rsa-3.4.2.tar.gz"
+sha512sums="62b0ff31fb3b9c18ae65bd102329e69726b853560576b1b66b9b89b26d3ff79154239af7e7a581b6a27c7017cc013f738762cd9662777ef594cc11c5b1f8e267 rsa-3.4.2.tar.gz"