]> git.proxmox.com Git - mirror_frr.git/blobdiff - debianpkg/rules
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / debianpkg / rules
index 0f2f4ebe166e0bd3aceacb40305d7ad34f1b6af2..12d6c3545c5694bd42028add0672235c77f52f5b 100755 (executable)
@@ -7,10 +7,10 @@
 # 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
@@ -39,6 +39,7 @@ WANT_FRR_USER ?= frr
 WANT_FRR_VTY_GROUP ?= frrvty
 
 # Don't build PDF docs by default
+# add build deps: texlive-latex-base, texlive-generic-recommended
 GENERATE_PDF ?= 0
 
 #
@@ -56,30 +57,12 @@ else
   $(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
@@ -108,6 +91,12 @@ 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
@@ -127,14 +116,6 @@ else
 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/ \
@@ -144,32 +125,23 @@ override_dh_auto_configure:
                $(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:
 
@@ -186,16 +158,10 @@ override_dh_auto_install:
        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
@@ -205,7 +171,7 @@ override_dh_systemd_enable:
 
 # 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')