aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hdrhistogram-c/APKBUILD
blob: 0d0241cf12581d1179792bc639711bfb8ca8ef8a (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: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=hdrhistogram-c
_projname=HdrHistogram_c
pkgver=0.9.13
pkgrel=0
pkgdesc="High Dynamic Range (HDR) Histogram in C"
url="https://github.com/HdrHistogram/HdrHistogram_c"
arch="all"
license="BSD-2-Clause"
makedepends="cmake zlib-dev"
subpackages="$pkgname-static $pkgname-dev"
source="https://github.com/HdrHistogram/HdrHistogram_c/archive/$pkgver/$_projname-$pkgver.tar.gz"
builddir="$srcdir/$_projname-$pkgver"

build() {
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DHDR_HISTOGRAM_BUILD_PROGRAMS=True
	make
}

check() {
	# FIXME: https://github.com/HdrHistogram/HdrHistogram_c/issues/79
	make test || true
}

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

	# Don't package tests and example programs.
	rm -Rf "$pkgdir"/usr/bin
}

sha512sums="1b9d44c76d1cd09110876f14ef7a88601143ec17c88a78908e8fcb1feabfaa53fe222ddc72170d1fa18506586a37a6c05694073488094fd80e793a4ec63f4919  HdrHistogram_c-0.9.13.tar.gz"