summaryrefslogtreecommitdiff
path: root/user/cjson/APKBUILD
blob: 2b2f63dd56b4d8508d44d6eb18724b820df6654e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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"