# Template file for 'jq'
pkgname=jq
version=1.8.2
revision=1
build_style=gnu-configure
makedepends="oniguruma-devel"
short_desc="Command-line JSON processor"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="https://jqlang.github.io/jq/"
distfiles="https://github.com/jqlang/jq/releases/download/jq-${version}/jq-${version}.tar.gz"
checksum=71b8d6e8f5fe81f6c6d0d110e3892251f6ce76ed095abd315e26e6e1193af3af
CFLAGS=" -D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"

pre_configure() {
	echo "echo $version" >scripts/version
}

post_install() {
	rm -rf ${DESTDIR}/usr/share/doc/$pkgname
	vlicense COPYING
}

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