#!/usr/bin/make -f
export PYBUILD_NAME=opgpcard
export PYBUILD_DESTDIR=debian/opgpcard
%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/source/ docs/build/html # HTML generator
	find build/html -type f -name '*.html' -print0 | xargs -0r sed -i -e 's@$(CURDIR)/@@g'
	PYTHONPATH=. sphinx-build -N -bman docs/source/ docs/build/man # man generator
