#!/usr/bin/make -f

export PYBUILD_BEFORE_TEST_python3=cp -r {dir}/setup.py {dir}/examples {build_dir}
#export PYBUILD_BEFORE_CLEAN=rm -rf {build_dir}

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

override_dh_auto_test:
	-dh_auto_test

override_dh_auto_install:
	dh_auto_install
	mkdir -p debian/i8c/usr/share/man/man1
	PYTHONPATH=$$(find debian/i8c -name dist-packages) \
	help2man --name='Infinity Note Compiler' --no-info \
		debian/i8c/usr/bin/i8c \
		> debian/i8c/usr/share/man/man1/i8c.1
	PYTHONPATH=$$(find debian/i8c -name dist-packages) \
	help2man --name='Infinity Note Execution Environment' --no-info \
		debian/i8c/usr/bin/i8x \
		> debian/i8c/usr/share/man/man1/i8x.1

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
#	dh_auto_configure -- #	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

