# Maintainer: Natanael Copa pkgname=quagga pkgver=0.99.24.1 pkgrel=0 pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP." url="http://quagga.net/" arch="all" license="GPL-2" depends="iproute2" makedepends="linux-headers readline-dev ncurses-dev gawk texinfo perl net-snmp-dev" install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade" subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg" pkgusers="quagga" pkggroups="quagga" source="http://download.savannah.gnu.org/releases/quagga/quagga-$pkgver.tar.xz bgpd-gr-route-selection-fix.patch bgpd.initd zebra.initd zebra.confd " _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" quagga_cv_ipforward_method=proc \ ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --disable-static \ --enable-ospf6d \ --enable-rtadv \ --enable-user=quagga \ --enable-group=quagga \ --enable-vty-group=quagga \ --enable-vtysh \ --enable-snmp \ --enable-multipath=64 \ --enable-pimd \ --sysconfdir=/etc/quagga \ --enable-exampledir=/usr/share/doc/quagga/ \ --localstatedir=/var/run/quagga \ || return 1 # add CFLAGS to work around textrel issue make CFLAGS+="-fPIC" || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm "$pkgdir"/usr/lib/*.la || return 1 install -o quagga -g quagga -d "$pkgdir"/var/run/quagga for i in zebra bgpd; do install -Dm755 "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i done for i in ripd ospfd ripngd ospf6d; do ln -s bgpd "$pkgdir"/etc/init.d/$i || return 1 done install -Dm644 "$srcdir/zebra.confd" "$pkgdir"/etc/conf.d/zebra install -o quagga -g quagga -d -m755 "$pkgdir"/etc/quagga } md5sums="b168db69435100ee04564c4fb39c7413 quagga-0.99.24.1.tar.xz 1fbfcff69bc7df56f9e6682012261004 bgpd-gr-route-selection-fix.patch e80a3df594eba8b09e19aa28d9283698 bgpd.initd 33d0e34f11460881161ab930d3d3b987 zebra.initd 34e06a1d2bc602ce691abc9ed169dd15 zebra.confd" sha256sums="6fd6baadb136a801c29c1dd72d0fe69da9f19ae498e87bff7057778361e43b14 quagga-0.99.24.1.tar.xz 66de5b7c097aeb1767001547e219af51e43f968bd241dec7f0c71b68b54855de bgpd-gr-route-selection-fix.patch 41471bfda120cb57bc0f40e87ec23a4f150d2b97c97ececdda6c408eab7cf9a3 bgpd.initd d6cc9280df63859ba711ad2071b38b9ce317d718c34840a2b101debef3fa7b56 zebra.initd f7a52d383f60270a5a8fee5d4ac522c5c0ec2b7c4b5252cff54e260f32d9b323 zebra.confd" sha512sums="71c340ce0f4e52c69892d8fed82d30956161b09b029fb0a82ba774664aa2303b493068664ea057870bec3c7c2a1ffea0a68fba0c400d6868efef691d7b055d2a quagga-0.99.24.1.tar.xz 3e3e1862739ed47da38720d87669ee0bfa2d6e2c2c65388727c92a22cad8b5bf9f4c302701cbd0cf3ac0186eeb1498aefed74c85d8f43ced41c78680fdbbc2ac bgpd-gr-route-selection-fix.patch d2bf7e8f2da49d0b039e72e76a77860b5b49d41a80550d6dc84791bbdec1d52e579393c5d42b45aa615991742421fef53ec1b92a5e740779b6060e20f5dd0413 bgpd.initd a4955fe54729ec8cb17b72f3d2205d0a4ba814a51a5eb3635a85339de9a2d2342e4814ef8b1e011803fa1dc3c6f9a23b178848e0812576876343104854feb723 zebra.initd 900972c6f98e561dfacf384111251db262326e8764b8c763a5ef639fa11c7949c03eef5e3bce324a4b1964fe45416d2db74ae1b6bc967f7d4ba48c2eeda017c4 zebra.confd"