# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=iptraf-ng
pkgver=1.2.1
pkgrel=1
pkgdesc="An IP Network Monitoring tool"
url="https://fedorahosted.org/iptraf-ng/"
arch="all"
license=" GPL-2.0-only"
makedepends="ncurses-dev linux-headers"
options="!check" # no test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://src.fedoraproject.org/repo/pkgs/iptraf-ng/v$pkgver.tar.gz/sha512/44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384/v$pkgver.tar.gz"

build() {
	make CFLAGS="$CFLAGS \
		-std=gnu99 -D_GNU_SOURCE" \
		prefix=/usr \
		sbindir_relative=bin
}

package() {
	make DESTDIR="$pkgdir" \
		prefix=/usr \
		sbindir_relative=bin \
		install
}

sha512sums="44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384  iptraf-ng-1.2.1.tar.gz"
