aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-axolotl
diff options
context:
space:
mode:
authorMarian Buschsieweke <marian.buschsieweke@ovgu.de>2018-07-23 10:11:05 +0200
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-07-23 08:49:42 +0000
commitfa75e53fe2969f820e3e6ef58f38b9e31c517451 (patch)
tree86cbd859814282be24b4f1f6b76070bef693d352 /testing/py-axolotl
parent47916f0923e7e9aa1ea5bc047eca38efa55b57f2 (diff)
testing/py-axolotl: New aport
https://github.com/tgalal/python-axolotl Python port of libsignal-protocol-java
Diffstat (limited to 'testing/py-axolotl')
-rw-r--r--testing/py-axolotl/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/py-axolotl/APKBUILD b/testing/py-axolotl/APKBUILD
new file mode 100644
index 00000000000..67d1e234f8d
--- /dev/null
+++ b/testing/py-axolotl/APKBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
+pkgname=py-axolotl
+_pkgname="python-${pkgname#py-}"
+pkgver=0.1.42
+pkgrel=0
+pkgdesc="Python port of libsignal-protocol-java"
+url="https://github.com/tgalal/python-axolotl"
+arch="noarch"
+license="GPL-3.0-only"
+depends="py-crypto py-protobuf py-axolotl-curve25519"
+makedepends="py-setuptools python2-dev python3-dev libressl-dev"
+checkdepends="py-cryptography py-cparser"
+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() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/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="db9e1cfab87d690619a672b1782942a18b12b17af555959c17bcc3e2581e9c689c57becc0ea884a1129df9dace17684ba03de38b81f8c8c65cab27962ebdb6c5 py-axolotl-0.1.42.tar.gz"