aboutsummaryrefslogtreecommitdiffstats
path: root/main/czmq/APKBUILD
blob: 3c62aa2f76c3ac0f2916a3d3472f77254adc1019 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=czmq
pkgver=4.2.0
pkgrel=2
pkgdesc="High-level C binding for ZeroMQ"
url="http://czmq.zeromq.org/"
arch="all !s390x"  # zproxy test timeouts on s390x
license="MPL-2.0"
makedepends="util-linux-dev zeromq-dev cmake"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/zeromq/czmq/archive/v$pkgver.tar.gz"

case "$CARCH" in
# crypto tests assume MIPS is little-endian
	mips*)	options="!check";;
esac

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 \
		$CMAKE_CROSSOPTS .
	make -C build
}

check() {
	make -C build test
}

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

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/cmake "$pkgdir"/usr/lib
}

sha512sums="d6b6356c07095579e6780386e6c5ead6f87c1f3a80d15afbfaea24a9c108ef13ab750e7dcffbcc4d8528fb5b14b0b28f08008d513b2cf85f2df10b7cf5903212  czmq-4.2.0.tar.gz"