aboutsummaryrefslogtreecommitdiffstats
path: root/community/libsignal-protocol-c/APKBUILD
blob: ce3257915ac655b2c6564790a3ac725a8fca3b49 (plain)
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
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=libsignal-protocol-c
pkgver=2.3.3
pkgrel=2
pkgdesc="Signal Protocol C Library"
url="https://github.com/signalapp/libsignal-protocol-c"
arch="all"
license="GPL-3.0-only"
makedepends="cmake openssl1.1-compat-dev check-dev"
subpackages="$pkgname-dev"
source="https://github.com/signalapp/libsignal-protocol-c/archive/v$pkgver/libsignal-protocol-c-v$pkgver.tar.gz"

# 92% tests passed, 1 tests failed out of 13
#  8/13 Test  #8: test_key_helper ..................***Failed    0.00 sec
#[ "$CARCH" = "s390x" ] && options="!check"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DBUILD_TESTING=ON
	cmake --build build
}

check() {
	cd build
	case "$CARCH" in
		s390x) CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "test_key_helper" ;;
		*) CTEST_OUTPUT_ON_FAILURE=TRUE ctest ;;
	esac
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
19d892e13fac32022658de5eaf1db8cec3226f5f3f37a4c1c33bfa9653126ecbc6350a1ab5624025f909803c2277b86321dbea7f64e9932883cae57b65f58112  libsignal-protocol-c-v2.3.3.tar.gz
"