# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dhcping
pkgver=1.2
pkgrel=3
pkgdesc="dhcp daemon ping program"
url="http://www.mavetju.org/unix/general.php"
arch="all"
license="BSD-2-Clause"
subpackages="$pkgname-doc"
source="http://www.mavetju.org/download/dhcping-$pkgver.tar.gz
	fix-endless-getopt-loop.patch
	"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
84ead27ba07f7ecc1e8cf6d95b40c98ee20a39ce54386249f403120beac70c45d765d5268b4968dbfbbb92790adcc1eb648c3a87071d215ad64bcd23aec818d3  dhcping-1.2.tar.gz
cd05475f83d7f9d2c7358268483ff15c9604cacf0c9fbbfd99618fea523845c8ccd813577b6ad6b9165e395d23418e55d6545e0701813fb7af33076ebe0c0ee4  fix-endless-getopt-loop.patch
"
