aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga/APKBUILD
blob: 50c3d51299caea9fbb6e7a8d5b52dc585d2ba093 (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
83
84
85
86
87
88
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=quagga
pkgver=0.99.21
pkgrel=3
pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF and BGP."
url="http://quagga.net/"
arch="all"
license="GPL-2"
depends="iproute2"
makedepends="readline-dev ncurses-dev gawk texinfo
	autoconf automake libtool"
install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-dev $pkgname-doc"
pkgusers="quagga"
pkggroups="quagga"
source="http://download.savannah.gnu.org/releases/quagga/quagga-$pkgver.tar.xz
	$pkgname-0.99.11-link-libcap.patch
	$pkgname-0.99.11-del-routes.patch
	quagga-0.99.16-ipctl_forwarding.patch
	automake.patch
	bgpd.initd
	ospf6d.initd
	ospfd.initd
	ripd.initd
	ripngd.initd
	zebra.initd
	zebra.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in i$source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	msg "Running autotools..."
	aclocal || return 1
	autoconf || return 1
	automake --add-missing || return 1
	libtoolize || return 1
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--disable-static \
		--enable-ipv6 \
		--enable-ospf6d \
		--enable-rtadv \
		--enable-user=quagga \
		--enable-group=quagga \
		--enable-vty-group=quagga \
		--enable-vtysh \
		--sysconfdir=/etc/quagga \
		--enable-exampledir=/usr/share/doc/quagga/ \
		--localstatedir=/var/run/quagga \
		|| return 1

	make || 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 ripd ospfd bgpd ripngd ospf6d; do
		install -Dm755 "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i
	done
	install -Dm644 "$srcdir/zebra.confd" "$pkgdir"/etc/conf.d/zebra
	install -d -m755 "$pkgdir"/etc/quagga
}
md5sums="0980758b1865b9aa0c60975120bf3453  quagga-0.99.21.tar.xz
8f99d41a8ed79e51704e8f655d255f29  quagga-0.99.11-link-libcap.patch
1cbcf60a637b2577dee4d6df711e1247  quagga-0.99.11-del-routes.patch
2328ad4066584654cfc73f66d39dc267  quagga-0.99.16-ipctl_forwarding.patch
f29ce383b0a2d43a416b9cfa20943f05  automake.patch
ec7ac8cc1103f023cf5b9482b26ece59  bgpd.initd
92aba039c049050c48abf984c2db7e2b  ospf6d.initd
878328ead225e6eb5f5f77f05ab39106  ospfd.initd
5945863133a0db33898c5c39ef23663c  ripd.initd
cda4115283d9f4a8304fec1b6881a7eb  ripngd.initd
172e5b0e3f169e2b3328123e73517084  zebra.initd
34e06a1d2bc602ce691abc9ed169dd15  zebra.confd"