#!/usr/bin/make -f

export VERBOSE=1

d=--buildsystem=autoconf --builddirectory="{build_dir}"
export PYBUILD_NAME=pythonmagick
export PYBUILD_SYSTEM=custom
export PYBUILD_CLEAN_ARGS=dh_auto_clean $d;
# hack here see  #866694
# automake as 20170813 does not support python3.6 and
# pythonmagick does not support python < 2.4 thus ask
# for ${version.major}+.4
export PYBUILD_CONFIGURE_ARGS=dh_auto_configure $d -- \
	--disable-silent-rules --disable-static \
	--with-python-min-version={version.major}.4
export PYBUILD_BUILD_ARGS=dh_auto_build $d
export PYBUILD_INSTALL_ARGS=dh_auto_install $d --destdir="{destdir}"
export PYBUILD_TEST_ARGS=dh_auto_test $d

%:
	dh $@ --with python2,python3 --buildsystem=pybuild

override_dh_auto_install:
	dh_auto_install
	find debian/ -name "*.la" -delete
