aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-axolotl
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-20 20:13:10 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-21 01:16:16 -0300
commit3a19935f6a843fa5f0403018f88ecb0e4410d56e (patch)
tree8f9ab549078a3818342411a0532ac9fca1c165e5 /testing/py3-axolotl
parent57514ca5783f720a7eda3c0f1c41ef619edb5c7a (diff)
downloadaports-3a19935f6a843fa5f0403018f88ecb0e4410d56e.tar.bz2
aports-3a19935f6a843fa5f0403018f88ecb0e4410d56e.tar.xz
testing/py3-axolotl: rename from py-axolotl
Diffstat (limited to 'testing/py3-axolotl')
-rw-r--r--testing/py3-axolotl/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/py3-axolotl/APKBUILD b/testing/py3-axolotl/APKBUILD
new file mode 100644
index 0000000000..b0850dfb38
--- /dev/null
+++ b/testing/py3-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=1
+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 openssl-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"