# Contributor: Francesco Zanini <francesco@zanini.me>
# Contributor: Katie Holly <holly@fuslvz.ws>
# Maintainer: Francesco Zanini <francesco@zanini.me>
pkgname=bird
pkgver=2.0.0
pkgrel=0
pkgdesc="BIRD Internet Routing Daemon"
url="http://bird.network.cz/"
arch="all"
license="GPL-2.0-or-later"
depends=""
makedepends="bison flex ncurses-dev readline-dev linux-headers"
install=""
source="
	ftp://bird.network.cz/pub/bird/bird-$pkgver.tar.gz
	bird.initd
	"
builddir="$srcdir"/bird-$pkgver

prepare() {
	cd "$builddir"
	default_prepare
	update_config_guess
}

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm755 "$srcdir"/bird.initd "$pkgdir"/etc/init.d/bird
}

sha512sums="62d39c35a25b621bbab7e4760e295c6a11b7b4ed048f5c897715401c33c5d49b804584cdd13ee337ca834f20eca4a3646919ce9035ae982fae8f2f682aa8ad06  bird-2.0.0.tar.gz
59245af3fd514421d0babcefed556597022a36d14615d596bb5c08c7dd0a6ed4519928e35a0b7ff14fe27ecfa50fa8011283c92bfc9b8355b15b3263df189d5d  bird.initd"
