# The following are the defaults. They can be overridden by setting a
# env variable to a different value
-WANT_LDP ?= 1
-WANT_PIM ?= 1
+# -Werror - don't enable this unless you're doing a dev package build
+WANT_WERROR ?= 0
+
WANT_OSPFAPI ?= 1
-WANT_TCP_ZEBRA ?= 0
WANT_BGP_VNC ?= 1
WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_FRR_VTY_GROUP ?= frrvty
# Don't build PDF docs by default
+# add build deps: texlive-latex-base, texlive-generic-recommended
GENERATE_PDF ?= 0
#
$(warning "DEBIAN: SNMP disabled, see README.Debian")
endif
-ifeq ($(WANT_LDP), 1)
- USE_LDP=--enable-ldpd
-else
- USE_LDP=--disable-ldpd
-endif
-
-ifeq ($(WANT_PIM), 1)
- USE_PIM=--enable-pimd
-else
- USE_PIM=--disable-pimd
-endif
-
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
-else
- USE_TCP_ZEBRA=--disable-tcp-zebra
-endif
-
ifeq ($(WANT_BGP_VNC), 1)
USE_BGP_VNC=--enable-bgp-vnc=yes
else
USE_RPKI=--disable-rpki
endif
+ifeq ($(WANT_WERROR), 1)
+ USE_WERROR=--enable-werror
+else
+ USE_WERROR=--disable-werror
+endif
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
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
- # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
- @if ! [ -d /proc/1 ]; then \
- echo "./configure needs a mounted /proc"; \
- exit 1; \
- fi
-
if ! [ -e config.status ]; then \
dh_auto_configure -- \
--enable-exampledir=/usr/share/doc/frr/examples/ \
$(USE_SNMP) \
$(USE_OSPFAPI) \
$(USE_MULTIPATH) \
- $(USE_LDP) \
- $(USE_TCP_ZEBRA) \
--enable-fpm \
$(USE_FRR_USER) $(USE_FRR_GROUP) \
$(USE_FRR_VTY_GROUP) \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
- --enable-werror \
+ $(USE_WERROR) \
--with-libpam \
--enable-systemd=yes \
- --enable-poll=yes \
$(USE_CUMULUS) \
- $(USE_PIM) \
- --enable-dependency-tracking \
+ --disable-dependency-tracking \
$(USE_BGP_VNC) \
$(USE_RPKI) \
$(shell dpkg-buildflags --export=configure); \
fi
override_dh_auto_build:
- # doc/ is a bit crazy
-ifeq ($(GENERATE_PDF), 1)
- dh_auto_build -- -C doc pdf
-endif
- rm -vf doc/user/_build/texinfo/frr.info
- dh_auto_build -- -C doc info
+ dh_auto_build
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
- mkdir -p debian/tmp/usr/share/snmp/mibs/
-endif
-
- # cleaning .la files
- sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la
- sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la
+ # we don't need .la files
+ rm debian/tmp/usr/lib/*.la
+ rm debian/tmp/usr/lib/frr/modules/*.la
+ rm debian/tmp/usr/lib/frr/libyang_plugins/*.la
override_dh_systemd_start:
dh_systemd_start frr.service
# backports
SRCPKG = frr
-KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10
+KNOWN_BACKPORTS = debian8 debian9 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
DEBIAN_VERSION := $(shell dh_testdir && \
dpkg-parsechangelog -c1 < debian/changelog | \
sed -rn 's/^Version: ?//p')