diff options
Diffstat (limited to 'community/olm/APKBUILD')
-rw-r--r-- | community/olm/APKBUILD | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/community/olm/APKBUILD b/community/olm/APKBUILD index 5f79459768f..abb78621ccd 100644 --- a/community/olm/APKBUILD +++ b/community/olm/APKBUILD @@ -1,60 +1,72 @@ # Contributor: Bart Ribbers <bribbers@disroot.org> # Maintainer: Bart Ribbers <bribbers@disroot.org> pkgname=olm -pkgver=3.2.3 -pkgrel=0 +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 - python3-dev 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:py3" - -case "$CARCH" in - mips*) - _disable_tests=" - --deselect tests/group_session_test.py::TestClass::test_encrypt \ - --deselect tests/group_session_test.py::TestClass::test_decrypt" - ;; - *) checkdepends="$checkdepends py3-pytest-benchmark" ;; -esac +subpackages="$pkgname-dev py3-olm-pyc py3-olm:py3" build() { - cmake -B build \ - -DCMAKE_BUILD_TYPE=None \ + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib cmake --build build - make -C python olm-python3 + + cd python + python3 setup.py build } check() { - cd "$builddir"/build/tests - CTEST_OUTPUT_ON_FAILURE=TRUE ctest + ctest --test-dir build/tests --output-on-failure - # TODO: fix finding 'olm' module - # cd "$builddir"/python - # PYTHONPATH="$PWD/build/lib" pytest + 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" cmake --build build --target install + DESTDIR="$pkgdir" cmake --install build + DESTDIR="$pkgdir" make -C "$builddir"/python install-python3 } py3() { - depends="python3 py3-future py3-cffi" - DESTDIR="$subpkgdir" make -C "$builddir"/python install-python3 + depends=" + py3-cffi + py3-future + python3 + " + amove usr/lib/python3* } -sha512sums="3d487c68726d84b1ad0120e6872db77da1caffddb77026ea4f6c92571f708d221e19c93a2b25f612588162d59d63be76972f6e7d0ffd5dac1769674750b6ecbe olm-3.2.3.tar.gz" + +sha512sums=" +a75dbaa4321baf53dab820599ddb8740e5982a4537dd2f1df2de2d7bb5c9500d0d1af25f08495e37cc50d3176646d8d6f78bb24bc827f3c246242f07db90eea8 olm-3.2.16.tar.gz +" |