diff options
Diffstat (limited to 'main/py-asn1crypto')
-rw-r--r-- | main/py-asn1crypto/APKBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/main/py-asn1crypto/APKBUILD b/main/py-asn1crypto/APKBUILD new file mode 100644 index 0000000000..2952bc6bfe --- /dev/null +++ b/main/py-asn1crypto/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: André Klitzing <aklitzing@gmail.com> +# Maintainer: André Klitzing <aklitzing@gmail.com> +pkgname=py-asn1crypto +_pkgname=asn1crypto +pkgver=0.22.0 +pkgrel=0 +pkgdesc="Python ASN.1 library with a focus on performance and a pythonic API" +url="https://github.com/wbond/asn1crypto" +arch="noarch" +license="MIT" +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" +source="$_pkgname-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$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 (for $python)" + depends="$python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +sha512sums="d7d88e81323d4e70a32723967aa7df912671c4039b26801846ccf3337ef3015528f9b0d23a25988b0d823291f069323e6985c8ef25f681cc1edb85d64d42d0e5 asn1crypto-0.22.0.tar.gz" |