aboutsummaryrefslogtreecommitdiffstats
path: root/testing/capnproto/APKBUILD
blob: 8398f983d5f0402eb2e1cc4f03eea5ce9c2b9022 (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
44
45
46
47
48
# Contributor: Nick Black <dankamongmen@gmail.com>
# Maintainer:
pkgname=capnproto
pkgver=0.8.0
pkgrel=1
pkgdesc="Tools for working with the Cap'n Proto format"
url="https://capnproto.org/"
arch="all"
license="MIT"
depends_dev="libucontext-dev"
makedepends="$depends_dev cmake linux-headers"
subpackages="$pkgname-dev"
source="https://capnproto.org/$pkgname-c++-$pkgver.tar.gz
	ucontext.patch"
builddir="$srcdir/$pkgname-c++-$pkgver"

case "$CARCH" in
	mips*|s390x|armhf|armv7) options="!check";; # FAIL: capnp-test
esac

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		.
	cmake --build build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

# We want to move the schema compilers into the dev package.
# See https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#dev.28.29
dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
}

sha512sums="a32dbe6556a95761a5edc55237bd5558cb0ec08127f2fef1712076d5be4cd63e165a5d83b522307336bd3afeed1241f2c1e507830e8f12ac5dec78703a85417f  capnproto-c++-0.8.0.tar.gz
d2a3bd6a639356437a86e5e7fb4fe620a78b417cd20afd5b5b6fe672b95bdfa831cfaf176487cbbc2aed6345aa40dd5d7912ed05b3777b2407a0fd5bc89244f0  ucontext.patch"