desktop/python-asn1crypto/PKGBUILD
2017-10-31 23:04:26 +01:00

48 lines
1.3 KiB
Bash

pkgbase=python-asn1crypto
pkgname=('python3-asn1crypto' 'python2-asn1crypto')
pkgver=0.23.0
pkgrel=1
arch=('any')
license=('MIT')
pkgdesc="Python ASN.1 library with a focus on performance and a pythonic API"
url="https://github.com/wbond/asn1crypto"
makedepends=('python3-setuptools' 'python2-setuptools')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$pkgver.tar.gz")
sha512sums=('1f702d80050c2b198bc6a829bdef74d7722222f808a5ca6856482f16d1e0e9f36476845eac64ef27ca141ab6280b7da3ca60fa33edda6b886f27dc72c00d3650')
prepare() {
cp -a asn1crypto-$pkgver{,-py2}
}
build() {
cd "$srcdir"/asn1crypto-$pkgver
python3 setup.py build
cd "$srcdir"/asn1crypto-$pkgver-py2
python2 setup.py build
}
check() {
cd "$srcdir"/asn1crypto-$pkgver
python3 run.py tests
cd "$srcdir"/asn1crypto-$pkgver-py2
python2 run.py tests
}
package_python3-asn1crypto() {
depends=('python3')
cd asn1crypto-$pkgver
python3 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python-asn1crypto/LICENSE
}
package_python2-asn1crypto() {
depends=('python2')
cd asn1crypto-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/python2-asn1crypto/LICENSE
}