3 # FRRouting Configuration options
4 ######################################
6 # WANT_xxxx --> Set to 1 for enable, 0 for disable
7 # The following are the defaults. They can be overridden by setting a
8 # env variable to a different value
15 WANT_CUMULUS_MODE ?
= 0
19 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
20 # Please be aware that 0 is NOT disabled, but treated as unlimited
24 # Set the following to the value required (or leave alone for the default below)
25 # WANT_FRR_USER is used for the username and groupname of the FRR user account
28 WANT_FRR_VTY_GROUP ?
= frrvty
31 ####################################
34 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
37 ifeq ($(WANT_SNMP
), 1)
38 USE_SNMP
=--enable-snmp
39 $(warning
"DEBIAN: SNMP enabled, sorry for your inconvenience")
41 USE_SNMP
=--disable-snmp
42 $(warning
"DEBIAN: SNMP disabled, see README.Debian")
48 USE_LDP
=--disable-ldpd
54 USE_PIM
=--disable-pimd
57 ifeq ($(WANT_OSPFAPI
), 1)
58 USE_OSPFAPI
=--enable-ospfapi
=yes
60 USE_OSPFAPI
=--enable-ospfapi
=no
63 ifeq ($(WANT_TCP_ZEBRA
),1)
64 USE_TCP_ZEBRA
=--enable-tcp-zebra
66 USE_TCP_ZEBRA
=--disable-tcp-zebra
69 ifeq ($(WANT_BGP_VNC
), 1)
70 USE_BGP_VNC
=--enable-bgp-vnc
=yes
72 USE_BGP_VNC
=--enable-bgp-vnc
=no
75 USE_FRR_USER
=--enable-user
=$(WANT_FRR_USER
)
76 USE_FRR_GROUP
=--enable-group
=$(WANT_FRR_USER
)
77 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
79 ifeq ($(WANT_MULTIPATH
), 1)
80 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
82 USE_MULTIPATH
=--disable-multipath
85 ifeq ($(WANT_CUMULUS_MODE
), 1)
86 USE_CUMULUS
=--enable-cumulus
=yes
88 USE_CUMULUS
=--enable-cumulus
=no
91 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
92 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
96 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
100 dh
$@
--with
=autoreconf
--parallel
--dbg-package
=frr-dbg
--list-missing
102 override_dh_auto_configure
:
103 # Frr needs /proc to check some BSD vs Linux specific stuff.
104 # Else it fails with an obscure error message pointing out that
105 # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
106 @if
! [ -d
/proc
/1 ]; then \
107 echo
"./configure needs a mounted /proc"; \
111 if
! [ -e config.status
]; then \
112 dh_auto_configure
-- \
113 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
114 --localstatedir
=/var
/run
/frr \
115 --sbindir
=/usr
/lib
/frr \
116 --sysconfdir
=/etc
/frr \
123 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
124 $(USE_FRR_VTY_GROUP
) \
125 --enable-configfile-mask
=0640 \
126 --enable-logfile-mask
=0640 \
128 --enable-systemd
=no \
132 --enable-dependency-tracking \
134 $(shell dpkg-buildflags
--export=configure
); \
137 override_dh_auto_build
:
140 dh_auto_build
-- -C doc draft-zebra-00.txt
143 # doc/ is a bit crazy
144 ifeq ($(GENERATE_PDF
), 1)
145 dh_auto_build
-- -C doc frr.pdf || true
# pdfetex fails with exit code 1 but still produces a good looking .pdf
148 dh_auto_build
-- -C doc frr.
info
149 rm -vf doc
/frr.
info.html
*
151 override_dh_auto_test
:
153 override_dh_auto_install
:
156 # installed in frr-pythontools
157 rm debian
/tmp
/usr
/lib
/frr
/frr-reload.py
159 # cleaning up the info dir
160 rm -f debian
/tmp
/usr
/share
/info/dir*
162 # install config files
163 mkdir
-p debian
/tmp
/etc
/frr
/
164 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
166 # installing the Frr specific SNMP MIB
167 ifeq ($(WANT_SNMP
), 1)
168 install -D
-m
644 .
/zebra
/GNOME-PRODUCT-ZEBRA-MIB debian
/tmp
/usr
/share
/snmp
/mibs
/GNOME-PRODUCT-ZEBRA-MIB
170 mkdir
-p debian
/tmp
/usr
/share
/snmp
/mibs
174 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/*.la
175 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/frr
/modules
/*.la