# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=jansson
pkgver=2.10
pkgrel=0
pkgdesc="lightweight JSON library"
url="http://www.digip.org/jansson/"
arch="all"
license="MIT"
depends=""
subpackages="$pkgname-dev"
source="http://www.digip.org/jansson/releases/$pkgname-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

check() {
	cd "$builddir"
	make check || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="fb51e029275e3f9fb0eb2a3307a24b17e6445fa6fde16791f29ef9f8aac6ffaf5878c4f01d2ed0ed04b2e7fcb82ca86263916745fd5b28746ed32991e59f3812  jansson-2.10.tar.bz2"
