#!/usr/bin/make -f

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export DH_VERBOSE=1
endif
export PYBUILD_NAME = nftables
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

configure_opts := --with-xtables --with-json --with-python-bin=/usr/bin/python3 --with-cli=editline

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- $(configure_opts) --

execute_after_dh_fixperms:
	chmod a+x debian/nftables/etc/nftables.conf

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start --restart-after-upgrade

override_dh_installexamples:
	dh_installexamples -XMakefile
