alr-repo/nlohmann-json/lure.sh
2023-12-03 12:41:01 +03:00

39 lines
959 B
Bash
Executable File

name='nlohmann-json'
version='3.11.3'
release='1'
desc='Header-only JSON library for Modern C++'
homepage='https://github.com/nlohmann/json'
maintainer="Евгений Храмов <xpamych@yandex.ru>"
architectures=('amd64')
licenses='MIT'
provides=('nlohmann-json')
conflicts=('nlohmann-json')
build_deps_rosa=('cmake' 'git')
https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
sources=("https://github.com/nlohmann/json/archive/refs/tags/v{$version}.tar.gz")
checksums=('SKIP')
build() {
cd "${srcdir}/"
mkdir build
cd ./build
cmake ../json -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF
make -j$(nproc)
}
check() {
cd "${srcdir}/build"
cmake ../json -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=ON
make -j$(nproc)
ctest --output-on-failure
}
package() {
cd "${srcdir}/build"
make "DESTDIR=${pkgdir}" install
}