# $Id: PKGBUILD 74872 2012-08-08 02:08:13Z seblu $ # Maintainer: Sébastien Luttringer pkgbase=bird pkgname=('bird' 'bird6') pkgver=1.3.8 pkgrel=1 arch=('i686' 'x86_64' 'mips64el') url='http://bird.network.cz/' license=('GPL2') depends=('readline' 'ncurses') source=("ftp://bird.network.cz/pub/bird/${pkgname}-${pkgver}.tar.gz" 'bird.rc' 'bird.conf' 'bird.service' 'bird6.service') md5sums=('965fee1be1d5cd45ceef3926e49c18ce' '5e5346a057f187f56cce928b7e423636' '25241a4d7ef639506e0080431b2c1690' 'e82a0519dca0b289685fda44787f5911' 'c32e7f6cf1be6ed6f9aa98feea25176d') build() { cd $pkgbase-$pkgver [[ -e _build4 ]] && rm -rf _build4 [[ -e _build6 ]] && rm -rf _build6 mkdir _build4 _build6 # build ipv4 bird cd _build4 ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var make # build ipv6 bird cd ../_build6 ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-ipv6 make } package_bird () { pkgdesc='RIP, OSPFv2 and BGP daemon (ipv4 version)' backup=('etc/bird.conf') cd $pkgbase-$pkgver/_build4 make prefix="$pkgdir/usr" sysconfdir="$pkgdir/etc" localstatedir="$pkgdir/var" install make docdir="$pkgdir/usr/share/doc/$pkgname" install-docs # no /var inside pkg rm -r "$pkgdir/var" # iniscripts files install -D -m 755 "$srcdir/bird.rc" "$pkgdir/etc/rc.d/bird" install -D -m 644 "$srcdir/bird.conf" "$pkgdir/etc/conf.d/bird" # systemd file install -D -m 644 "$srcdir/bird.service" "$pkgdir/usr/lib/systemd/system/bird.service" } package_bird6 () { pkgdesc='RIP, OSPFv3, RADV and BGP daemon (ipv6 version)' backup=('etc/bird6.conf') cd $pkgbase-$pkgver/_build6 make prefix="$pkgdir/usr" sysconfdir="$pkgdir/etc" localstatedir="$pkgdir/var" install make docdir="$pkgdir/usr/share/doc/$pkgname" install-docs # no /var inside pkg rm -r "$pkgdir/var" # iniscripts files install -D -m 755 "$srcdir/bird.rc" "$pkgdir/etc/rc.d/bird6" install -D -m 644 "$srcdir/bird.conf" "$pkgdir/etc/conf.d/bird6" # systemd config file install -D -m 644 "$srcdir/bird6.service" "$pkgdir/usr/lib/systemd/system/bird6.service" } # vim:set ts=2 sw=2 ft=sh et: