diff options
author | Chocobo1 | 2019-06-09 01:39:04 +0800 |
---|---|---|
committer | Chocobo1 | 2019-06-09 01:53:50 +0800 |
commit | c69cd47194ca84eae9c55288c478390a61f91da5 (patch) | |
tree | 819e55cdb1c49f0ee8a718dfb38b15290c2cdde9 /PKGBUILD | |
download | aur-c69cd47194ca84eae9c55288c478390a61f91da5.tar.gz |
newpkg: jsoncpp-git 1.8.4.r139.g5b91551-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8045d3b66567 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> + +pkgname=jsoncpp-git +pkgver=1.8.4.r139.g5b91551 +pkgrel=1 +pkgdesc="C++ library for interacting with JSON" +arch=('i686' 'x86_64') +url="https://github.com/open-source-parsers/jsoncpp" +license=('MIT' 'custom') +depends=('gcc-libs') +makedepends=('git' 'meson' 'python') +provides=('jsoncpp') +conflicts=('jsoncpp') +options=('staticlibs') +source=("git+https://github.com/open-source-parsers/jsoncpp.git") +sha256sums=('SKIP') + + +pkgver() { + cd "jsoncpp" + + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "jsoncpp" + + meson \ + --buildtype=plain \ + --prefix="/usr" \ + --sbindir="bin" \ + --default-library both \ + "_build" + ninja -C "_build" +} + +check() { + cd "jsoncpp" + + meson test -C "_build" + + cd "test" + python "runjsontests.py" ../_build/jsontestrunner + python "rununittests.py" ../_build/jsoncpp_test +} + +package() { + cd "jsoncpp" + + DESTDIR="$pkgdir" meson install -C "_build" + install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/jsoncpp" +} |