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
23 # If you use WANT_RPKI, then there is a new dependency for librtr0 package
24 # and a build dependency of the librtr-dev package.
25 # While the librtr0 is added to the depenencies automatically, the build
26 # dependency can't be changed dynamically and building will fail if the
27 # librtr-dev isn't installed during package build
28 # Tested versions of both packages can be found at
29 # https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
31 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
32 # Please be aware that 0 is NOT disabled, but treated as unlimited
36 # Set the following to the value required (or leave alone for the default below)
37 # WANT_FRR_USER is used for the username and groupname of the FRR user account
40 WANT_FRR_VTY_GROUP ?
= frrvty
42 # Don't build PDF docs by default
46 ####################################
49 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
52 ifeq ($(WANT_SNMP
), 1)
53 USE_SNMP
=--enable-snmp
54 $(warning
"DEBIAN: SNMP enabled, sorry for your inconvenience")
56 USE_SNMP
=--disable-snmp
57 $(warning
"DEBIAN: SNMP disabled, see README.Debian")
63 USE_LDP
=--disable-ldpd
69 USE_PIM
=--disable-pimd
72 ifeq ($(WANT_OSPFAPI
), 1)
73 USE_OSPFAPI
=--enable-ospfapi
=yes
75 USE_OSPFAPI
=--enable-ospfapi
=no
78 ifeq ($(WANT_TCP_ZEBRA
),1)
79 USE_TCP_ZEBRA
=--enable-tcp-zebra
81 USE_TCP_ZEBRA
=--disable-tcp-zebra
84 ifeq ($(WANT_BGP_VNC
), 1)
85 USE_BGP_VNC
=--enable-bgp-vnc
=yes
87 USE_BGP_VNC
=--enable-bgp-vnc
=no
90 USE_FRR_USER
=--enable-user
=$(WANT_FRR_USER
)
91 USE_FRR_GROUP
=--enable-group
=$(WANT_FRR_USER
)
92 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
94 ifeq ($(WANT_MULTIPATH
), 1)
95 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
97 USE_MULTIPATH
=--disable-multipath
100 ifeq ($(WANT_CUMULUS_MODE
), 1)
101 USE_CUMULUS
=--enable-cumulus
=yes
103 USE_CUMULUS
=--enable-cumulus
=no
106 ifeq ($(WANT_RPKI
), 1)
107 USE_RPKI
=--enable-rpki
109 USE_RPKI
=--disable-rpki
112 ifeq ($(WANT_BFD
), 1)
113 USE_BFD
=--enable-bfdd
115 USE_BFD
=--disable-bfdd
118 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
119 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
123 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
127 dh
$@
--with
=systemd
,autoreconf
--parallel
--dbg-package
=frr-dbg
--list-missing
129 override_dh_gencontrol
:
130 ifeq ($(WANT_RPKI
), 1)
131 dh_gencontrol
-- -Vdist
:Depends
="librtr0 (>= 0.5)"
136 override_dh_auto_configure
:
137 # Frr needs /proc to check some BSD vs Linux specific stuff.
138 # Else it fails with an obscure error message pointing out that
139 # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
140 @if
! [ -d
/proc
/1 ]; then \
141 echo
"./configure needs a mounted /proc"; \
145 if
! [ -e config.status
]; then \
146 dh_auto_configure
-- \
147 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
148 --localstatedir
=/var
/run
/frr \
149 --sbindir
=/usr
/lib
/frr \
150 --sysconfdir
=/etc
/frr \
157 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
158 $(USE_FRR_VTY_GROUP
) \
159 --enable-configfile-mask
=0640 \
160 --enable-logfile-mask
=0640 \
163 --enable-systemd
=yes \
167 --enable-dependency-tracking \
171 $(shell dpkg-buildflags
--export=configure
); \
174 override_dh_auto_build
:
175 # doc/ is a bit crazy
176 ifeq ($(GENERATE_PDF
), 1)
177 dh_auto_build
-- -C doc pdf
179 rm -vf doc
/user
/_build
/texinfo
/frr.
info
180 dh_auto_build
-- -C doc
info
182 override_dh_auto_test
:
184 override_dh_auto_install
:
187 # installed in frr-pythontools
188 rm debian
/tmp
/usr
/lib
/frr
/frr-reload.py
190 # cleaning up the info dir
191 rm -f debian
/tmp
/usr
/share
/info/dir*
193 # install config files
194 mkdir
-p debian
/tmp
/etc
/frr
/
195 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
197 # installing the Frr specific SNMP MIB
198 ifeq ($(WANT_SNMP
), 1)
199 install -D
-m
644 .
/zebra
/GNOME-PRODUCT-ZEBRA-MIB debian
/tmp
/usr
/share
/snmp
/mibs
/GNOME-PRODUCT-ZEBRA-MIB
201 mkdir
-p debian
/tmp
/usr
/share
/snmp
/mibs
/
205 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/*.la
206 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/frr
/modules
/*.la
208 override_dh_systemd_start
:
209 dh_systemd_start frr.service
211 override_dh_systemd_enable
:
212 dh_systemd_enable frr.service
216 KNOWN_BACKPORTS
= debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
217 DEBIAN_VERSION
:= $(shell dh_testdir
&& \
218 dpkg-parsechangelog
-c1
< debian
/changelog | \
219 sed
-rn
's/^Version: ?//p')
220 ORIG_VERSION
:= $(DEBIAN_VERSION
)
221 -include debian
/backports
/rules
223 ifneq ($(TARBALLDIR
),)
224 ifeq ($(wildcard frr-
$(ORIG_VERSION
).
tar.gz
),frr-
$(ORIG_VERSION
).
tar.gz
)
226 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
: \
227 frr-
$(ORIG_VERSION
).
tar.gz
230 else # wildcard frr-$(ORIG_VERSION).tar.gz
232 # better error message on missing .orig.tar.gz
233 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
:
234 @ echo
"\`$(TARBALLDIR)/$(SRCPKG)-$(ORIG_VERSION).tar.gz'" not \
235 found and not generated by debian
/rules. Provided you have the \
236 necessary packages installed
, you can generate it yourself via \
237 "\"./bootstrap.sh && ./configure && make dist\"".
240 endif # wildcard frr-$(ORIG_VERSION).tar.gz
241 endif # TARBALLDIR nonempty