From b722efca6bc9b961a0dbfae8aa56b47a912a2819 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Sun, 22 May 2022 19:15:13 +0000 Subject: user/cjson: new package. --- user/cjson/APKBUILD | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 user/cjson/APKBUILD diff --git a/user/cjson/APKBUILD b/user/cjson/APKBUILD new file mode 100644 index 000000000..2b2f63dd5 --- /dev/null +++ b/user/cjson/APKBUILD @@ -0,0 +1,36 @@ +# Contributor: Leo +# Contributor: Jakub Jirutka +# Maintainer: Zach van Rijn +pkgname=cjson +pkgver=1.7.15 +pkgrel=0 +pkgdesc="Lighweight JSON parser in C" +url="https://github.com/DaveGamble/cJSON" +arch="all" +license="MIT" +depends="" +makedepends="cmake" +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://github.com/DaveGamble/cJSON/archive/v$pkgver.tar.gz" +builddir="$srcdir/cJSON-$pkgver" + +build() { + cmake -Bbuild \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_CJSON_TEST=ON \ + . + make -C build +} + +check() { + CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test +} + +package() { + make -C build install DESTDIR="$pkgdir" +} + +sha512sums="0b32a758c597fcc90c8ed0af493c9bccd611b9d4f9a03e87de3f7337bb9a28990b810befd44bc321a0cb42cbcd0b026d45761f9bab7bd798f920b7b6975fb124 cjson-1.7.15.tar.gz" -- cgit v1.2.3-70-g09d2