# WANT_xxxx --> Set to 1 for enable, 0 for disable
# The following are the defaults. They can be overridden by setting a
# env variable to a different value
+
+WANT_LDP ?= 1
+WANT_PIM ?= 1
+WANT_OSPFAPI ?= 1
+WANT_BGP_VNC ?= 1
+WANT_CUMULUS_MODE ?= 0
+WANT_MULTIPATH ?= 1
+WANT_SNMP ?= 0
+WANT_RPKI ?= 0
+WANT_BFD ?= 1
+
+# NOTES:
#
-# export WANT_LDP=1
-# export WANT_PIM=1
-# export WANT_OSPFAPI=1
-# export WANT_TCP_ZEBRA=0
-# export WANT_BGP_VNC=0
-# export WANT_CUMULUS_MODE=0
-# export WANT_MULTIPATH=1
+# If you use WANT_RPKI, then there is a new dependency for librtr0 package
+# and a build dependency of the librtr-dev package.
+# While the librtr0 is added to the depenencies automatically, the build
+# dependency can't be changed dynamically and building will fail if the
+# librtr-dev isn't installed during package build
+# Tested versions of both packages can be found at
+# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
#
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
-# export MULTIPATH=256
-#
-# Set the following to the value required (or leave undefined for the default below)
+# Please be aware that 0 is NOT disabled, but treated as unlimited
+
+MULTIPATH ?= 256
+
+# Set the following to the value required (or leave alone for the default below)
# WANT_FRR_USER is used for the username and groupname of the FRR user account
-# export WANT_FRR_USER=frr
-# export WANT_FRR_VTY_GROUP=frrvty
+
+WANT_FRR_USER ?= frr
+WANT_FRR_VTY_GROUP ?= frrvty
+
+# Don't build PDF docs by default
+GENERATE_PDF ?= 0
+
#
####################################
USE_SNMP=--enable-snmp
$(warning "DEBIAN: SNMP enabled, sorry for your inconvenience")
else
+ USE_SNMP=--disable-snmp
$(warning "DEBIAN: SNMP disabled, see README.Debian")
endif
-ifneq ($(WANT_LDP), 0)
+ifeq ($(WANT_LDP), 1)
USE_LDP=--enable-ldpd
else
USE_LDP=--disable-ldpd
endif
-ifneq ($(WANT_PIM), 0)
+ifeq ($(WANT_PIM), 1)
USE_PIM=--enable-pimd
else
USE_PIM=--disable-pimd
endif
-ifneq ($(WANT_OSPFAPI), 0)
+ifeq ($(WANT_OSPFAPI), 1)
USE_OSPFAPI=--enable-ospfapi=yes
else
USE_OSPFAPI=--enable-ospfapi=no
endif
-ifeq ($(WANT_TCP_ZEBRA),1)
- USE_TCP_ZEBRA=--enable-tcp-zebra
-endif
-
-ifneq ($(WANT_BGP_VNC), 0)
+ifeq ($(WANT_BGP_VNC), 1)
USE_BGP_VNC=--enable-bgp-vnc=yes
else
USE_BGP_VNC=--enable-bgp-vnc=no
endif
-ifndef WANT_FRR_USER
- USE_FRR_USER=--enable-user=frr
- USE_FRR_GROUP=--enable-group=frr
+USE_FRR_USER=--enable-user=$(WANT_FRR_USER)
+USE_FRR_GROUP=--enable-group=$(WANT_FRR_USER)
+USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP)
+
+ifeq ($(WANT_MULTIPATH), 1)
+ USE_MULTIPATH=--enable-multipath=$(MULTIPATH)
else
- USE_FRR_USER=$(WANT_FRR_USER)
- USE_FRR_GROUP=$(WANT_FRR_USER)
+ USE_MULTIPATH=--disable-multipath
endif
-ifndef WANT_FRR_VTY_GROUP
- USE_FRR_VTY_GROUP=--enable-vty-group=frrvty
+ifeq ($(WANT_CUMULUS_MODE), 1)
+ USE_CUMULUS=--enable-cumulus=yes
else
- USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP)
+ USE_CUMULUS=--enable-cumulus=no
endif
-ifneq ($(WANT_MULTIPATH), 0)
- ifdef MULTIPATH
- USE_MULTIPATH=--enable-multipath=$(MULTIPATH)
- else
- USE_MULTIPATH=--enable-multipath=256
- endif
+ifeq ($(WANT_RPKI), 1)
+ USE_RPKI=--enable-rpki
else
- USE_MULTIPATH=--disable-multipath
+ USE_RPKI=--disable-rpki
endif
-ifeq ($(WANT_CUMULUS_NODE), 1)
- USE_CUMULUS=--enable-cumulus=yes
+ifeq ($(WANT_BFD), 1)
+ USE_BFD=--enable-bfdd
else
- USE_CUMULUS=--enable-cumulus=no
+ USE_BFD=--disable-bfdd
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
%:
dh $@ --with=systemd,autoreconf --parallel --dbg-package=frr-dbg --list-missing
+override_dh_gencontrol:
+ifeq ($(WANT_RPKI), 1)
+ dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)"
+else
+ dh_gencontrol
+endif
+
override_dh_auto_configure:
# Frr needs /proc to check some BSD vs Linux specific stuff.
# Else it fails with an obscure error message pointing out that
$(USE_OSPFAPI) \
$(USE_MULTIPATH) \
$(USE_LDP) \
- $(USE_TCP_ZEBRA) \
--enable-fpm \
$(USE_FRR_USER) $(USE_FRR_GROUP) \
$(USE_FRR_VTY_GROUP) \
$(USE_PIM) \
--enable-dependency-tracking \
$(USE_BGP_VNC) \
+ $(USE_RPKI) \
+ $(USE_BFD) \
$(shell dpkg-buildflags --export=configure); \
fi
override_dh_auto_build:
- #dh_auto_build
- $(MAKE)
- dh_auto_build -- -C doc draft-zebra-00.txt
-
-
# doc/ is a bit crazy
ifeq ($(GENERATE_PDF), 1)
- dh_auto_build -- -C doc frr.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf
+ dh_auto_build -- -C doc pdf
endif
- rm -vf doc/frr.info
- dh_auto_build -- -C doc frr.info
- rm -vf doc/frr.info.html*
+ rm -vf doc/user/_build/texinfo/frr.info
+ dh_auto_build -- -C doc info
override_dh_auto_test:
mkdir -p debian/tmp/etc/frr/
perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample*
- # installing the Frr specific SNMP MIB
-ifeq ($(WANT_SNMP), 1)
- install -D -m 644 ./zebra/GNOME-PRODUCT-ZEBRA-MIB debian/tmp/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB
-else
+ # leftover from previously shipping SMUX client OID MIB
mkdir -p debian/tmp/usr/share/snmp/mibs/
-endif
# cleaning .la files
sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la
# backports
SRCPKG = frr
-KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04
+KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 < debian/changelog | \
sed -rn 's/^Version: ?//p')