olm: update to 3.0.0

and split off the python bindings into a separate template
This commit is contained in:
newbluemoon 2019-02-16 19:09:09 +01:00 committed by maxice8
parent 8f6d534cac
commit 07ee1bb321
6 changed files with 41 additions and 63 deletions

View file

@ -3329,7 +3329,7 @@ libretro-gtk-0.14.so.0 retro-gtk-0.16.0_1
libmanette-0.2.so.0 libmanette-0.2.1_1
libfmt.so.5 fmt-5.2.1_1
libelementary-calendar.so.0 libio.elementary.calendar-4.2.3_1
libolm.so.2 olm-2.3.0_1
libolm.so.3 olm-3.0.0_1
libcrypto.so.44 libcrypto44-2.8.2_1
libtls.so.18 libtls18-2.8.2_1
libssl.so.46 libssl46-2.8.2_1

View file

@ -1 +0,0 @@
olm

View file

@ -0,0 +1,31 @@
# Template file for 'olm-python'
pkgname=olm-python
version=3.0.0
revision=1
wrksrc="olm-${version}"
build_wrksrc=python
build_style=python-module
pycompile_module="olm"
hostmakedepends="python-setuptools python3-setuptools python-cffi python3-cffi"
makedepends="python-devel python3-devel libffi-devel olm-devel"
depends="python-cffi python-future python-typing"
short_desc="Implementation of the Double Ratchet cryptographic ratchet (Python2)"
maintainer="Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>"
license="Apache-2.0"
homepage="https://git.matrix.org/git/olm/about/"
distfiles="https://git.matrix.org/git/olm/snapshot/olm-${version}.tar.gz"
checksum=4c54f93e4f426a9d5c8e66e63113d42fd2afca240cdcff30a469a342a6ec3bc6
pre_build() {
make include/olm/olm.h
}
olm-python3_package() {
short_desc="${short_desc/Python2/Python3}"
depends="${sourcepkg}>=${version}_${revision} python3-cffi
python3-future"
pycompile_module="olm"
pkg_install() {
vmove ${py3_sitelib}
}
}

View file

@ -1 +1 @@
olm
olm-python

View file

@ -1,16 +0,0 @@
--- python/olm/_base.py
+++ python/olm/_base.py
@@ -1,11 +1,10 @@
import os.path
from ctypes import *
+from ctypes import util
-lib = cdll.LoadLibrary(os.path.join(
- os.path.dirname(__file__), "..", "..", "build", "libolm.so.2")
-)
+lib = cdll.LoadLibrary(util.find_library("olm"))
lib.olm_error.argtypes = []
lib.olm_error.restypes = c_size_t

View file

@ -1,58 +1,22 @@
# Template file for 'olm'
pkgname=olm
version=2.3.0
version=3.0.0
revision=1
build_style=gnu-makefile
make_check_target=test
hostmakedepends="python-devel python3-devel"
makedepends="python-devel python3-devel"
short_desc="An implementation of the Double Ratchet cryptographic ratchet"
build_style=cmake
configure_args="-DOLM_TESTS=OFF"
short_desc="Implementation of the Double Ratchet cryptographic ratchet"
maintainer="Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>"
license="Apache-2.0"
homepage="https://git.matrix.org/git/olm/about/"
distfiles="https://git.matrix.org/git/olm/snapshot/${pkgname}-${version}.tar.gz"
checksum=533714fb84860e04c185790d16ef9085f15e902c2105db941d5c7e92b0565ef8
post_configure() {
# -O0 prevents _FORTIFY_SOURCE working
for _f in $(find ${wrksrc} -name Makefile); do
sed -i $_f -e "s; -O0;;"
done
}
do_install() {
make DESTDIR=${DESTDIR} PREFIX=/usr install
for pysl in $py2_sitelib $py3_sitelib; do
mkdir -p ${DESTDIR}${pysl}
cp -r ${wrksrc}/python/olm ${DESTDIR}${pysl}
done
}
distfiles="https://git.matrix.org/git/olm/snapshot/olm-${version}.tar.gz"
checksum=4c54f93e4f426a9d5c8e66e63113d42fd2afca240cdcff30a469a342a6ec3bc6
olm-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
}
}
olm-python_package() {
noarch=yes
short_desc+=" - python bindings"
depends="${sourcepkg}>=${version}_${revision} python"
pycompile_module=olm
pkg_install() {
vmove ${py2_sitelib}
}
}
olm-python3_package() {
noarch=yes
short_desc+=" - python3 bindings"
depends="${sourcepkg}>=${version}_${revision} python3"
pycompile_module=olm
pkg_install() {
vmove ${py3_sitelib}
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}