2015-05-20 01:26:49 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2017-06-13 04:32:02 +02:00
|
|
|
# FRRouting Configuration options
|
|
|
|
######################################
|
|
|
|
#
|
|
|
|
# WANT_xxxx --> Set to 1 for enable, 0 for disable
|
|
|
|
# The following are the defaults. They can be overridden by setting a
|
|
|
|
# env variable to a different value
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
|
2018-10-15 07:03:20 +02:00
|
|
|
# -Werror - don't enable this unless you're doing a dev package build
|
|
|
|
WANT_WERROR ?= 0
|
|
|
|
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
WANT_OSPFAPI ?= 1
|
2018-02-01 02:10:44 +01:00
|
|
|
WANT_BGP_VNC ?= 1
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
WANT_CUMULUS_MODE ?= 0
|
|
|
|
WANT_MULTIPATH ?= 1
|
|
|
|
|
2018-03-06 16:14:03 +01:00
|
|
|
# NOTES:
|
2017-06-13 04:32:02 +02:00
|
|
|
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
|
2018-03-06 16:14:03 +01:00
|
|
|
# Please be aware that 0 is NOT disabled, but treated as unlimited
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
|
|
|
|
MULTIPATH ?= 256
|
|
|
|
|
|
|
|
# Set the following to the value required (or leave alone for the default below)
|
2017-06-13 04:32:02 +02:00
|
|
|
# WANT_FRR_USER is used for the username and groupname of the FRR user account
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
|
|
|
|
WANT_FRR_USER ?= frr
|
|
|
|
WANT_FRR_VTY_GROUP ?= frrvty
|
|
|
|
|
2018-03-01 16:20:36 +01:00
|
|
|
# Don't build PDF docs by default
|
2018-10-15 07:02:47 +02:00
|
|
|
# add build deps: texlive-latex-base, texlive-generic-recommended
|
2018-03-01 16:20:36 +01:00
|
|
|
GENERATE_PDF ?= 0
|
|
|
|
|
2017-06-13 04:32:02 +02:00
|
|
|
#
|
|
|
|
####################################
|
|
|
|
|
2017-10-10 03:17:09 +02:00
|
|
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
2015-05-20 01:26:49 +02:00
|
|
|
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
ifeq ($(WANT_OSPFAPI), 1)
|
2017-06-13 04:32:02 +02:00
|
|
|
USE_OSPFAPI=--enable-ospfapi=yes
|
|
|
|
else
|
|
|
|
USE_OSPFAPI=--enable-ospfapi=no
|
|
|
|
endif
|
|
|
|
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
ifeq ($(WANT_BGP_VNC), 1)
|
2017-06-13 04:32:02 +02:00
|
|
|
USE_BGP_VNC=--enable-bgp-vnc=yes
|
|
|
|
else
|
|
|
|
USE_BGP_VNC=--enable-bgp-vnc=no
|
|
|
|
endif
|
|
|
|
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
USE_FRR_USER=--enable-user=$(WANT_FRR_USER)
|
|
|
|
USE_FRR_GROUP=--enable-group=$(WANT_FRR_USER)
|
|
|
|
USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP)
|
2017-06-13 04:32:02 +02:00
|
|
|
|
debianpkg: normalize rules files
downstream packagers prefer to change defaults in a trackable way by
changing the rules file directly, rather than setting environment
variables. Use '?=' (set if not already set in the environment or on
the make cmdline) to set defaults rather than alternating between
ifeq/ifneq clauses, which is harder to follow and edit. Change any
existing `ifneq(...,0)' cases to `ifeq(...,1)', and get rid of any
ifdef/ifndefs, as ?= guarantees he value will be defined in one way or
another. This allows the old behavior of overriding via the
environment while simplifying the workflow for anyone editing or
extending the current logic and defaults.
Portability note about '?=': it is GNU-make specific, but so is
ifeq/ifneq, which is/was used in this file, and this file is specific
to debian-based system as it is, so I don't consider it to be a
problem in this case.
Added any missing defaults (WANT_SNMP, WANT_CUMULUS_NODE) and
made it so that USE_XXX is always set for the sake of consistency.
Also brought a few changes from base debianpkg/rules into the
backports versions of the files where they were missing.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2018-01-31 02:00:48 +01:00
|
|
|
ifeq ($(WANT_MULTIPATH), 1)
|
|
|
|
USE_MULTIPATH=--enable-multipath=$(MULTIPATH)
|
2017-06-13 04:32:02 +02:00
|
|
|
else
|
|
|
|
USE_MULTIPATH=--disable-multipath
|
|
|
|
endif
|
|
|
|
|
2018-02-01 02:15:36 +01:00
|
|
|
ifeq ($(WANT_CUMULUS_MODE), 1)
|
2017-06-13 04:32:02 +02:00
|
|
|
USE_CUMULUS=--enable-cumulus=yes
|
|
|
|
else
|
|
|
|
USE_CUMULUS=--enable-cumulus=no
|
|
|
|
endif
|
|
|
|
|
2018-10-15 07:03:20 +02:00
|
|
|
ifeq ($(WANT_WERROR), 1)
|
|
|
|
USE_WERROR=--enable-werror
|
2018-06-27 17:24:51 +02:00
|
|
|
else
|
2018-10-15 07:03:20 +02:00
|
|
|
USE_WERROR=--disable-werror
|
2018-06-27 17:24:51 +02:00
|
|
|
endif
|
|
|
|
|
2018-10-03 19:14:27 +02:00
|
|
|
#
|
|
|
|
# generic debian options
|
|
|
|
#
|
|
|
|
|
2016-04-27 18:27:37 +02:00
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
endif
|
|
|
|
ifdef DEBIAN_JOBS
|
|
|
|
MAKEFLAGS += -j$(DEBIAN_JOBS)
|
|
|
|
endif
|
|
|
|
|
2018-10-24 20:57:16 +02:00
|
|
|
ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
|
|
|
|
MAKE_SILENT="V=0"
|
|
|
|
export DH_VERBOSE=0
|
|
|
|
else
|
|
|
|
MAKE_SILENT="V=1"
|
|
|
|
export DH_VERBOSE=1
|
|
|
|
export DH_OPTIONS=-v
|
|
|
|
endif
|
|
|
|
|
2018-10-03 19:14:27 +02:00
|
|
|
#
|
|
|
|
# build profiles
|
|
|
|
#
|
|
|
|
|
2018-10-24 20:57:16 +02:00
|
|
|
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
|
|
|
|
USE_DOC=--enable-doc
|
|
|
|
else
|
|
|
|
USE_DOC=--disable-doc
|
|
|
|
endif
|
|
|
|
|
2018-10-03 19:14:27 +02:00
|
|
|
ifeq ($(filter pkg.frr.rtrlib,$(DEB_BUILD_PROFILES)),)
|
|
|
|
USE_RPKI=--disable-rpki
|
|
|
|
else
|
|
|
|
USE_RPKI=--enable-rpki
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(filter pkg.frr.snmp,$(DEB_BUILD_PROFILES)),)
|
|
|
|
USE_SNMP=--disable-snmp
|
|
|
|
else
|
|
|
|
USE_SNMP=--enable-snmp
|
|
|
|
endif
|
|
|
|
|
2018-10-22 13:37:53 +02:00
|
|
|
ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),)
|
|
|
|
DH_WITH_SYSTEMD=systemd,
|
|
|
|
USE_SYSTEMD=--enable-systemd=yes
|
2018-03-06 17:47:42 +01:00
|
|
|
else
|
2018-10-22 13:37:53 +02:00
|
|
|
DH_WITH_SYSTEMD=
|
|
|
|
USE_SYSTEMD=--enable-systemd=no
|
2018-03-06 16:14:03 +01:00
|
|
|
endif
|
|
|
|
|
2018-10-22 13:37:53 +02:00
|
|
|
%:
|
|
|
|
dh $@ --with=$(DH_WITH_SYSTEMD)autoreconf --parallel --dbg-package=frr-dbg --list-missing
|
|
|
|
|
2015-05-20 01:26:49 +02:00
|
|
|
override_dh_auto_configure:
|
2015-05-20 02:40:43 +02:00
|
|
|
if ! [ -e config.status ]; then \
|
2015-05-20 01:26:49 +02:00
|
|
|
dh_auto_configure -- \
|
2017-01-04 15:25:20 +01:00
|
|
|
--enable-exampledir=/usr/share/doc/frr/examples/ \
|
|
|
|
--localstatedir=/var/run/frr \
|
|
|
|
--sbindir=/usr/lib/frr \
|
|
|
|
--sysconfdir=/etc/frr \
|
2018-10-24 20:57:16 +02:00
|
|
|
--with-vtysh-pager=/usr/bin/pager \
|
|
|
|
$(USE_DOC) \
|
2015-12-02 16:34:38 +01:00
|
|
|
$(USE_SNMP) \
|
2017-06-13 04:32:02 +02:00
|
|
|
$(USE_OSPFAPI) \
|
|
|
|
$(USE_MULTIPATH) \
|
2017-10-09 11:33:11 +02:00
|
|
|
--enable-fpm \
|
2017-06-13 04:32:02 +02:00
|
|
|
$(USE_FRR_USER) $(USE_FRR_GROUP) \
|
|
|
|
$(USE_FRR_VTY_GROUP) \
|
2015-12-02 16:34:38 +01:00
|
|
|
--enable-configfile-mask=0640 \
|
|
|
|
--enable-logfile-mask=0640 \
|
2018-10-15 07:03:20 +02:00
|
|
|
$(USE_WERROR) \
|
2015-10-22 02:40:39 +02:00
|
|
|
--with-libpam \
|
2018-10-22 13:37:53 +02:00
|
|
|
$(USE_SYSTEMD) \
|
2017-06-13 04:32:02 +02:00
|
|
|
$(USE_CUMULUS) \
|
2018-10-15 07:03:20 +02:00
|
|
|
--disable-dependency-tracking \
|
2017-10-10 03:17:09 +02:00
|
|
|
$(USE_BGP_VNC) \
|
2018-03-06 16:14:03 +01:00
|
|
|
$(USE_RPKI) \
|
2017-10-10 03:17:09 +02:00
|
|
|
$(shell dpkg-buildflags --export=configure); \
|
2015-05-20 02:40:43 +02:00
|
|
|
fi
|
2015-05-20 01:26:49 +02:00
|
|
|
|
|
|
|
override_dh_auto_install:
|
|
|
|
dh_auto_install
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2017-07-20 20:58:43 +02:00
|
|
|
# installed in frr-pythontools
|
|
|
|
rm debian/tmp/usr/lib/frr/frr-reload.py
|
|
|
|
|
2018-10-22 13:37:53 +02:00
|
|
|
# let dh_systemd_* and dh_installinit do their thing automatically
|
|
|
|
ifeq ($(filter pkg.frr.nosystemd,$(DEB_BUILD_PROFILES)),)
|
|
|
|
cp tools/frr.service debian/frr.service
|
|
|
|
else
|
|
|
|
cp tools/frr debian/frr.init
|
|
|
|
endif
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2015-05-20 01:26:49 +02:00
|
|
|
# install config files
|
2017-01-04 15:25:20 +01:00
|
|
|
mkdir -p debian/tmp/etc/frr/
|
|
|
|
perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample*
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2018-10-15 07:00:42 +02:00
|
|
|
# we don't need .la files
|
2018-10-24 20:57:32 +02:00
|
|
|
rm debian/tmp/usr/lib/*/*.la
|
|
|
|
rm debian/tmp/usr/lib/*/frr/modules/*.la
|
|
|
|
rm debian/tmp/usr/lib/*/frr/libyang_plugins/*.la
|
2018-10-24 18:32:11 +02:00
|
|
|
|
2018-10-24 20:57:16 +02:00
|
|
|
override_dh_auto_build:
|
|
|
|
dh_auto_build -- $(MAKE_SILENT)
|
|
|
|
|
2018-10-24 18:32:11 +02:00
|
|
|
override_dh_auto_clean:
|
|
|
|
# we generally do NOT want a full distclean since that wipes both
|
|
|
|
# debianpkg/changelog and config.version
|
|
|
|
if test -f Makefile; then make redistclean; fi
|