52 lines
1.4 KiB
Bash
52 lines
1.4 KiB
Bash
name='nlohmann-json'
|
|
version='3.12.0'
|
|
release='2'
|
|
desc='Header-only JSON library for Modern C++'
|
|
desc_ru='Библиотека JSON только из заголовочных файлов для современного C++'
|
|
homepage='https://github.com/nlohmann/json'
|
|
maintainer="Evgeny Khramov <xpamych@yandex.ru>"
|
|
maintainer_ru="Евгений Храмов <xpamych@yandex.ru>"
|
|
architectures=('amd64')
|
|
license=('MIT')
|
|
provides=('nlohmann-json')
|
|
conflicts=('nlohmann-json')
|
|
|
|
build_deps=(
|
|
'cmake'
|
|
'git'
|
|
)
|
|
build_deps_alt=("${build_deps[@]}")
|
|
build_deps_arch=("${build_deps[@]}")
|
|
build_deps_debian=("${build_deps[@]}")
|
|
build_deps_fedora=("${build_deps[@]}")
|
|
build_deps_redos=("${build_deps[@]}")
|
|
build_deps_rhel=("${build_deps[@]}")
|
|
build_deps_rosa=("${build_deps[@]}")
|
|
sources=("git+https://github.com/nlohmann/json.git#tag=v${version}")
|
|
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) - 1))
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/build"
|
|
cmake ../json -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=ON
|
|
make -j$(($(nproc) - 1))
|
|
ctest --output-on-failure
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/build"
|
|
make "DESTDIR=${pkgdir}" install
|
|
}
|
|
|
|
files() {
|
|
files-find-include
|
|
files-find-share "cmake"
|
|
files-find-share "pkgconfig"
|
|
} |