aboutsummaryrefslogtreecommitdiffstats
path: root/main/quagga/APKBUILD
blob: b575628e7397249b2b4d577484afb7a1929c9c8c (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=quagga
pkgver=1.2.2
pkgrel=0
pkgdesc="A free routing daemon replacing Zebra supporting RIP, OSPF, BGP and NHRP"
url="http://quagga.net/"
arch="all"
license="GPL2"
depends="iproute2"
replaces="quagga-nhrp"
provides="quagga-nhrp=$pkgver"
makedepends="linux-headers readline-dev ncurses-dev c-ares-dev net-snmp-dev
	gawk texinfo perl"
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.gz
	1001-bgpd-allow-using-ebgp-multihop-for-ibgp-connections.patch
	dont-hook-core-signals.patch

	bgpd.initd
	zebra.initd
	zebra.confd
	"

# secfixes:
#   1.1.1-r0:
#     - CVE-2017-5495

builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	quagga_cv_ipforward_method=proc \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		--enable-ospf6d \
		--enable-rtadv \
		--enable-user=quagga \
		--enable-group=quagga \
		--enable-vty-group=quagga \
		--enable-vtysh \
		--enable-snmp \
		--enable-multipath=64 \
		--enable-pimd \
		--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

	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 nhrpd; 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
}
sha512sums="861f6524bcdc01d1a895762bf1904744c12ae4dfc7c3583ecb7e55b3978c98187bde76df0ff85093c744139be9d5cf324fec75b5ba86cf1fdbce70d923710d14  quagga-1.2.2.tar.gz
dfa33341119fe51caa7bc33b44256f57361f2e3f8192862cca215b312ceb68e6a8c264dbf2a43d6244e6152bfad110cb0fdbefb065d95dd50389cf613d9720b3  1001-bgpd-allow-using-ebgp-multihop-for-ibgp-connections.patch
5ef5c5e6d70d991b33b13a062e25b6fbde395dceee36aea29384b0640a48d2957ed5f50d416a1f2f770bf69bae2340133e35b1114be7e1fa722eb6d3d021f37a  dont-hook-core-signals.patch
13b5b57e10df013bd2d931abc49bf76b8c4dee59dbceab22c9f151ccb988b2c5f7167f2909027d5e0f990b59da8de115667b02484aee9a67d347625700f6cacd  bgpd.initd
1638a4a64ffd066b1884f7e5a4243edab68739aabd83bd35ea8c9608af7b8623eece1d59fb08feead84e4386b6d1da4220764ccf5fd7f2a9959a8470d5cce86a  zebra.initd
900972c6f98e561dfacf384111251db262326e8764b8c763a5ef639fa11c7949c03eef5e3bce324a4b1964fe45416d2db74ae1b6bc967f7d4ba48c2eeda017c4  zebra.confd"