aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-josepy
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2018-01-26 11:32:28 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2018-01-26 11:34:11 +0000
commit7db1b3c12674c0cf36b4dd2779c9868fe86180b7 (patch)
treeab4380f8808fc627289e0f0a2db6970907144677 /community/py-josepy
parent3086ef262eb572a254697a18f343a601ce78a3bd (diff)
downloadaports-7db1b3c12674c0cf36b4dd2779c9868fe86180b7.tar.bz2
aports-7db1b3c12674c0cf36b4dd2779c9868fe86180b7.tar.xz
community/py-josepy: new aport. Dependency of new certbot version
Diffstat (limited to 'community/py-josepy')
-rw-r--r--community/py-josepy/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/community/py-josepy/APKBUILD b/community/py-josepy/APKBUILD
new file mode 100644
index 0000000000..c2ce22f1d0
--- /dev/null
+++ b/community/py-josepy/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-josepy
+_pkgname=josepy
+pkgver=1.0.1
+pkgrel=0
+pkgdesc="JOSE protocol implementation in Python"
+url="https://github.com/jezdez/josepy"
+arch="noarch"
+license="Apache-2.0"
+depends="py-six py-mock py-cryptography"
+makedepends="python2-dev python3-dev py-setuptools libffi-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/certbot/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py check
+ python3 setup.py check
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ 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"
+}
+sha512sums="ca2fcc36f240c88dcb8fd6865d16ee3e1975964b846b73c87e2dce98d58ff0e5473ef505767ef79397078ed580a0badc5e43d9900f4289b70411819341a65cc9 josepy-1.0.1.tar.gz"