# Maintainer:
pkgname=dhcp-helper
pkgver=1.2
pkgrel=3
pkgdesc="DHCP relay server"
url="http://www.thekelleys.org.uk/dhcp-helper/"
arch="all"
license="GPL-2.0-only OR GPL-3.0-only"
makedepends="linux-headers"
subpackages="$pkgname-doc $pkgname-openrc"
source="http://www.thekelleys.org.uk/dhcp-helper/dhcp-helper-$pkgver.tar.gz
	compile-only-once.patch
	$pkgname.initd
	$pkgname.confd"
options="!check"

build() {
	make PREFIX=/usr version="$pkgver-r$pkgrel"
}

package() {
	make PREFIX=/usr version="$pkgver-r$pkgrel" MANDIR=/usr/share/man DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="
2f81d729a261454aac8ae9b508d3f319155fc9bdb80b0822317f244ea20fa471ee214f1a1df284375612344751308998591c5e4ac742fd34d720db8e65306ba5  dhcp-helper-1.2.tar.gz
1d80211ee0fa9c27261749924ee0d623da7d54d61103705cb421eed2ad84c6f87de119f470aeb3504144be0d553b773aecf552e53c5698110d8b3a36bfe9061a  compile-only-once.patch
1eb7a60055022679247d0f95e70c2432a2d274423f799da6580d76d299c9f1c14e782820586c963031381dc6e7b55e7f20b6b9c8bdab0f4556994af90b1e6bd7  dhcp-helper.initd
0281a04898e8b63c37a159876fe7b27f47416a2b95701a3820f65b8bfc52ea56026c66cb875f1e44f1cac40a47a4ef53dc94d85de9bdaca032ef1a144c0f2884  dhcp-helper.confd
"
