aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga/APKBUILD
blob: 5593a12dad75cca81730ca1b2d537dfc48074138 (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
108
109
110
111
112
113
114
115
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=quagga
pkgver=0.99.23
pkgrel=2
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 $pkgname-dbg"
pkgusers="quagga"
pkggroups="quagga"
source="http://download.savannah.gnu.org/releases/quagga/quagga-$pkgver.tar.xz
	0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
	0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
	0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
	0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
	0005-bgpd-fix-IP-endianness-in-debug-message.patch
	0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
	1001-bgpd-implement-next-hop-self-all.patch
	musl-fix-headers.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="92dff03272aa9127ac13c6bea9c66187  quagga-0.99.23.tar.xz
af552fbb454cfde2559d4cfa34bf9af3  0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
d1441d208e8ecd676494b24dc45729d7  0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
d2870b0ce97796503b2c284fc9668129  0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
2be17285dba25b2d07e546f95745c4a1  0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
d114d29e5463f910588b8a696af950bd  0005-bgpd-fix-IP-endianness-in-debug-message.patch
265489d300fb6be9eb871fc3a29532ee  0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
2e78b3ea20041f94ff99798d37e1456e  1001-bgpd-implement-next-hop-self-all.patch
df62890cccdb7d9c7cc9b96167b9da8c  musl-fix-headers.patch
e80a3df594eba8b09e19aa28d9283698  bgpd.initd
33d0e34f11460881161ab930d3d3b987  zebra.initd
34e06a1d2bc602ce691abc9ed169dd15  zebra.confd"
sha256sums="7f374da7bab275b9dd2be864ac6fb4e0552d455d6b15a7f1d7128f5208eadeee  quagga-0.99.23.tar.xz
afbf34bf84ed43d4a9ad9669adb5b3ffa7f8cd0a5993484032c5e7ddd50f474c  0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
64c956e8a57bc8137b88ec373a03afd09dd37b463f6a9817db74f730227dea64  0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
82e1aa8c89ad542fb97c5d296151aa855c491d5df9bb7c0c858e9674ec57b313  0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
f9d6bb23ca06ad024c75d0dbd7b1c73faa6fbc649ab11d27be16245342a1bae5  0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
3c8fb410e589d679b98715bb3fce95dba408393a6a8f62a15def20e57d882e37  0005-bgpd-fix-IP-endianness-in-debug-message.patch
3b54a7af83a7bc2750930e9810a89709221067261b2d4326cadc7cd069beb334  0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
979ed4f7a3e3b604a2cd3c717df467e253a4b75160f870343e6d96af0c9687ec  1001-bgpd-implement-next-hop-self-all.patch
f59f1f654e80ae9c80e6ea150e210d82aa799d44624fa361348fc242849d0ebc  musl-fix-headers.patch
41471bfda120cb57bc0f40e87ec23a4f150d2b97c97ececdda6c408eab7cf9a3  bgpd.initd
d6cc9280df63859ba711ad2071b38b9ce317d718c34840a2b101debef3fa7b56  zebra.initd
f7a52d383f60270a5a8fee5d4ac522c5c0ec2b7c4b5252cff54e260f32d9b323  zebra.confd"
sha512sums="c8072da8cec96e023ba8a53da7b2bbe6d709d13a7d03204245f6a15b70be81f88106be4864ecd552d84660cd40e89cf52260bc850f948352a3068fb08fd918e0  quagga-0.99.23.tar.xz
6c4dd606f879098ee1d56149899e9ef213b7527cbb3a5236c6229dcd892a0da4975d3edfaf831b1d9acc884e677f76286d06041af169d5e09adf6bf600765478  0001-bgpd-fix-some-bgp_update_main-attribute-leaks.patch
86e363f8425630fc52fa9b88f949bde14fc1937a292ff44036b4661c23d004932788c62eaf324417b1296cc78a662a6355f122df78ad7f75b1aba6e141fb1260  0002-bgpd-remove-duplicate-route-map-extcommunity-code.patch
7fb65225698f3a3730f0fd6714e3390c8dbad0bd5ba8c045812e07dcecc3ab967b2ff28c12de612a0c35b5eaa2058d05e31d77f574a932b97d4e422176be4d83  0003-bgpd-fix-double-free-after-extcommunity-set-BZ-799.patch
9133dfa4ff092303c5fb1f8d49d3180c4f29bfffceede8034a1bfd22449c78fb41fb23349749523b4357e5b5613d24d6740220aeabb3d6590029704b4b5678a4  0004-bgpd-fix-memory-leak-on-malformed-attribute.patch
bd99facfd6d4371d9982a8d56c36b924f6b4a8d0f4f61867ae26a07ca741bc0beb5c6522f138e4993b44e5a46f193e4f7ee7524861cbee6c823685190f73b1b9  0005-bgpd-fix-IP-endianness-in-debug-message.patch
6bfcec805233c52a8c7b042eb501c78b861386e0645cba726e4d4bd02a300219541ae0b63ff78e7fd239c2c332560ac9b4f4efcb2a50682c1df95572dd3c45af  0006-bgpd-don-t-send-NOTIFY-twice-for-malformed-attrs.patch
44677f3852b31f2f2776507b0da004431d12253b5897336d49525114a87945283a21d6dfe6162a73ff1f006fc235e31a753ac591aa70e6b8f4fbb3adb75e00f9  1001-bgpd-implement-next-hop-self-all.patch
b0cbef2d1544efa8a194aa4f05bd17225073dff7526bfa84a6068d7ae5806ff045c62c914999e1ecae04c4b251713aed5d5b0a6a98db6c3176ddf122d76894c7  musl-fix-headers.patch
d2bf7e8f2da49d0b039e72e76a77860b5b49d41a80550d6dc84791bbdec1d52e579393c5d42b45aa615991742421fef53ec1b92a5e740779b6060e20f5dd0413  bgpd.initd
a4955fe54729ec8cb17b72f3d2205d0a4ba814a51a5eb3635a85339de9a2d2342e4814ef8b1e011803fa1dc3c6f9a23b178848e0812576876343104854feb723  zebra.initd
900972c6f98e561dfacf384111251db262326e8764b8c763a5ef639fa11c7949c03eef5e3bce324a4b1964fe45416d2db74ae1b6bc967f7d4ba48c2eeda017c4  zebra.confd"