aboutsummaryrefslogtreecommitdiffstats
path: root/community/jsoncpp/APKBUILD
blob: 0c52e27aaeff0d6a0f84f21d204e472d6802aee1 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jsoncpp
pkgver=1.9.2
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
	meson --prefix /usr --libdir /usr/lib --buildtype release --default-library both . build
	ninja -C build
}

check() {
	ninja -C build test
}

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

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

sha512sums="7c7188199d62ae040d458d507ba62f0370c53f39c580760ee5485cae5c08e5ced0c9aea7c14f54dfd041999a7291e4d0f67f8ccd8b1030622c85590774688640  jsoncpp-1.9.2.tar.gz"