#!/usr/bin/make -f

# DH_VERBOSE := 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# autoreconf is needed to make the patch to test/Makefile.am effective
%:
	dh $@ --with autotools_dev # this fails because auf broken upstream autoconf stuff: - - with autoreconf

override_dh_auto_configure:
	# see upstream INSTALL file
	CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash

override_dh_auto_install:
	# upstream install does install more files than needed

override_dh_install-indep:
	dh_install
	# fix path to smalt executable in examples
	for py in `ls test/*.py` ; do \
	    sed 's#PROGNAM = "../src/smalt"#PROGNAM = "/usr/bin/smalt"#' $${py} > debian/smalt-examples/usr/share/doc/smalt/$${py} ; \
	done

override_dh_auto_clean:
	dh_auto_clean
	rm -rf test/*.pyc misc/*.pyc test/tmp
