diff options
Diffstat (limited to 'community/jsoncpp/APKBUILD')
-rw-r--r-- | community/jsoncpp/APKBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/community/jsoncpp/APKBUILD b/community/jsoncpp/APKBUILD new file mode 100644 index 0000000000..0cad243422 --- /dev/null +++ b/community/jsoncpp/APKBUILD @@ -0,0 +1,37 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=jsoncpp +pkgver=1.9.1 +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() { + 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="4a8352e1d32c0ba8a0aea4df1663279cb2256b334643c5b62be37dfb5951e06900ba38c010d1201511fcf7de09137d6a4b886edbb2b99160d2f62b5f4679f766 jsoncpp-1.9.1.tar.gz" |