aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cppzmq/APKBUILD
blob: e696f6d5673ea0dbf7931674044b1c68c5e5fdcc (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
# Contributor: Andreas Laghamn <andreas.laghamn@gmail.com>
# Maintainer: Andreas Laghamn <andreas.laghamn@gmail.com>
pkgname=cppzmq
pkgver=4.6.0
pkgrel=2
pkgdesc="High-level C++ binding for ZeroMQ"
url="https://github.com/zeromq/cppzmq"
arch="noarch"
license="MIT"
makedepends="cmake zeromq-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/zeromq/cppzmq/archive/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_VERBOSE_MAKEFILE=ON \
		-DCPPZMQ_BUILD_TESTS=ON \
		$CMAKE_CROSSOPTS .
	make -C build
}

check() {
	cd build
	ctest
}

package() {
	make -C build DESTDIR="$pkgdir" install

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}
sha512sums="f30b37c970790de2684086638084e65310396072c1c1d00415c9a36b7ef6d79fe500ce174fddab699a602a80341e2fb7f309dec2eb96252531b5ca5cf7ac5027  cppzmq-4.6.0.tar.gz"