#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_BUILD_ARCH_ENDIAN ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_ENDIAN)


%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --with-xml-parsing --with-json-parsing --disable-silent-rules

override_dh_strip:
	dh_strip --dbg-package=libnftnl4-dbg

override_dh_auto_test:
	dh_auto_test
ifeq (little,$(DEB_BUILD_ARCH_ENDIAN))
	sh -c "cd tests; set -e; ./test-script.sh"
endif
