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
10 # -Werror - don't enable this unless you're doing a dev package build
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
42 # add build deps: texlive-latex-base, texlive-generic-recommended
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")
60 ifeq ($(WANT_OSPFAPI
), 1)
61 USE_OSPFAPI
=--enable-ospfapi
=yes
63 USE_OSPFAPI
=--enable-ospfapi
=no
66 ifeq ($(WANT_BGP_VNC
), 1)
67 USE_BGP_VNC
=--enable-bgp-vnc
=yes
69 USE_BGP_VNC
=--enable-bgp-vnc
=no
72 USE_FRR_USER
=--enable-user
=$(WANT_FRR_USER
)
73 USE_FRR_GROUP
=--enable-group
=$(WANT_FRR_USER
)
74 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
76 ifeq ($(WANT_MULTIPATH
), 1)
77 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
79 USE_MULTIPATH
=--disable-multipath
82 ifeq ($(WANT_CUMULUS_MODE
), 1)
83 USE_CUMULUS
=--enable-cumulus
=yes
85 USE_CUMULUS
=--enable-cumulus
=no
88 ifeq ($(WANT_RPKI
), 1)
89 USE_RPKI
=--enable-rpki
91 USE_RPKI
=--disable-rpki
94 ifeq ($(WANT_WERROR
), 1)
95 USE_WERROR
=--enable-werror
97 USE_WERROR
=--disable-werror
100 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
101 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
105 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
109 dh
$@
--with
=systemd
,autoreconf
--parallel
--dbg-package
=frr-dbg
--list-missing
111 override_dh_gencontrol
:
112 ifeq ($(WANT_RPKI
), 1)
113 dh_gencontrol
-- -Vdist
:Depends
="librtr0 (>= 0.5)"
118 override_dh_auto_configure
:
119 if
! [ -e config.status
]; then \
120 dh_auto_configure
-- \
121 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
122 --localstatedir
=/var
/run
/frr \
123 --sbindir
=/usr
/lib
/frr \
124 --sysconfdir
=/etc
/frr \
129 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
130 $(USE_FRR_VTY_GROUP
) \
131 --enable-configfile-mask
=0640 \
132 --enable-logfile-mask
=0640 \
135 --enable-systemd
=yes \
137 --disable-dependency-tracking \
140 $(shell dpkg-buildflags
--export=configure
); \
143 override_dh_auto_build
:
146 override_dh_auto_test
:
148 override_dh_auto_install
:
151 # installed in frr-pythontools
152 rm debian
/tmp
/usr
/lib
/frr
/frr-reload.py
154 # cleaning up the info dir
155 rm -f debian
/tmp
/usr
/share
/info/dir*
157 # install config files
158 mkdir
-p debian
/tmp
/etc
/frr
/
159 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
161 # we don't need .la files
162 rm debian
/tmp
/usr
/lib
/*.la
163 rm debian
/tmp
/usr
/lib
/frr
/modules
/*.la
165 override_dh_systemd_start
:
166 dh_systemd_start frr.service
168 override_dh_systemd_enable
:
169 dh_systemd_enable frr.service
173 KNOWN_BACKPORTS
= debian8 debian9 ubuntu14.04 ubuntu16.04 ubuntu17.10 ubuntu18.04
174 DEBIAN_VERSION
:= $(shell dh_testdir
&& \
175 dpkg-parsechangelog
-c1
< debian
/changelog | \
176 sed
-rn
's/^Version: ?//p')
177 ORIG_VERSION
:= $(DEBIAN_VERSION
)
178 -include debian
/backports
/rules
180 ifneq ($(TARBALLDIR
),)
181 ifeq ($(wildcard frr-
$(ORIG_VERSION
).
tar.gz
),frr-
$(ORIG_VERSION
).
tar.gz
)
183 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
: \
184 frr-
$(ORIG_VERSION
).
tar.gz
187 else # wildcard frr-$(ORIG_VERSION).tar.gz
189 # better error message on missing .orig.tar.gz
190 $(TARBALLDIR
)/$(SRCPKG
)_
$(ORIG_VERSION
).orig.
tar.gz
:
191 @ echo
"\`$(TARBALLDIR)/$(SRCPKG)-$(ORIG_VERSION).tar.gz'" not \
192 found and not generated by debian
/rules. Provided you have the \
193 necessary packages installed
, you can generate it yourself via \
194 "\"./bootstrap.sh && ./configure && make dist\"".
197 endif # wildcard frr-$(ORIG_VERSION).tar.gz
198 endif # TARBALLDIR nonempty