summaryrefslogtreecommitdiff
path: root/user/cjson
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-05-22 19:15:13 +0000
committerZach van Rijn <me@zv.io>2022-06-12 23:51:40 +0000
commit56a78c6f37e794733c3a7cb34b2ac4544f976a6a (patch)
treec1330574bc7a72b350c407cd29a3479b8db4123c /user/cjson
parentb8951754620aa440a6a1ff6d4e4ffcf3e87bc894 (diff)
downloadpackages-56a78c6f37e794733c3a7cb34b2ac4544f976a6a.tar.gz
packages-56a78c6f37e794733c3a7cb34b2ac4544f976a6a.tar.bz2
packages-56a78c6f37e794733c3a7cb34b2ac4544f976a6a.tar.xz
packages-56a78c6f37e794733c3a7cb34b2ac4544f976a6a.zip
user/cjson: new package.
Diffstat (limited to 'user/cjson')
-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"