# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=iptstate
pkgver=2.2.7
pkgrel=0
pkgdesc="Top-like interface to netfilter connection-tracking table"
url="https://www.phildev.net/iptstate/"
arch="all"
license="MIT"
makedepends="ncurses-dev libnetfilter_conntrack-dev libnfnetlink-dev linux-headers"
subpackages="$pkgname-doc"
source="https://github.com/jaymzh/iptstate/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2"

build() {
	make
}

check() {
	./iptstate --help > /dev/null
}

package() {
	install -D -m755 $pkgname "$pkgdir"/usr/sbin/$pkgname
	install -D -m444 $pkgname.8 "$pkgdir"/usr/share/man/man8/$pkgname.8
	install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
43e258639e0f728d4a393d2dd7a834a6df1131da5291559a504800a0918dad3e010baaeb1bca66cb9a62bad6955f678be3302aac916fc956a525cdd7e9d0690a  iptstate-2.2.7.tar.bz2
"
