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
12 # export WANT_OSPFAPI=1
13 # export WANT_TCP_ZEBRA=0
14 # export WANT_BGP_VNC=0
15 # export WANT_CUMULUS_MODE=0
16 # export WANT_MULTIPATH=1
18 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
19 # Please be aware that 0 is NOT disabled, but treated as unlimited
20 # export MULTIPATH=256
22 # Set the following to the value required (or leave undefined for the default below)
23 # WANT_FRR_USER is used for the username and groupname of the FRR user account
24 # export WANT_FRR_USER=frr
25 # export WANT_FRR_VTY_GROUP=frrvty
27 ####################################
30 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
33 ifeq ($(WANT_SNMP
), 1)
34 USE_SNMP
=--enable-snmp
35 $(warning
"DEBIAN: SNMP enabled, sorry for your inconvenience")
37 $(warning
"DEBIAN: SNMP disabled, see README.Debian")
40 ifneq ($(WANT_LDP
), 0)
43 USE_LDP
=--disable-ldpd
46 ifneq ($(WANT_PIM
), 0)
49 USE_PIM
=--disable-pimd
52 ifneq ($(WANT_OSPFAPI
), 0)
53 USE_OSPFAPI
=--enable-ospfapi
=yes
55 USE_OSPFAPI
=--enable-ospfapi
=no
58 ifeq ($(WANT_TCP_ZEBRA
),1)
59 USE_TCP_ZEBRA
=--enable-tcp-zebra
62 ifneq ($(WANT_BGP_VNC
), 0)
63 USE_BGP_VNC
=--enable-bgp-vnc
=yes
65 USE_BGP_VNC
=--enable-bgp-vnc
=no
69 USE_FRR_USER
=--enable-user
=frr
70 USE_FRR_GROUP
=--enable-group
=frr
72 USE_FRR_USER
=$(WANT_FRR_USER
)
73 USE_FRR_GROUP
=$(WANT_FRR_USER
)
76 ifndef WANT_FRR_VTY_GROUP
77 USE_FRR_VTY_GROUP
=--enable-vty-group
=frrvty
79 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
82 ifneq ($(WANT_MULTIPATH
), 0)
84 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
86 USE_MULTIPATH
=--enable-multipath
=256
89 USE_MULTIPATH
=--disable-multipath
92 ifeq ($(WANT_CUMULUS_NODE
), 1)
93 USE_CUMULUS
=--enable-cumulus
=yes
95 USE_CUMULUS
=--enable-cumulus
=no
98 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
99 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
103 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
107 dh
$@
--with
=autoreconf
--parallel
--dbg-package
=frr-dbg
--list-missing
109 override_dh_auto_configure
:
110 # Frr needs /proc to check some BSD vs Linux specific stuff.
111 # Else it fails with an obscure error message pointing out that
112 # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
113 @if
! [ -d
/proc
/1 ]; then \
114 echo
"./configure needs a mounted /proc"; \
118 if
! [ -e config.status
]; then \
119 dh_auto_configure
-- \
120 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
121 --localstatedir
=/var
/run
/frr \
122 --sbindir
=/usr
/lib
/frr \
123 --sysconfdir
=/etc
/frr \
130 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
131 $(USE_FRR_VTY_GROUP
) \
132 --enable-configfile-mask
=0640 \
133 --enable-logfile-mask
=0640 \
135 --enable-systemd
=no \
139 --enable-dependency-tracking \
141 $(shell dpkg-buildflags
--export=configure
); \
144 override_dh_auto_build
:
147 dh_auto_build
-- -C doc draft-zebra-00.txt
150 # doc/ is a bit crazy
151 ifeq ($(GENERATE_PDF
), 1)
152 dh_auto_build
-- -C doc frr.pdf || true
# pdfetex fails with exit code 1 but still produces a good looking .pdf
155 dh_auto_build
-- -C doc frr.
info
156 rm -vf doc
/frr.
info.html
*
158 override_dh_auto_test
:
160 override_dh_auto_install
:
163 # installed in frr-pythontools
164 rm debian
/tmp
/usr
/lib
/frr
/frr-reload.py
166 # cleaning up the info dir
167 rm -f debian
/tmp
/usr
/share
/info/dir*
169 # install config files
170 mkdir
-p debian
/tmp
/etc
/frr
/
171 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
173 # installing the Frr specific SNMP MIB
174 install -D
-m
644 .
/zebra
/GNOME-PRODUCT-ZEBRA-MIB debian
/tmp
/usr
/share
/snmp
/mibs
/GNOME-PRODUCT-ZEBRA-MIB
177 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/*.la
178 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/frr
/modules
/*.la