diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-07 15:06:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-07 15:08:34 +0000 |
commit | a9cae331dbb70acd5938b0fa6f95245229157882 (patch) | |
tree | b14d35dfd92d03a42531a10366f772b622edb41b | |
parent | 1da792ee04c8f35d0a5e78bc5664eb2df86a833a (diff) | |
download | aports-a9cae331dbb70acd5938b0fa6f95245229157882.tar.bz2 aports-a9cae331dbb70acd5938b0fa6f95245229157882.tar.xz |
testing/bird: new aport
BIRD Internet Routing Daemon
http://bird.network.cz/
-rw-r--r-- | testing/bird/APKBUILD | 74 | ||||
-rw-r--r-- | testing/bird/bird.initd | 28 |
2 files changed, 102 insertions, 0 deletions
diff --git a/testing/bird/APKBUILD b/testing/bird/APKBUILD new file mode 100644 index 0000000000..a94d08343d --- /dev/null +++ b/testing/bird/APKBUILD @@ -0,0 +1,74 @@ +# Contributor: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=bird +pkgver=1.3.7 +pkgrel=0 +pkgdesc="BIRD Internet Routing Daemon" +url="http://bird.network.cz/" +arch="all" +license="GPLv2+" +depends="" +makedepends="bison flex ncurses-dev readline-dev" +install="" +subpackages="bird6" +source="ftp://bird.network.cz/pub/bird/bird-$pkgver.tar.gz + bird.initd" + +_builddir="$srcdir"/bird-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + # generate bird6.initd + cd "$srcdir" + sed -e 's/^name=.*/name=bird6/' bird.initd > bird6.initd +} + +_build() { + ../configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + $@ \ + || return 1 + make || return 1 +} + + +build() { + cd "$_builddir" + mkdir -p ipv6 ipv4 + cd "$_builddir"/ipv6 + _build --enable-ipv6 || return 1 + cd "$_builddir"/ipv4 + _build || return 1 +} + +package() { + cd "$_builddir"/ipv4 + make DESTDIR="$pkgdir" install || return 1 + cd "$_builddir"/ipv6 + make DESTDIR="$pkgdir" install || return 1 + for i in bird bird6; do + install -Dm755 "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i \ + || return 1 + done +} + +bird6() { + pkgdesc="BIRD Internet Routing Daemon for IPv6" + mkdir -p "$subpkgdir"/etc \ + "$subpkgdir"/etc/init.d \ + "$subpkgdir"/usr/sbin || return 1 + mv "$pkgdir"/etc/*6.conf "$subpkgdir"/etc/ || return 1 + for i in etc/init.d usr/sbin; do + mv "$pkgdir"/$i/*6 "$subpkgdir"/$i/ || return 1 + done +} + +md5sums="c400b008ef834d9e7288dcdbe41b7c15 bird-1.3.7.tar.gz +4d58a7c5e495a4544b6e602a3ad658d3 bird.initd" diff --git a/testing/bird/bird.initd b/testing/bird/bird.initd new file mode 100644 index 0000000000..f3b51aa43f --- /dev/null +++ b/testing/bird/bird.initd @@ -0,0 +1,28 @@ +#!/sbin/runscript + +extra_started_commands="reload" + +name=bird +command=/usr/sbin/$name + +sock="/var/run/$name.ctl" +command_args="-c /etc/${name}.conf -s $sock" + + +depend() { + need net + use logger + after firewall +} + +start_pre() { + [ -f "/etc/$name.conf" ] && return 0 + eerror "Please create /etc/$name.conf" + return 1 +} + +reload() { + ebegin "Reloading $name" + killall -HUP $command + eend $? +} |