2015-05-20 01:26:49 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2018-10-29 18:56:30 +01:00
|
|
|
# standard Debian options & profiles
|
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
|
|
|
|
2018-10-24 20:57:16 +02:00
|
|
|
ifneq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
|
2018-10-29 18:56:30 +01:00
|
|
|
MAKE_SILENT="V=0"
|
|
|
|
export DH_VERBOSE=0
|
2018-10-24 20:57:16 +02:00
|
|
|
else
|
2018-10-29 18:56:30 +01:00
|
|
|
MAKE_SILENT="V=1"
|
|
|
|
export DH_VERBOSE=1
|
|
|
|
export DH_OPTIONS=-v
|
2018-10-24 20:57:16 +02:00
|
|
|
endif
|
|
|
|
|
2018-10-29 18:56:30 +01:00
|
|
|
# package-specific build profiles
|
2018-10-24 20:57:16 +02:00
|
|
|
|
2018-12-10 22:15:22 +01:00
|
|
|
ifeq ($(filter pkg.frr.nortrlib,$(DEB_BUILD_PROFILES)),)
|
2018-10-29 18:56:30 +01:00
|
|
|
CONF_RPKI=--enable-rpki
|
2018-12-10 22:15:22 +01:00
|
|
|
else
|
|
|
|
CONF_RPKI=--disable-rpki
|
2018-10-03 19:14:27 +02:00
|
|
|
endif
|
|
|
|
|
2020-12-10 19:09:56 +01:00
|
|
|
ifeq ($(filter pkg.frr.lua,$(DEB_BUILD_PROFILES)),)
|
2020-12-08 17:28:01 +01:00
|
|
|
CONF_LUA=--disable-scripting
|
2020-12-10 19:09:56 +01:00
|
|
|
else
|
|
|
|
CONF_LUA=--enable-scripting
|
2020-12-08 17:28:01 +01:00
|
|
|
endif
|
|
|
|
|
2022-07-07 14:27:06 +02:00
|
|
|
ifeq ($(filter pkg.frr.pim6d,$(DEB_BUILD_PROFILES)),)
|
|
|
|
CONF_PIM6=--disable-pim6d
|
|
|
|
else
|
|
|
|
CONF_PIM6=--enable-pim6d
|
|
|
|
endif
|
|
|
|
|
2018-10-25 18:17:23 +02:00
|
|
|
export PYTHON=python3
|
|
|
|
|
2018-10-22 13:37:53 +02:00
|
|
|
%:
|
2021-04-19 10:35:53 +02:00
|
|
|
dh $@
|
2018-10-22 13:37:53 +02:00
|
|
|
|
2015-05-20 01:26:49 +02:00
|
|
|
override_dh_auto_configure:
|
2018-10-29 18:56:30 +01:00
|
|
|
$(shell dpkg-buildflags --export=sh); \
|
2015-05-20 01:26:49 +02:00
|
|
|
dh_auto_configure -- \
|
2017-01-04 15:25:20 +01:00
|
|
|
--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 \
|
2018-10-28 18:54:14 +01:00
|
|
|
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr \
|
|
|
|
--with-moduledir=/usr/lib/$(DEB_HOST_MULTIARCH)/frr/modules \
|
|
|
|
LIBTOOLFLAGS="-rpath /usr/lib/$(DEB_HOST_MULTIARCH)/frr" \
|
2018-10-29 18:56:30 +01:00
|
|
|
--disable-dependency-tracking \
|
|
|
|
\
|
|
|
|
$(CONF_RPKI) \
|
2020-12-08 17:28:01 +01:00
|
|
|
$(CONF_LUA) \
|
2022-07-07 14:27:06 +02:00
|
|
|
$(CONF_PIM6) \
|
2018-10-29 18:56:30 +01:00
|
|
|
--with-libpam \
|
|
|
|
--enable-doc \
|
|
|
|
--enable-doc-html \
|
|
|
|
--enable-snmp \
|
2018-12-10 22:17:01 +01:00
|
|
|
--enable-fpm \
|
|
|
|
--disable-protobuf \
|
2018-10-25 15:09:32 +02:00
|
|
|
--disable-zeromq \
|
2018-10-29 18:56:30 +01:00
|
|
|
--enable-ospfapi \
|
|
|
|
--enable-bgp-vnc \
|
|
|
|
--enable-multipath=256 \
|
|
|
|
\
|
|
|
|
--enable-user=frr \
|
|
|
|
--enable-group=frr \
|
|
|
|
--enable-vty-group=frrvty \
|
2015-12-02 16:34:38 +01:00
|
|
|
--enable-configfile-mask=0640 \
|
|
|
|
--enable-logfile-mask=0640 \
|
2018-10-29 18:56:30 +01:00
|
|
|
# end
|
2015-05-20 01:26:49 +02:00
|
|
|
|
|
|
|
override_dh_auto_install:
|
|
|
|
dh_auto_install
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2018-10-25 18:17:23 +02:00
|
|
|
sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/frr-reload.py
|
2019-08-13 23:53:08 +02:00
|
|
|
sed -e '1c #!/usr/bin/python3' -i debian/tmp/usr/lib/frr/generate_support_bundle.py
|
2017-07-20 20:58:43 +02:00
|
|
|
|
2018-10-25 19:44:00 +02:00
|
|
|
# let dh_systemd_* and dh_installinit do their thing automatically
|
2018-10-22 13:37:53 +02:00
|
|
|
cp tools/frr.service debian/frr.service
|
2022-03-04 12:05:51 +01:00
|
|
|
cp tools/frr@.service debian/frr@.service
|
2018-12-11 00:03:17 +01:00
|
|
|
cp tools/frrinit.sh debian/frr.init
|
|
|
|
-rm -f debian/tmp/usr/lib/frr/frr
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2018-10-25 19:44:00 +02:00
|
|
|
# install config files
|
2018-12-18 02:21:18 +01:00
|
|
|
mkdir -p debian/tmp/etc
|
|
|
|
cp -r tools/etc/* debian/tmp/etc/
|
2018-12-12 22:50:56 +01:00
|
|
|
-rm debian/tmp/etc/frr/daemons.conf
|
2015-12-02 16:34:38 +01:00
|
|
|
|
2018-10-25 19:44:00 +02:00
|
|
|
# drop dev-only files
|
2018-10-25 15:00:55 +02:00
|
|
|
find debian/tmp -name '*.la' -o -name '*.a' -o -name 'lib*.so' | xargs rm -f
|
|
|
|
rm -rf debian/tmp/usr/include
|
2018-12-12 22:50:56 +01:00
|
|
|
-rm debian/tmp/usr/lib/frr/ssd
|
2018-10-24 18:32:11 +02:00
|
|
|
|
2018-10-25 16:09:21 +02:00
|
|
|
# use installed js libraries
|
|
|
|
-rm -f debian/tmp/usr/share/doc/frr/html/_static/jquery.js
|
|
|
|
ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/usr/share/doc/frr/html/_static/jquery.js
|
|
|
|
-rm -f debian/tmp/usr/share/doc/frr/html/_static/underscore.js
|
|
|
|
ln -s /usr/share/javascript/underscore/underscore.js debian/tmp/usr/share/doc/frr/html/_static/underscore.js
|
|
|
|
|
2018-10-24 20:57:16 +02:00
|
|
|
override_dh_auto_build:
|
|
|
|
dh_auto_build -- $(MAKE_SILENT)
|
|
|
|
|
2018-12-13 18:50:15 +01:00
|
|
|
override_dh_installinit:
|
|
|
|
dh_installinit -r
|
|
|
|
|
|
|
|
override_dh_installsystemd:
|
|
|
|
dh_installsystemd -r
|
|
|
|
|
2018-10-28 18:54:14 +01:00
|
|
|
override_dh_makeshlibs:
|
|
|
|
dh_makeshlibs -n
|
|
|
|
|
2018-10-25 15:08:04 +02:00
|
|
|
override_dh_missing:
|
|
|
|
dh_missing --fail-missing
|
|
|
|
|
2018-10-24 18:32:11 +02:00
|
|
|
override_dh_auto_clean:
|
|
|
|
# we generally do NOT want a full distclean since that wipes both
|
2018-12-10 22:34:49 +01:00
|
|
|
# debian/changelog and config.version
|
2018-10-24 18:32:11 +02:00
|
|
|
if test -f Makefile; then make redistclean; fi
|
2018-12-10 22:46:55 +01:00
|
|
|
-rm -f debian/frr.init
|
|
|
|
-rm -f debian/frr.service
|
2022-03-04 12:05:51 +01:00
|
|
|
-rm -f debian/frr@.service
|