#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with systemd

# Build nfdump with nfprofile for nfsen
# --enable-nfprofile

# Build ft2nfdump converter. The flow-tools 
# sources are required to build ft2nfdump.
# --enable-ftconv 
# --with-ftpath[=flow-tools sources]
#
# Build sflow collector daemon.
# --enable-sflow

override_dh_auto_configure:
	dh_auto_configure -- --enable-compat15 \
		--enable-nfprofile \
		--enable-ftconv --with-ftpath=/usr \
		--enable-nftrack \
		--enable-sflow \
		--enable-shared=no

# Disable test suite, has not run before and seems to be broken
override_dh_auto_test:

# Disable automatic dbgsym generation for now and keep manual -dbg
override_dh_strip:
	dh_strip --dbg-package=nfdump-dbg

override_dh_install:
	rm -f debian/tmp/usr/lib/*/libnfdump.a
	rm -f debian/tmp/usr/lib/*/libnfdump.la
	dh_install --fail-missing
