aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-axolotl-curve25519/APKBUILD
blob: 7b0f0dbebb69a9e3c5ffa5b0cc770d7be5d62e59 (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
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py-axolotl-curve25519
_pkgname="python-${pkgname#py-}"
pkgver=0.4.1b
_pkgver=0.4.1-2
pkgrel=0
pkgdesc="A python wrapper for curve25519 library with ed25519 signatures"
url="https://github.com/tgalal/python-axolotl-curve25519"
arch="all"
license="GPL-3.0-only"
makedepends="py-setuptools python2-dev python3-dev"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/tgalal/$_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 test
	python3 setup.py test
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	_py python2
}

_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="cbc7c6caa47a9a811640c247a1be727d7b1b68bcdb4c5336e02b4d1eaf9fd2c57b7438b0da466a379a1c0f3f146756b9b7eea3c9b7945ce88478d4bf0b8a1e0d  py-axolotl-curve25519-0.4.1b.tar.gz"