# Template file for 'ngrep'
pkgname=ngrep
version=1.49.0
revision=1
build_style=gnu-configure
configure_args="--enable-ipv6 --enable-pcre2 --disable-pcap-restart"
hostmakedepends="pkg-config"
makedepends="pcre2-devel libpcap-devel"
short_desc="Like GNU grep applied to the network layer"
maintainer="Fabian Constantinescu <fabian.constantinescu@protnmail.com>"
license="MIT"
homepage="https://github.com/jpr5/ngrep"
distfiles="https://github.com/jpr5/ngrep/archive/refs/tags/v${version}.tar.gz"
checksum=6c94b31681316b7469a3ace92d2aeec7c9f490bd6782453dff2ade0e289a3348

if [ "$CROSS_BUILD" ]; then
	configure_args+=" --with-pcap-includes=${XBPS_CROSS_BASE}/usr/include"
	configure_args+=" --with-pcre2-includes=${XBPS_CROSS_BASE}/usr/include"
	export NGREP_PCRE2_CONFIG_SCRIPT="${XBPS_CROSS_BASE}/usr/bin/pcre2-config"
fi

post_install() {
	vlicense LICENSE
}
