32 lines
1021 B
Bash
32 lines
1021 B
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=nlohmann-json
|
|
_pkgbase=json
|
|
pkgver=3.9.1
|
|
pkgrel=1
|
|
pkgdesc="JSON for Modern C++"
|
|
arch=('any')
|
|
url='https://github.com/nlohmann/json'
|
|
license=('Expat')
|
|
makedepends=('cmake')
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/nlohmann/json/archive/refs/tags/v${pkgver}.tar.gz")
|
|
sha512sums=('e0eb4727bea993af984f832e069d03a21219befae0f24ee49e67a1144cf1e8428dcf2e37f683aedb8d14118545d5087f2b7d822a576944cef3e590a12be51642')
|
|
|
|
build() {
|
|
cmake -DCMAKE_INSTALL_PREFIX='/usr' \
|
|
-DCMAKE_INSTALL_LIBDIR='/usr/lib' \
|
|
-DCMAKE_BUILD_TYPE='None' \
|
|
-DJSON_MultipleHeaders=ON \
|
|
-Wno-dev \
|
|
-B "$_pkgbase-$pkgver/build" \
|
|
-S "$_pkgbase-$pkgver"
|
|
make VERBOSE=1 -C "$_pkgbase-$pkgver/build"
|
|
}
|
|
|
|
package() {
|
|
cd $_pkgbase-$pkgver
|
|
make DESTDIR="${pkgdir}" install -C build
|
|
install -vDm644 {CODE_OF_CONDUCT,README}.md -t "${pkgdir}/usr/share/doc/$pkgname"
|
|
install -vDm644 LICENSE.MIT -t "${pkgdir}/usr/share/licenses/$pkgname"
|
|
}
|