Mail archive
alpine-aports

[alpine-aports] [PATCH 4/5] testing/py-axolotl: New aport

From: Marian Buschsieweke <marian.buschsieweke_at_ovgu.de>
Date: Sun, 1 Jul 2018 15:55:21 +0200

https://github.com/tgalal/python-axolotl
Python port of libsignal-protocol-java
---
 testing/py-axolotl/APKBUILD | 51 +++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 testing/py-axolotl/APKBUILD
diff --git a/testing/py-axolotl/APKBUILD b/testing/py-axolotl/APKBUILD
new file mode 100644
index 0000000000..fe9e416195
--- /dev/null
+++ b/testing/py-axolotl/APKBUILD
_at_@ -0,0 +1,51 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke_at_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="GPL3"
+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"
+	python3 setup.py test
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	depends="py2-crypto py2-protobuf py2-axolotl-curve25519"
+	replaces="$pkgname"
+	_py python2
+}
+
+_py3() {
+	depends="py3-crypto py3-protobuf py3-axolotl-curve25519"
+	_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"
-- 
2.18.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Jul 01 2018 - 15:55:21 GMT