summaryrefslogtreecommitdiffstats
path: root/alpine
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
commit2c7cac91ed6e7db0f6937923d2b57f97dbdbc337 (patch)
treec05dc0f8e6aa3accc84e3e5cffc933ed94941383 /alpine
parentInitial commit. (diff)
downloadfrr-upstream.tar.xz
frr-upstream.zip
Adding upstream version 8.4.4.upstream/8.4.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'alpine')
-rw-r--r--alpine/.gitignore1
-rw-r--r--alpine/APKBUILD.in66
-rwxr-xr-xalpine/frr.post-deinstall6
-rwxr-xr-xalpine/frr.pre-deinstall4
-rwxr-xr-xalpine/frr.pre-install10
5 files changed, 87 insertions, 0 deletions
diff --git a/alpine/.gitignore b/alpine/.gitignore
new file mode 100644
index 0000000..1b6593c
--- /dev/null
+++ b/alpine/.gitignore
@@ -0,0 +1 @@
+/APKBUILD
diff --git a/alpine/APKBUILD.in b/alpine/APKBUILD.in
new file mode 100644
index 0000000..51986de
--- /dev/null
+++ b/alpine/APKBUILD.in
@@ -0,0 +1,66 @@
+# Maintainer: Arthur Jones <arthur.jones@riverbed.com>
+pkgname=frr
+arch="all"
+pkgver=@VERSION@
+pkgrel=0
+pkgdesc="FRRouting is a fork of quagga"
+url="https://frrouting.org/"
+license="GPL-2.0"
+depends="json-c c-ares iproute2 python3 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
+ 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 python3 python3-dev readline readline-dev sqlite-libs
+ squashfs-tools sudo tar texinfo xorriso xz-libs py-pip rtrlib rtrlib-dev
+ py3-sphinx elfutils elfutils-dev libyang-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-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/daemons
+ install -d "$pkgdir"/etc/init.d
+ ln -s ${_sbindir}/frr "$pkgdir"/etc/init.d/frr
+}
diff --git a/alpine/frr.post-deinstall b/alpine/frr.post-deinstall
new file mode 100755
index 0000000..8f5d3dc
--- /dev/null
+++ b/alpine/frr.post-deinstall
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+getent passwd frr > /dev/null && deluser frr
+getent group frrvty > /dev/null && delgroup frrvty
+getent group frr > /dev/null && delgroup frr
+exit 0
diff --git a/alpine/frr.pre-deinstall b/alpine/frr.pre-deinstall
new file mode 100755
index 0000000..72cf73b
--- /dev/null
+++ b/alpine/frr.pre-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+/etc/init.d/frr stop
+exit 0
diff --git a/alpine/frr.pre-install b/alpine/frr.pre-install
new file mode 100755
index 0000000..da608cd
--- /dev/null
+++ b/alpine/frr.pre-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for g in frr frrvty; do
+ ! getent group $g > /dev/null && addgroup -S $g
+done
+
+! getent passwd frr > /dev/null && \
+ adduser -S -D -h /var/run/frr -s /sbin/nologin -G frr -g frr frr
+
+adduser frr frrvty