#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=pygmsh

%:
	dh $@ --with python3,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 doc/ build/html # HTML generator

override_dh_sphinxdoc:
	dh_sphinxdoc
	grep -s -G "https://cdnjs.cloudflare.com/ajax/libs/mathjax/.*/latest.js" debian/python-pygmsh-doc/usr/share/doc/python-pygmsh-doc/html/* -R --files-with-matches | xargs -r sed "s|https://cdnjs.cloudflare.com/ajax/libs/mathjax/.*/latest.js|file://usr/share/javascript/mathjax/unpacked/latest.js|g" -i
