aboutsummaryrefslogtreecommitdiffstats
path: root/community/olm/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/olm/APKBUILD')
-rw-r--r--community/olm/APKBUILD64
1 files changed, 53 insertions, 11 deletions
diff --git a/community/olm/APKBUILD b/community/olm/APKBUILD
index 4beba392e0f..abb78621ccd 100644
--- a/community/olm/APKBUILD
+++ b/community/olm/APKBUILD
@@ -1,30 +1,72 @@
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=olm
-pkgver=3.1.4
+pkgver=3.2.16
pkgrel=1
pkgdesc="Implementation of the olm and megolm cryptographic ratchets"
arch="all"
url="https://gitlab.matrix.org/matrix-org/olm"
license="Apache-2.0"
-makedepends="cmake"
-source="$pkgname-$pkgver.tar.gz::https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz"
-subpackages="$pkgname-dev"
+makedepends="
+ cmake
+ py3-cffi
+ py3-setuptools
+ python3-dev
+ samurai
+ "
+checkdepends="
+ py3-pytest
+ py3-pytest-benchmark
+ py3-pytest-cov
+ py3-future
+ py3-aspectlib
+ "
+source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.gz"
+subpackages="$pkgname-dev py3-olm-pyc py3-olm:py3"
build() {
- cmake \
- -DCMAKE_BUILD_TYPE=None \
+ cmake -B build -G Ninja \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
- make
+ cmake --build build
+
+ cd python
+ python3 setup.py build
}
check() {
- cd "$builddir"/tests
- CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+ ctest --test-dir build/tests --output-on-failure
+
+ cd "$builddir"/python
+ local _pyarch
+ case "$CARCH" in
+ x86_64|aarch64|ppc64le) _pyarch="$CARCH" ;;
+ x86) _pyarch=i686 ;;
+ armhf|armv7) _pyarch=armv8l ;;
+ s390x) _pyarch=s390x;;
+ esac
+
+ local _py3ver=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
+
+ # TODO: fails to find _libolm.abi3.so
+ # PYTHONPATH="$PWD/build/lib.linux-$_pyarch-$_py3ver" pytest
}
package() {
- DESTDIR="$pkgdir" make install
+ DESTDIR="$pkgdir" cmake --install build
+ DESTDIR="$pkgdir" make -C "$builddir"/python install-python3
}
-sha512sums="d4781d37da48e30e259b388d2cd7a4fd126411a5fd563ad66b3ef170274296f9eb32eca0dd72a2c0fcba91a87021d1d55a3d18b8ee0fcf64605b984e4eea4355 olm-3.1.4.tar.gz"
+
+py3() {
+ depends="
+ py3-cffi
+ py3-future
+ python3
+ "
+ amove usr/lib/python3*
+}
+
+sha512sums="
+a75dbaa4321baf53dab820599ddb8740e5982a4537dd2f1df2de2d7bb5c9500d0d1af25f08495e37cc50d3176646d8d6f78bb24bc827f3c246242f07db90eea8 olm-3.2.16.tar.gz
+"