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

Levente Polyak anthraxx at archlinux.org
Sat Mar 28 16:19:58 UTC 2020


    Date: Saturday, March 28, 2020 @ 16:19:58
  Author: anthraxx
Revision: 378609

archrelease: copy trunk to staging-x86_64

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

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

Copied: jsoncpp/repos/staging-x86_64/PKGBUILD (from rev 378608, jsoncpp/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2020-03-28 16:19:58 UTC (rev 378609)
@@ -0,0 +1,71 @@
+# 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.2
+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)
+sha512sums=('7c7188199d62ae040d458d507ba62f0370c53f39c580760ee5485cae5c08e5ced0c9aea7c14f54dfd041999a7291e4d0f67f8ccd8b1030622c85590774688640')
+b2sums=('9081bf2b2599194c1c77476287e34aaeacc3c331147db79e3343eae28321e55dbfc8d74faf899912c257194030d39eac4fdb016a68290755badd1b68b0a69dd4')
+
+prepare() {
+  cd ${pkgbase}-${pkgver}
+  echo "${pkgver}" > version
+}
+
+build() {
+  cd ${pkgbase}-${pkgver}
+  echo "Building shared library..."
+  arch-meson --default-library shared build
+  ninja -C build
+
+  echo "Building static library..."
+  arch-meson --default-library static build-static
+  ninja -C build-static
+
+  echo "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