#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=manuel

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

override_dh_auto_install:
	dh_auto_install
	rm -f debian/python*-manuel/usr/lib/python*/dist-packages/manuel/*.txt
	rm -f debian/python*-manuel/usr/lib/python*/dist-packages/manuel/tests.py
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. http_proxy='127.0.0.1:9' \
	python3 -m sphinx -N -bhtml -c sphinx src/manuel debian/python3-manuel/usr/share/doc/python3-manuel/html
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst
