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
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
30 # Don't build PDF docs by default
31 # add build deps: texlive-latex-base, texlive-generic-recommended
35 ####################################
37 export DEB_BUILD_MAINT_OPTIONS
= hardening
=+all
39 ifeq ($(WANT_OSPFAPI
), 1)
40 USE_OSPFAPI
=--enable-ospfapi
=yes
42 USE_OSPFAPI
=--enable-ospfapi
=no
45 ifeq ($(WANT_BGP_VNC
), 1)
46 USE_BGP_VNC
=--enable-bgp-vnc
=yes
48 USE_BGP_VNC
=--enable-bgp-vnc
=no
51 USE_FRR_USER
=--enable-user
=$(WANT_FRR_USER
)
52 USE_FRR_GROUP
=--enable-group
=$(WANT_FRR_USER
)
53 USE_FRR_VTY_GROUP
=--enable-vty-group
=$(WANT_FRR_VTY_GROUP
)
55 ifeq ($(WANT_MULTIPATH
), 1)
56 USE_MULTIPATH
=--enable-multipath
=$(MULTIPATH
)
58 USE_MULTIPATH
=--disable-multipath
61 ifeq ($(WANT_CUMULUS_MODE
), 1)
62 USE_CUMULUS
=--enable-cumulus
=yes
64 USE_CUMULUS
=--enable-cumulus
=no
67 ifeq ($(WANT_WERROR
), 1)
68 USE_WERROR
=--enable-werror
70 USE_WERROR
=--disable-werror
74 # generic debian options
77 ifneq (,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
78 DEBIAN_JOBS
:= $(subst parallel
=,,$(filter parallel
=%,$(DEB_BUILD_OPTIONS
)))
81 MAKEFLAGS
+= -j
$(DEBIAN_JOBS
)
84 ifneq (,$(filter terse
,$(DEB_BUILD_OPTIONS
)))
97 ifeq ($(filter nodoc
,$(DEB_BUILD_PROFILES
)),)
98 USE_DOC
=--enable-doc
--enable-doc-html
100 USE_DOC
=--disable-doc
103 ifeq ($(filter pkg.frr.rtrlib
,$(DEB_BUILD_PROFILES
)),)
104 USE_RPKI
=--disable-rpki
106 USE_RPKI
=--enable-rpki
109 ifeq ($(filter pkg.frr.snmp
,$(DEB_BUILD_PROFILES
)),)
110 USE_SNMP
=--disable-snmp
112 USE_SNMP
=--enable-snmp
115 ifeq ($(filter pkg.frr.nosystemd
,$(DEB_BUILD_PROFILES
)),)
116 DH_WITH_SYSTEMD
=systemd
,
117 USE_SYSTEMD
=--enable-systemd
=yes
120 USE_SYSTEMD
=--enable-systemd
=no
123 export PYTHON
=python3
126 dh
$@
--with
=$(DH_WITH_SYSTEMD
)autoreconf
--parallel
--dbg-package
=frr-dbg
128 override_dh_auto_configure
:
129 if
! [ -e config.status
]; then \
130 dh_auto_configure
-- \
131 --enable-exampledir
=/usr
/share
/doc
/frr
/examples
/ \
132 --localstatedir
=/var
/run
/frr \
133 --sbindir
=/usr
/lib
/frr \
134 --sysconfdir
=/etc
/frr \
135 --with-vtysh-pager
=/usr
/bin
/pager \
136 --libdir=/usr
/lib
/$(DEB_HOST_MULTIARCH
)/frr \
137 --with-moduledir
=/usr
/lib
/$(DEB_HOST_MULTIARCH
)/frr
/modules \
138 LIBTOOLFLAGS
="-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/frr" \
145 $(USE_FRR_USER
) $(USE_FRR_GROUP
) \
146 $(USE_FRR_VTY_GROUP
) \
147 --enable-configfile-mask
=0640 \
148 --enable-logfile-mask
=0640 \
153 --disable-dependency-tracking \
156 $(shell dpkg-buildflags
--export=configure
); \
159 override_dh_auto_install
:
162 sed
-e
'1c #!/usr/bin/python3' -i debian
/tmp
/usr
/lib
/frr
/frr-reload.py
164 # let dh_systemd_* and dh_installinit do their thing automatically
165 ifeq ($(filter pkg.frr.nosystemd
,$(DEB_BUILD_PROFILES
)),)
166 cp tools
/frr.service debian
/frr.service
168 cp tools
/frr debian
/frr.init
170 # install config files
171 mkdir
-p debian
/tmp
/etc
/frr
/
172 perl
-pi
-e
's#^!log file #!log file /var/log/frr/#' debian
/tmp
/usr
/share
/doc
/frr
/examples
/*sample
*
174 # drop dev-only files
175 find debian
/tmp
-name
'*.la' -o
-name
'*.a' -o
-name
'lib*.so' | xargs
rm -f
176 rm -rf debian
/tmp
/usr
/include
178 # use installed js libraries
179 -rm -f debian
/tmp
/usr
/share
/doc
/frr
/html
/_static
/jquery.js
180 ln
-s
/usr
/share
/javascript
/jquery
/jquery.js debian
/tmp
/usr
/share
/doc
/frr
/html
/_static
/jquery.js
181 -rm -f debian
/tmp
/usr
/share
/doc
/frr
/html
/_static
/underscore.js
182 ln
-s
/usr
/share
/javascript
/underscore
/underscore.js debian
/tmp
/usr
/share
/doc
/frr
/html
/_static
/underscore.js
184 override_dh_auto_build
:
185 dh_auto_build
-- $(MAKE_SILENT
)
187 override_dh_makeshlibs
:
188 # we don't need or want ldconfig for private libs
192 dh_missing
--fail-missing
194 override_dh_auto_clean
:
195 # we generally do NOT want a full distclean since that wipes both
196 # debianpkg/changelog and config.version
197 if
test -f Makefile
; then make redistclean
; fi