# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sngrep
pkgver=1.8.2
pkgrel=0
pkgdesc="display SIP call message flows from a terminal"
url="https://github.com/irontec/sngrep"
arch="all !ppc64le"
license="GPL-3.0-or-later"
depends="sed"
makedepends="autoconf automake ncurses-dev libpcap-dev
	pcre2-dev libgcrypt-dev openssl-dev>3"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/irontec/sngrep/archive/v$pkgver.tar.gz
	disable-failing-test.patch
	"

prepare() {
	default_prepare
	./bootstrap.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-openssl \
		--with-pcre2 \
		--disable-logo \
		--enable-unicode \
		--enable-eep \
		--enable-ipv6
	make
}

check() {
	make check
}

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

sha512sums="
0aa630ccd1816e81ed2d16f30275326ea4a91becd053ce5480a9695300e0cf1a97d06b75be248e8915a3e61f94baad0f6e61c2b580a28d291d1b8204388570c4  sngrep-1.8.2.tar.gz
7fc1e65fb0fbb81118b7484fefc6501bfc0c87314f3d6dc7c974dc41b8fae38ba0f48d66d4234e3f9d81a63facc42ea8c15fb0f6120f86dc3b4c9b09d1b9539a  disable-failing-test.patch
"
