#!/usr/bin/make -f

export PYBUILD_NAME=pympress
export PYBUILD_DESTDIR_python3 = debian/pympress/

# Needed by sphinx build
export HOME=$(CURDIR)/debian/fakehome/

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

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html -t api_doc -t install_instructions # HTML generator
	PYTHONPATH=. python3 -m sphinx -N -bman docs/ build/man # Manpage generator

override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
