summaryrefslogtreecommitdiffstats
path: root/alpine/APKBUILD.in
blob: 1c579a8e72477167a2597f6f0f774311fe73b182 (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
# Maintainer: Arthur Jones <arthur.jones@riverbed.com>
pkgname=frr
pkgver=@VERSION@
pkgrel=0
pkgdesc="Free Range Routing is a fork of quagga"
url="https://frrouting.org/"
arch="x86_64"
license="GPL-2.0"
depends="json-c c-ares ipsec-tools iproute2 python py-ipaddr bash"
makedepends="ncurses-dev net-snmp-dev gawk texinfo perl
    acct autoconf automake bash binutils bison bsd-compat-headers build-base
    c-ares c-ares-dev ca-certificates cryptsetup-libs curl device-mapper-libs
    expat fakeroot flex fortify-headers gdbm git gmp isl json-c-dev kmod
    lddtree libacl libatomic libattr libblkid libburn libbz2 libc-dev
    libcap-dev libcurl libedit libffi libgcc libgomp libisoburn libisofs
    libltdl libressl libssh2 libstdc++ libtool libuuid libyang-dev
    linux-headers lzip lzo m4 make mkinitfs mpc1 mpfr4 mtools musl-dev
    ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre
    perl pkgconf python2 python2-dev readline readline-dev sqlite-libs
    squashfs-tools sudo tar texinfo xorriso xz-libs py-pip py-sphinx rtrlib
    rtrlib-dev"
checkdepends="pytest py-setuptools"
install="$pkgname.pre-install $pkgname.pre-deinstall $pkgname.post-deinstall"
subpackages="$pkgname-dev $pkgname-doc $pkgname-dbg"
source="$pkgname-$pkgver.tar.gz"

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

_sbindir=/usr/lib/frr
_sysconfdir=/etc/frr
_libdir=/usr/lib
_localstatedir=/var/run/frr
_user=frr

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sbindir=$_sbindir \
		--sysconfdir=$_sysconfdir \
		--libdir=$_libdir \
		--localstatedir=$_localstatedir \
		--enable-systemd=no \
		--enable-rpki \
		--enable-vtysh \
		--enable-multipath=64 \
		--enable-vty-group=frrvty \
		--enable-user=$_user \
		--enable-group=$_user
	make
}

check() {
	cd "$builddir"

	make -j 1 check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -Dm644 "$builddir"/tools/etc/frr/daemons "$pkgdir"$_sysconfdir
	install -d "$pkgdir"/etc/init.d
	ln -s ${_sbindir}/frr "$pkgdir"/etc/init.d/frr
}