summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:32 +0000
commit25b1166673c7fde5edb4dfa218005bf1a83eb25c (patch)
tree0eb5dc2c4eedabf82b7b531bbe0e5fcb75084e3e /debian/rules
parentAdding upstream version 8.4.4. (diff)
downloadfrr-debian.tar.xz
frr-debian.zip
Adding debian version 8.4.4-1.1~deb12u1.debian/8.4.4-1.1_deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules124
1 files changed, 124 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..71ee211
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,124 @@
+#!/usr/bin/make -f
+
+# standard Debian options & profiles
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
+ MAKE_SILENT="V=0"
+ export DH_VERBOSE=0
+else
+ MAKE_SILENT="V=1"
+ export DH_VERBOSE=1
+ export DH_OPTIONS=-v
+endif
+
+# package-specific build profiles
+
+ifeq ($(filter pkg.frr.nortrlib,$(DEB_BUILD_PROFILES)),)
+ CONF_RPKI=--enable-rpki
+else
+ CONF_RPKI=--disable-rpki
+endif
+
+ifeq ($(filter pkg.frr.lua,$(DEB_BUILD_PROFILES)),)
+ CONF_LUA=--disable-scripting
+else
+ CONF_LUA=--enable-scripting
+endif
+
+ifeq ($(filter pkg.frr.pim6d,$(DEB_BUILD_PROFILES)),)
+ CONF_PIM6=--disable-pim6d
+else
+ CONF_PIM6=--enable-pim6d
+endif
+
+export PYTHON=python3
+
+%:
+ dh $@ -Bbuild --with=sphinxdoc
+
+override_dh_auto_configure:
+ $(shell dpkg-buildflags --export=sh); \
+ dh_auto_configure -- \
+ --localstatedir=/var/run/frr \
+ --sbindir=/usr/lib/frr \
+ --sysconfdir=/etc/frr \
+ --with-vtysh-pager=/usr/bin/pager \
+ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr \
+ --with-moduledir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr/modules \
+ LIBTOOLFLAGS="-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/frr" \
+ --disable-dependency-tracking \
+ \
+ $(CONF_RPKI) \
+ $(CONF_LUA) \
+ $(CONF_PIM6) \
+ --with-libpam \
+ --enable-doc \
+ --enable-doc-html \
+ --enable-snmp \
+ --enable-fpm \
+ --disable-protobuf \
+ --disable-zeromq \
+ --enable-ospfapi \
+ --enable-bgp-vnc \
+ --enable-multipath=256 \
+ \
+ --enable-user=frr \
+ --enable-group=frr \
+ --enable-vty-group=frrvty \
+ --enable-configfile-mask=0640 \
+ --enable-logfile-mask=0640 \
+ # end
+
+override_dh_auto_install:
+ dh_auto_install
+
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr-reload.py
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/generate_support_bundle.py
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr_babeltrace.py
+ sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/ospfclient.py
+
+# let dh_systemd_* and dh_installinit do their thing automatically
+ cp build/tools/frr.service debian/frr.service
+ cp build/tools/frr@.service debian/frr@.service
+ cp build/tools/frrinit.sh debian/frr.init
+ -rm -f debian/tmp/usr/lib/frr/frr
+
+# install config files
+ mkdir -p debian/tmp/etc
+ cp -r tools/etc/* debian/tmp/etc/
+ -rm debian/tmp/etc/frr/daemons.conf
+
+# drop dev-only files
+ find debian/tmp -name '*.la' -o -name '*.a' -o -name 'lib*.so' | xargs rm -f
+ rm -rf debian/tmp/usr/include
+ -rm debian/tmp/usr/lib/frr/ssd
+
+override_dh_auto_build:
+ dh_auto_build -- $(MAKE_SILENT)
+
+override_dh_installinit:
+ dh_installinit -r
+
+override_dh_installsystemd:
+ dh_installsystemd -r
+
+override_dh_makeshlibs:
+ dh_makeshlibs -n
+
+override_dh_missing:
+ dh_missing --fail-missing
+
+ifneq ($(filter nocheck,$(DEB_BUILD_PROFILES) $(DEB_BUILD_OPTIONS)),)
+override_dh_auto_test:
+ true
+endif
+
+override_dh_auto_clean:
+# we generally do NOT want a full distclean since that wipes both
+# debian/changelog and config.version
+ if test -f Makefile; then make redistclean; fi
+ -rm -f debian/frr.init
+ -rm -f debian/frr.service
+ -rm -f debian/frr@.service