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
22 # If you use WANT_RPKI, then there is a new dependency for librtr0 package
23 # and a build dependency of the librtr-dev package.
24 # While the librtr0 is added to the depenencies automatically, the build
25 # dependency can't be changed dynamically and building will fail if the
26 # librtr-dev isn't installed during package build
27 # Tested versions of both packages can be found at
28 # https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
30 # If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
31 # Please be aware that 0 is NOT disabled, but treated as unlimited
35 # Set the following to the value required (or leave alone for the default below)
36 # WANT_FRR_USER is used for the username and groupname of the FRR user account
39 WANT_FRR_VTY_GROUP ?
= frrvty
41 # Don't build PDF docs by default
45 ####################################
48 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
51 ifeq ($(WANT_SNMP
), 1)
52 USE_SNMP
=--enable-snmp
53 $(warning
"DEBIAN: SNMP enabled, sorry for your inconvenience")
55 USE_SNMP
=--disable-snmp
56 $(warning
"DEBIAN: SNMP disabled, see README.Debian")
62 USE_LDP
=--disable-ldpd
68 USE_PIM
=--disable-pimd
71 ifeq ($(WANT_OSPFAPI
), 1)
72 USE_OSPFAPI
=--enable-ospfapi
=yes
74 USE_OSPFAPI
=--enable-ospfapi
=no
77 ifeq ($(WANT_TCP_ZEBRA
),1)
78 USE_TCP_ZEBRA
=--enable-tcp-zebra
80 USE_TCP_ZEBRA
=--disable-tcp-zebra
83 ifeq ($(WANT_BGP_VNC
), 1)
84 USE_BGP_VNC
=--enable-bgp-vnc
=yes
86 USE_BGP_VNC
=--enable-bgp-vnc
=no
89 USE_FRR_USER
=--enable-user
=$(WANT_FRR_USER
)
90 USE_FRR_GROUP
=--enable-group
=$(WANT_FRR_USER
)
91 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
93 ifeq ($(WANT_MULTIPATH
), 1)
94 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
96 USE_MULTIPATH
=--disable-multipath
99 ifeq ($(WANT_CUMULUS_MODE
), 1)
100 USE_CUMULUS
=--enable-cumulus
=yes
102 USE_CUMULUS
=--enable-cumulus
=no
105 ifeq ($(WANT_RPKI
), 1)
106 USE_RPKI
=--enable-rpki
108 USE_RPKI
=--disable-rpki
111 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
112 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
116 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
120 dh
$@
--with
=systemd
,autoreconf
--parallel
--dbg-package
=frr-dbg
--list-missing
122 override_dh_gencontrol
:
123 ifeq ($(WANT_RPKI
), 1)
124 dh_gencontrol
-- -Vdist
:Depends
="librtr0 (>= 0.5)"
129 override_dh_auto_configure
:
130 # Frr needs /proc to check some BSD vs Linux specific stuff.
131 # Else it fails with an obscure error message pointing out that
132 # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
133 @if
! [ -d
/proc
/1 ]; then \
134 echo
"./configure needs a mounted /proc"; \
138 if
! [ -e config.status
]; then \
139 dh_auto_configure
-- \
140 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
141 --localstatedir
=/var
/run
/frr \
142 --sbindir
=/usr
/lib
/frr \
143 --sysconfdir
=/etc
/frr \
150 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
151 $(USE_FRR_VTY_GROUP
) \
152 --enable-configfile-mask
=0640 \
153 --enable-logfile-mask
=0640 \
156 --enable-systemd
=yes \
160 --enable-dependency-tracking \
163 $(shell dpkg-buildflags
--export=configure
); \
166 override_dh_auto_build
:
167 # doc/ is a bit crazy
168 ifeq ($(GENERATE_PDF
), 1)
169 dh_auto_build
-- -C doc pdf
171 rm -vf doc
/user
/_build
/texinfo
/frr.
info
172 dh_auto_build
-- -C doc
info
174 override_dh_auto_test
:
176 override_dh_auto_install
:
179 # installed in frr-pythontools
180 rm debian
/tmp
/usr
/lib
/frr
/frr-reload.py
182 # cleaning up the info dir
183 rm -f debian
/tmp
/usr
/share
/info/dir*
185 # install config files
186 mkdir
-p debian
/tmp
/etc
/frr
/
187 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
189 # installing the Frr specific SNMP MIB
190 ifeq ($(WANT_SNMP
), 1)
191 install -D
-m
644 .
/zebra
/GNOME-PRODUCT-ZEBRA-MIB debian
/tmp
/usr
/share
/snmp
/mibs
/GNOME-PRODUCT-ZEBRA-MIB
193 mkdir
-p debian
/tmp
/usr
/share
/snmp
/mibs
/
197 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/*.la
198 sed
-i
"/dependency_libs/ s/'.*'/''/" debian
/tmp
/usr
/lib
/frr
/modules
/*.la
200 override_dh_systemd_start
:
201 dh_systemd_start frr.service
203 override_dh_systemd_enable
:
204 dh_systemd_enable frr.service
208 KNOWN_BACKPORTS
= debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
209 DEBIAN_VERSION
:= $(shell dh_testdir
&& \
210 dpkg-parsechangelog
-c1
< debian
/changelog | \
211 sed
-rn
's/^Version: ?//p')
212 ORIG_VERSION
:= $(DEBIAN_VERSION
)
213 -include debian
/backports
/rules
215 ifneq ($(TARBALLDIR
),)
216 ifeq ($(wildcard frr-
$(ORIG_VERSION
).
tar.gz
),frr-
$(ORIG_VERSION
).
tar.gz
)
218 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
: \
219 frr-
$(ORIG_VERSION
).
tar.gz
222 else # wildcard frr-$(ORIG_VERSION).tar.gz
224 # better error message on missing .orig.tar.gz
225 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
:
226 @ echo
"\`$(TARBALLDIR)/$(SRCPKG)-$(ORIG_VERSION).tar.gz'" not \
227 found and not generated by debian
/rules. Provided you have the \
228 necessary packages installed
, you can generate it yourself via \
229 "\"./bootstrap.sh && ./configure && make dist\"".
232 endif # wildcard frr-$(ORIG_VERSION).tar.gz
233 endif # TARBALLDIR nonempty