# Contributor: Steve McMaster <code@mcmaster.io>
# Maintainer: Steve McMaster <code@mcmaster.io>
pkgname=libhtp
pkgver=0.5.48
pkgrel=0
pkgdesc="HTTP normalizer and parser library"
url="https://github.com/OISF/libhtp"
arch="all"
license="BSD-3-Clause"
depends_dev="zlib-dev"
makedepends="$depends_dev automake autoconf libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/OISF/libhtp/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	make check
}

sha512sums="
1270d560bcb03493afebbb9198cef669d03d347f4878635119ee845dc734cec28789ea4385ca5903b2545e250152d0278ea077641702ae0973005593f241776b  libhtp-0.5.48.tar.gz
"
