# Template file for 'llhttp'
pkgname=llhttp
version=9.4.1
revision=1
build_style=cmake
configure_args="-DLLHTTP_BUILD_SHARED_LIBS=ON -DLLHTTP_BUILD_STATIC_LIBS=ON"
short_desc="Port of http_parser to llparse"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="https://llhttp.org"
# _always_ use releases. Those have the C code generated, otherwise
# we'd have a dep loop nodejs<->llhttp
distfiles="https://github.com/nodejs/llhttp/archive/release/v${version}.tar.gz"
checksum=86a8c16759fdcc7aa2c9841fbe8ba2e77ea98be7d5d45615f2604776d0ff78c7

post_install() {
	vlicense LICENSE-MIT
}

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