aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bird/APKBUILD
blob: 3713b8064a70f051a922227136d5a4e5b1a6fcd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bird
pkgver=1.4.0
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
	bird-1.4.0-readline-6.3.patch"

_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="4e5a47308335b1b0bf4691cac6c4174f  bird-1.4.0.tar.gz
4d58a7c5e495a4544b6e602a3ad658d3  bird.initd
57d11d57eebbc091249dd6344ab38097  bird-1.4.0-readline-6.3.patch"
sha256sums="da1b41cab26388b01d861c30afe41678df22dc9ea0110a14c1cc7b7bffc693c5  bird-1.4.0.tar.gz
88250ff48068d994a2b82dd62e14c836a7a1074637b52ae0360347db25253696  bird.initd
bff7a3b6ae0522443ed6a541367113587170fd7533f5e7c309772c5beaf69bd5  bird-1.4.0-readline-6.3.patch"
sha512sums="9a485999278a60568a6c5cabf36b84535312c82022813e52015676192d313fde9daf03a56aba92d956c31c4bca1f79089e354c932c59ace48ebb251882c232c6  bird-1.4.0.tar.gz
def255018b9b288bcce6e4fd5c7ad2b559f3d92b73cba7e2761abb98a37935940fdbb7c7323f442e046dd12e219abf1190d98c5fb380f13d8bac0f2d2d66b269  bird.initd
6945ba00f24879c5e4d98faa0429dbee2e1f54ba32fc4436a1337b015e2ea09f265ae330002b74084f7fe5434b8afca669d3ddbf424e6ad932c6e790f0b13a3c  bird-1.4.0-readline-6.3.patch"