summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-asn1crypto/PKGBUILD
blob: 2caede9663f57ae85162f3b30bbc0ca0f48214be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Massimiliano Torromeo < massimiliano DOT torromeo AT gmail DOT com >

pkgbase=python-asn1crypto
pkgname=('python-asn1crypto' 'python2-asn1crypto')
pkgver=0.24.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=('python-setuptools' 'python2-setuptools')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$pkgver.tar.gz")
sha512sums=('426cc380903b4dd7aadd7b831e3a11ee3442c961a33b856d4aa8d9060e829f2e0ad905a60c4d6504569718fe2cee01d9be31628c89ef030bc34281e381c898e8')

prepare() {
  cp -a asn1crypto-$pkgver{,-py2}
}

build() {
  cd "$srcdir"/asn1crypto-$pkgver
  python setup.py build

  cd "$srcdir"/asn1crypto-$pkgver-py2
  python2 setup.py build
}

check() {
  cd "$srcdir"/asn1crypto-$pkgver
  python run.py tests

  cd "$srcdir"/asn1crypto-$pkgver-py2
  python2 run.py tests
}

package_python-asn1crypto() {
  depends=('python')

  cd asn1crypto-$pkgver
  python 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
}