summaryrefslogtreecommitdiffstats
path: root/network/frr/frr.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/frr/frr.SlackBuild')
-rw-r--r--network/frr/frr.SlackBuild43
1 files changed, 27 insertions, 16 deletions
diff --git a/network/frr/frr.SlackBuild b/network/frr/frr.SlackBuild
index c25bdfa0c4..a480815a29 100644
--- a/network/frr/frr.SlackBuild
+++ b/network/frr/frr.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for frr
-# Copyright 2018-2020 Thibaut Notteboom, Paris, FRANCE
+# Copyright 2018-2023 Thibaut Notteboom, Paris, FRANCE
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=frr
-VERSION=${VERSION:-7.3.1}
+VERSION=${VERSION:-9.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +38,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -49,6 +56,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "aarch64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -65,7 +75,7 @@ Before running this script, please add them with the following commands:
groupadd -g 357 frr
groupadd -g 358 frrvty
-useradd -c "FRR FRRouting suite" -d /var/run/frr -s /bin/false -u 357 -g frr -G frrvty frr
+useradd -c "FRR FRRouting suite" -d /var/lib/frr -s /bin/false -u 357 -g frr -G frrvty frr
EOF
exit 1
@@ -84,8 +94,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./bootstrap.sh
+autoreconf -fvi
+# docs disabled due to no python2-sphinx
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -93,7 +104,7 @@ CXXFLAGS="$SLKCFLAGS" \
--sbindir=/usr/sbin \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc/frr \
- --localstatedir=/var/run/frr \
+ --localstatedir=/var/lib/frr \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--infodir=/usr/info \
@@ -110,8 +121,8 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-fpm \
--enable-vtysh \
--enable-watchfrr \
- --enable-doc \
- --enable-doc-html \
+ --disable-doc \
+ --disable-doc-html \
--disable-systemd \
--disable-static \
--without-libpam \
@@ -120,7 +131,7 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-install -d -m 750 -o frr -g frr $PKG/etc/frr $PKG/var/log/frr $PKG/var/run/frr
+install -d -m 750 -o frr -g frr $PKG/etc/frr $PKG/var/log/frr $PKG/var/lib/frr
install -D -m 640 -o frr -g frr tools/etc/frr/daemons $PKG/etc/frr/daemons.new
install -D -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf $PKG/etc/frr/vtysh.conf.new
@@ -130,15 +141,15 @@ install -D -m 644 redhat/frr.logrotate $PKG/etc/logrotate.d/frr.new
sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' $PKG/usr/sbin/{frr-reload.py,generate_support_bundle.py}
-# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/frr/modules/*.la
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# disable man and info for now
+#find $PKG/usr/man -type f -exec gzip -9 {} \;
+#for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*.info*
+#rm -f $PKG/usr/info/dir
+#gzip -9 $PKG/usr/info/*.info*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
@@ -151,4 +162,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE