# Description: JSON implementation in C
# URL: https://github.com/json-c/json-c/wiki
# Maintainer: Juergen Daubert, jue at crux dot nu

name=json-c
version=0.17
release=1
source=(https://s3.amazonaws.com/json-c_releases/releases/$name-$version.tar.gz)

build() {
	cmake -S $name-$version -B build -G Ninja \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D CMAKE_INSTALL_LIBDIR=/usr/lib \
		-D CMAKE_BUILD_TYPE=Release \
		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
		-D BUILD_TESTING=OFF
	cmake --build build -j ${JOBS:-1}
	DESTDIR=$PKG cmake --install build
}
