#!/usr/bin/make -f
#DH_VERBOSE = 1

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all


export PYBUILD_NAME=obitools

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

override_dh_auto_clean:
	# skip it

override_dh_clean:
	dh_clean
	rm -rf build
	rm -f doc/sphinx/build_dir.txt
	rm -rf src/OBITools.egg-info

override_dh_auto_install:
	PYTHONPATH=$(shell pybuild --print build_dir --interpreter python) \
		http_proxy='127.0.0.1:9' \
	    dh_auto_install

override_dh_installman:
	dh_installman
	find debian -name "ecoPCR.1*" -delete
	find debian -name "ecofind.1*" -delete