aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga/APKBUILD
blob: 7546e6f906e4eb7f99ba097705013cee9b5f1bf7 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=quagga
pkgver=0.99.22.4
pkgrel=6
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 perl net-snmp-dev"
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
	0001-vtysh-don-t-append-superflous-spaces-BZ-750.patch
	0002-bgpd-ospfd-zebra-fix-some-DEFUN-definitions.patch
	0003-lib-rewrite-command-matching.patch
	1001-bgpd-implement-next-hop-self-all.patch
	musl-fix-headers.patch
	quagga-readline-6.3.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-ipv6 \
		--enable-ospf6d \
		--enable-rtadv \
		--enable-user=quagga \
		--enable-group=quagga \
		--enable-vty-group=quagga \
		--enable-vtysh \
		--enable-snmp \
		--enable-multipath=64 \
		--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="03ef24a448be47beba80efa2152f8a28  quagga-0.99.22.4.tar.xz
e943bdde8ba1a2896672b634d554f504  0001-vtysh-don-t-append-superflous-spaces-BZ-750.patch
1a5c657062304c2b1764fef0882ca0ca  0002-bgpd-ospfd-zebra-fix-some-DEFUN-definitions.patch
22612b753bd4842ffc63a96b87beb67e  0003-lib-rewrite-command-matching.patch
2e78b3ea20041f94ff99798d37e1456e  1001-bgpd-implement-next-hop-self-all.patch
27812f0aaaf8507c4338371aca1bd08d  musl-fix-headers.patch
67bea3d72089733c031885cfa843b972  quagga-readline-6.3.patch
e80a3df594eba8b09e19aa28d9283698  bgpd.initd
33d0e34f11460881161ab930d3d3b987  zebra.initd
34e06a1d2bc602ce691abc9ed169dd15  zebra.confd"
sha256sums="5e12056692e2dbc272a929f96d0e98d9873f4e7f7ffcca62434b58f6660a6386  quagga-0.99.22.4.tar.xz
29f35175dd1e22ba5f3c18c8ef4addaa5894bf4b942bcd84875c4512a0999139  0001-vtysh-don-t-append-superflous-spaces-BZ-750.patch
1d0a162da4b09472d677d6edb13c32c84fecbfbc9b4c043846199979aa67fe0b  0002-bgpd-ospfd-zebra-fix-some-DEFUN-definitions.patch
6a71d3d48de7cf8f9c4b554e1b455e9734ee71cb36d770a001843ed79411af38  0003-lib-rewrite-command-matching.patch
979ed4f7a3e3b604a2cd3c717df467e253a4b75160f870343e6d96af0c9687ec  1001-bgpd-implement-next-hop-self-all.patch
19068f58f034891c07b8a1324d0645e0f078e3dc98d1360d51c677cecaae8c9e  musl-fix-headers.patch
e4f6c38b3124df2ae328f37bcc2fbc43eeb10b6d8887ca2e38e19e5536aae0d1  quagga-readline-6.3.patch
41471bfda120cb57bc0f40e87ec23a4f150d2b97c97ececdda6c408eab7cf9a3  bgpd.initd
d6cc9280df63859ba711ad2071b38b9ce317d718c34840a2b101debef3fa7b56  zebra.initd
f7a52d383f60270a5a8fee5d4ac522c5c0ec2b7c4b5252cff54e260f32d9b323  zebra.confd"
sha512sums="bcf429e71073e4fc71efc364a21a6c8b70871a17c66bd1328bc57b57962c2c15182436183b2e363c9c1c0e85d84c49d304d4049d40129272f52d6140db330b8a  quagga-0.99.22.4.tar.xz
b34db681155ade1e6dab4df733acb512cdb9adf42fd7ce06bd70fead1572c68d0845c0de5a2411257242c6ad9ce04bc428c4bb0fc2ab7192415fd6a957755039  0001-vtysh-don-t-append-superflous-spaces-BZ-750.patch
e6eee34f13850205e4494c607ccd6bcc7f66b6456ecb986a83910e6c5f4f3f388e1cd7974f28cb591429b0a63e61ab2e21dfb3b1787f8844bfccebb4a1f3276e  0002-bgpd-ospfd-zebra-fix-some-DEFUN-definitions.patch
d1274367fb9dcf8ead73b003569291b462c4d5eab26a8f85c98eb7539c12a9c64063b487bb88aa8fe55469da607f09ea55f02691931cdc77e18d5b622b19d5c3  0003-lib-rewrite-command-matching.patch
44677f3852b31f2f2776507b0da004431d12253b5897336d49525114a87945283a21d6dfe6162a73ff1f006fc235e31a753ac591aa70e6b8f4fbb3adb75e00f9  1001-bgpd-implement-next-hop-self-all.patch
28a1695bd77991790df3b1b5a2c8ced929e6413e9acb87c4a8286569d05b20e65cba466e118fc16a11c264ba11dd1581e4143031ce3bbb478177e900ea68cb07  musl-fix-headers.patch
587c5597fad4f54fb2ed21bc06c86b1e78ed9543a363b6b39ac688112dc08b2264ea59caa3a209718a7f07abf47bf3dea8055afb3da139c6197cfe19fa8503bf  quagga-readline-6.3.patch
d2bf7e8f2da49d0b039e72e76a77860b5b49d41a80550d6dc84791bbdec1d52e579393c5d42b45aa615991742421fef53ec1b92a5e740779b6060e20f5dd0413  bgpd.initd
a4955fe54729ec8cb17b72f3d2205d0a4ba814a51a5eb3635a85339de9a2d2342e4814ef8b1e011803fa1dc3c6f9a23b178848e0812576876343104854feb723  zebra.initd
900972c6f98e561dfacf384111251db262326e8764b8c763a5ef639fa11c7949c03eef5e3bce324a4b1964fe45416d2db74ae1b6bc967f7d4ba48c2eeda017c4  zebra.confd"