summaryrefslogtreecommitdiff
path: root/community/jsoncpp/APKBUILD
blob: af16b79e062ed8ad221ec028c659e3a7d950110b (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jsoncpp
pkgver=1.9.5
pkgrel=0
pkgdesc="JSON C++ library"
url="https://github.com/open-source-parsers/jsoncpp"
arch="all"
license="Public-Domain"
makedepends="meson"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/open-source-parsers/jsoncpp/archive/$pkgver.tar.gz"

build() {
	# we cannot use cmake since jsoncpp is a dependency for cmake which
	# means we would get circular buildtime deps
	abuild-meson \
		--default-library=both \
		build
	meson compile ${JOBS:+-j ${JOBS}} -C build
}

check() {
	meson test --no-rebuild -v -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

static() {
	pkgdesc="JsonCpp static library"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}

sha512sums="
1d06e044759b1e1a4cc4960189dd7e001a0a4389d7239a6d59295af995a553518e4e0337b4b4b817e70da5d9731a4c98655af90791b6287870b5ff8d73ad8873  jsoncpp-1.9.5.tar.gz
"