summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/cjson/APKBUILD36
1 files changed, 36 insertions, 0 deletions
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 <thinkabit.ukim@gmail.com>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Zach van Rijn <me@zv.io>
+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"