#!/usr/bin/make -f

export V=1

#_dhopts := --with autotools_dev
_shlibdeps := -a -Xlib/xtables -l$(CURDIR)/debian/build/extensions/.libs
_configure := --with-xtlibdir=/lib/xtables \
	--disable-libipq --enable-devel --libdir=/lib 

%:
	dh $@ $(_dhopts)

binary: binary-arch binary-indep
binary-arch binary-indep: install

override_dh_shlibdeps:
	dh_shlibdeps $(_shlibdeps)

ifneq ($(USE_BUILD_DIR),TRUE)
include debian/builddir.mk
else

override_dh_auto_configure:
	autoreconf -fi
	dh_auto_configure -- $(_configure)

override_dh_auto_install:
	dh_auto_install
	find debian/tmp/lib/xtables -name \*.so | xargs -r -ifoo chrpath -d foo

override_dh_auto_test:

endif
