[arch-commits] Commit in (4 files)

David Runge dvzrv at archlinux.org
Thu Feb 20 07:58:59 UTC 2020


    Date: Thursday, February 20, 2020 @ 07:58:59
  Author: dvzrv
Revision: 576959

Adding nlohmann-json from the AUR as makedepends for giada.

Added:
  nlohmann-json/
  nlohmann-json/repos/
  nlohmann-json/trunk/
  nlohmann-json/trunk/PKGBUILD

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

Added: nlohmann-json/trunk/PKGBUILD
===================================================================
--- nlohmann-json/trunk/PKGBUILD	                        (rev 0)
+++ nlohmann-json/trunk/PKGBUILD	2020-02-20 07:58:59 UTC (rev 576959)
@@ -0,0 +1,43 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=nlohmann-json
+pkgver=3.7.3
+# upstream doesn't use annotated tags:
+_commit=e7b3b40b5a95bc74b9a7f662830a27c49ffc01b4
+pkgrel=3
+pkgdesc="JSON for Modern C++"
+arch=('any')
+url="https://github.com/nlohmann/json"
+license=('MIT')
+makedepends=('cmake' 'git' 'meson')
+source=("${pkgname}::git+https://github.com/nlohmann/json#commit=${_commit}?signed")
+md5sums=('SKIP')
+validpgpkeys=('797167AE41C0A6D9232E48457F3CEA63AE251B69') # Niels Lohmann <mail at nlohmann.me>
+
+prepare() {
+  mv -v "$pkgname" "$pkgname-$pkgver"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  cmake -DCMAKE_INSTALL_PREFIX=/usr \
+        -DBUILD_TESTING=ON \
+        -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+        -DJSON_MultipleHeaders=ON \
+        -B build \
+        -S .
+  make VERBOSE=1 -C build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  make -k check
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  make DESTDIR="${pkgdir}" install -C build
+  install -vDm 644 {CODE_OF_CONDUCT,README}.md \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+  install -vDm 644 LICENSE.MIT -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}



More information about the arch-commits mailing list