[arch-commits] Commit in nlohmann-json/repos (community-any community-any/PKGBUILD)

David Runge dvzrv at archlinux.org
Thu Feb 20 08:13:46 UTC 2020


    Date: Thursday, February 20, 2020 @ 08:13:44
  Author: dvzrv
Revision: 576972

archrelease: copy trunk to community-any

Added:
  nlohmann-json/repos/community-any/
  nlohmann-json/repos/community-any/PKGBUILD
    (from rev 576971, nlohmann-json/trunk/PKGBUILD)

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

Copied: nlohmann-json/repos/community-any/PKGBUILD (from rev 576971, nlohmann-json/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2020-02-20 08:13:44 UTC (rev 576972)
@@ -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