#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc powerpcspe sh4))
    export LIBS=-Wl,--as-needed -latomic -Wl,--no-as-needed
endif

%:
	dh $@ --with python3

override_dh_auto_configure:
	# duplicate the kismet-capture-common-debconf-helper in
	# kismet-capture-common.config: when .config is called the
	# kismet-capture-common-debconf-helper file is not installed
	# (error during upgrade)
	cp debian/kismet-capture-common-debconf-helper debian/kismet-capture-common.config
	dh_auto_configure -- --sysconfdir=/etc/kismet --enable-wifi-coconut --enable-bladerf

override_dh_auto_build:
	dh_auto_build -- all-with-plugins

override_dh_auto_install:
	dh_auto_install --no-parallel -Xpycache -- suidinstall all-plugins-install

override_dh_missing:
	dh_missing --fail-missing
