# Template file for 'http-parser'
pkgname=http-parser
# 2.9.4, plus upstream commits through ec8b5ee, plus fc70ce0 from nodejs/node
version=2.9.4.20201223
revision=1
_githash=ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d
build_style=gnu-makefile
make_build_target=library
short_desc="HTTP request/response parser for c"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="https://github.com/nodejs/http-parser"
distfiles="${homepage}/archive/${_githash}.tar.gz"
checksum=765a21444322ea2476ca1e3cfeb74d280eeb37f4713cf52d2bf398dabf6e4128

pre_install() {
	vmkdir usr/lib/pkgconfig
	vmkdir usr/include
}

post_install() {
	vlicense LICENSE-MIT
}

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