summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5281d06403f112f5829ca33699b7f82671eb4840 (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
# Maintainer: Peter Mattern <pmattern at arcor dot de>

pkgbase=python-pyjwkest
pkgname=($pkgbase 'python2-pyjwkest')
pkgver=1.4.0
pkgrel=3
pkgdesc='Implementation of JWT, JWS, JWE and JWK.'
arch=('any')
url='https://github.com/rohe/pyjwkest'
license=('Apache')
makedepends=('python-setuptools' 'python-pycryptodomex' 'python-requests' 'python-six' 'python-future'
             'python2-setuptools' 'python2-pycryptodomex' 'python2-requests' 'python2-six' 'python2-future')
source=("${pkgbase}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('da7c2a0fa21bde050525a50b4b6ae7b265fc2319d598e44e84a4430961bed420')

prepare() {
    cp -r pyjwkest-$pkgver pyjwkest-$pkgver-python2
}

build() {

    cd ${srcdir}/pyjwkest-${pkgver}
    python setup.py build

    cd ${srcdir}/pyjwkest-${pkgver}-python2
    python2 setup.py build

}

package_python-pyjwkest() {

    depends=('python-pycryptodomex' 'python-requests' 'python-six' 'python-future')

    cd pyjwkest-$pkgver
    python setup.py install --root $pkgdir

}

package_python2-pyjwkest() {

    depends=('python2-pycryptodomex' 'python2-requests' 'python2-six' 'python2-future')

    cd pyjwkest-$pkgver-python2
    python2 setup.py install --root $pkgdir
    rename '.py' '2.py' ${pkgdir}/usr/bin/*

}