# Template build file for 'json-c'.
pkgname=json-c
version=0.11
revision=3
disable_parallel_build=yes
build_style=gnu-configure
hostmakedepends="automake libtool"
short_desc="A JSON implementation in C"
maintainer="Juan RP <xtraeme@gmail.com>"
license="MIT"
homepage="http://oss.metaparadigm.com/$pkgname"
distfiles="https://s3.amazonaws.com/json-c_releases/releases/$pkgname-$version.tar.gz"
checksum=28dfc65145dc0d4df1dfe7701ac173c4e5f9347176c8983edbfac9149494448c

pre_configure() {
	autoreconf -fi
}

post_install() {
	vinstall COPYING 644 usr/share/licenses/${pkgname}
}

json-c-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
		vmove usr/include
		vmove usr/lib/pkgconfig
	}
}
