aports/main/jsoncpp/APKBUILD
Natanael Copa 4b77b1489c main/jsoncpp: claim maintainership and use --default-library both
meson supports --default-library both which will build and install both
shared and static libraries. This way we avoid build same sources twice.
2019-04-03 12:20:35 +00:00

39 lines
1.0 KiB
Plaintext

# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jsoncpp
pkgver=1.8.4
pkgrel=1
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"
builddir="$srcdir"/$pkgname-$pkgver
build() {
cd "$builddir"
# 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() {
cd "$builddir"
ninja -C build test
}
package() {
cd "$builddir"
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="f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1 jsoncpp-1.8.4.tar.gz"