initial import
This commit is contained in:
60
libolm/PKGBUILD
Normal file
60
libolm/PKGBUILD
Normal file
@@ -0,0 +1,60 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=('libolm' 'python-olm')
|
||||
pkgver=3.2.1
|
||||
_debver=$pkgver
|
||||
_debrel=7
|
||||
pkgrel=1
|
||||
pkgdesc="Implementation of the Olm and Megolm cryptographic ratchets"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://gitlab.matrix.org/matrix-org/olm'
|
||||
license=('Apache-2.0')
|
||||
makedepends=('cmake' 'python' 'python-cffi' 'python-future' 'python-setuptools' 'quilt')
|
||||
source=("https://gitlab.matrix.org/matrix-org/olm/-/archive/${pkgver}/olm-${pkgver}.tar.gz"
|
||||
"https://deb.debian.org/debian/pool/main/o/olm/olm_${_debver}~dfsg-${_debrel}.debian.tar.xz")
|
||||
sha512sums=('0c24e397a02e430487639494997c7d6cf47cce229b36114db818f14173e79c5ef7d25598c25f2778da4a1647e72fdd67e8b3c6272b980132f308d5fd1b17e189'
|
||||
'0cba86c680cb9129fd72d8e0ea4e6d814b8d7daf0d9ca1445cee03f8200e87d97921274bff2c84d32736ae1ab8d6438d6a4da59135bcc6f5578e46f793adcf1c')
|
||||
|
||||
prepare() {
|
||||
cd olm-$pkgver
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd olm-$pkgver
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS}" \
|
||||
-DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS}" \
|
||||
-B build
|
||||
cmake --build build
|
||||
|
||||
cd ./python
|
||||
make olm-python3
|
||||
}
|
||||
|
||||
package_libolm() {
|
||||
depends=('gcc-libs')
|
||||
|
||||
cd olm-$pkgver/build
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 $srcdir/olm-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
|
||||
package_python-olm() {
|
||||
pkgdesc="Python bindings for Olm"
|
||||
depends=('libolm' 'python' 'python-cffi' 'python-future')
|
||||
|
||||
cd olm-$pkgver/python
|
||||
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
||||
install -Dm644 $srcdir/olm-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
||||
}
|
||||
Reference in New Issue
Block a user