# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=npd6
pkgver=1.1.0
pkgrel=1
pkgdesc="Neighbor proxy daemon for IPv6"
url="https://www.ipsidixit.net/"
arch="all"
license="GPL-3.0-or-later"
makedepends="linux-headers"
subpackages="$pkgname-doc $pkgname-openrc"
options="!check" # No test suite present
source="$pkgname-$pkgver.tar.gz::https://github.com/npd6/npd6/archive/$pkgver.tar.gz
	remove-sysctl-h.patch
	$pkgname.initd
	$pkgname.confd"

build() {
	make CFLAGS="$CFLAGS -fcommon" LDFLAGS="$LDFLAGS"
}

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

	rm -r "$pkgdir"/etc/init.d
	install -Dm0755 "$srcdir"/npd6.initd "$pkgdir"/etc/init.d/npd6
	install -Dm0644 "$srcdir"/npd6.confd "$pkgdir"/etc/conf.d/npd6
}

sha512sums="5cecbae63823f8729d6b24894e47e36d7278b2074499de7938a62e774cd41b4324611cfeb672d35b4d52ebe68c0dccc52a6a376c2b04fe62b5a2eeaadff32ca9  npd6-1.1.0.tar.gz
a4d1c63af209d2c74ba16b4375e59048515a14711483ef1b7c32fb697d319ae4a5eb78976c9971ff2089aa67fd444ef646f578d37a81d7463071a0a1adb1ee03  remove-sysctl-h.patch
f1251bb2735a9624ec958d5518740494b5f301da848b477eda89819b274e34ac58ae346cd09eb9395ae007eb1753e8a42155ca26cfad77e9f5ee717876163522  npd6.initd
b2b883ab38ce5d3063e358d365a60c33e0f5603a7a4ecf2199248f75d1266dc8638e1670a46d9546c88cc3ac123f61d9a613b0607944291dc61ce540cfb5b546  npd6.confd"
