#!/usr/bin/make -f

export VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

d=--buildsystem=autoconf --builddirectory="{build_dir}"
export PYBUILD_NAME=pythonmagick
export PYBUILD_SYSTEM=custom
export PYBUILD_CLEAN_ARGS=dh_auto_clean $d;
export PYBUILD_CONFIGURE_ARGS=PYTHON=python{version.major}.{version.minor} \
	PYTHON_SITE_PKG=/usr/lib/python{version.major}.{version.minor}/dist-packages \
	dh_auto_configure $d -- \
	--disable-silent-rules --disable-static \
	--with-boost-python=boost_python{version.major}{version.minor}
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 python3 --buildsystem=pybuild

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