[arch-commits] Commit in jsoncpp/repos (staging-x86_64 staging-x86_64/PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Fri Sep 13 18:19:04 UTC 2019


    Date: Friday, September 13, 2019 @ 18:19:03
  Author: anthraxx
Revision: 362583

archrelease: copy trunk to staging-x86_64

Added:
  jsoncpp/repos/staging-x86_64/
  jsoncpp/repos/staging-x86_64/PKGBUILD
    (from rev 362582, jsoncpp/trunk/PKGBUILD)

----------+
 PKGBUILD |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

Copied: jsoncpp/repos/staging-x86_64/PKGBUILD (from rev 362582, jsoncpp/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2019-09-13 18:19:03 UTC (rev 362583)
@@ -0,0 +1,72 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Jonahtan Schaeffer <joschaeffer at gmail.com>
+# COntributor: Drake Arconis <lightdrake at gmail.com>
+
+pkgbase=jsoncpp
+pkgname=('jsoncpp' 'jsoncpp-doc')
+pkgver=1.9.1
+pkgrel=1
+pkgdesc='C++ library for interacting with JSON'
+url='https://github.com/open-source-parsers/jsoncpp'
+arch=('x86_64')
+license=('MIT' 'custom:Public_Domain')
+makedepends=('gcc-libs' 'doxygen' 'graphviz' 'python' 'meson')
+options=('staticlibs')
+source=(https://github.com/open-source-parsers/${pkgbase}/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
+sha256sums=('c7b40f5605dd972108f503f031b20186f5e5bca2b65cd4b8bd6c3e4ba8126697')
+sha512sums=('4a8352e1d32c0ba8a0aea4df1663279cb2256b334643c5b62be37dfb5951e06900ba38c010d1201511fcf7de09137d6a4b886edbb2b99160d2f62b5f4679f766')
+
+prepare() {
+  cd ${pkgbase}-${pkgver}
+  echo "${pkgver}" > version
+  sed -E "s|(version : )'1.9.0'|\1'${pkgver}'|" -i meson.build
+}
+
+build() {
+  cd ${pkgbase}-${pkgver}
+  msg2 "Building shared library..."
+  arch-meson --default-library shared build
+  ninja -C build
+
+  msg2 "Building static library..."
+  arch-meson --default-library static build-static
+  ninja -C build-static
+
+  msg2 "Building docs..."
+  python doxybuild.py \
+    --doxygen="$(command -v doxygen)" \
+    --with-dot
+}
+
+check() {
+  cd ${pkgbase}-${pkgver}
+  ninja -C build test
+  cd test
+  python runjsontests.py ../build/jsontestrunner
+  python rununittests.py ../build/jsoncpp_test
+}
+
+package_jsoncpp() {
+  depends=('gcc-libs')
+  optdepends=('jsoncpp-doc: documentation')
+  provides=('libjsoncpp.so')
+
+  cd ${pkgbase}-${pkgver}
+  DESTDIR="${pkgdir}" ninja -C build install
+  DESTDIR="${pkgdir}" ninja -C build-static install
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+package_jsoncpp-doc() {
+  pkgdesc+=' (documentation)'
+  optdepends=('jsoncpp')
+
+  cd ${pkgbase}-${pkgver}
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -dm 755 "${pkgdir}/usr/share/doc/${pkgbase}"
+  cp -a dist/doxygen/jsoncpp-api-html-${pkgver} "${pkgdir}/usr/share/doc/${pkgbase}/html"
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list