summaryrefslogtreecommitdiff
path: root/user/olm/APKBUILD
blob: 335484639ec66c2267f623e133096c43571bf403 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Contributor: Dan Theisen <djt@hxx.in>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=olm
pkgver=3.2.6
pkgrel=0
pkgdesc="Implementation of the olm and megolm cryptographic ratchets"
url="https://gitlab.matrix.org/matrix-org/olm/"
arch="all"
license="Apache-2.0"
depends=""
makedepends="cmake"
subpackages="$pkgname-dev"
source="https://gitlab.matrix.org/matrix-org/olm/-/archive/$pkgver/olm-$pkgver.tar.bz2"

# secfixes:
#   3.2.6-r0:
#     - CVE-2021-34813

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e22af4e7791962978ea4c39b9bebf807a864ca52b329f032e5e398864cd142c1f166aadbce74cb85f776cb0b8352754151f64c60dac2ce1858def73d684fd44a  olm-3.2.6.tar.bz2"