1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME = sphinx-mdinclude
export PYBUILD_PYTEST = 1
%:
dh $@ --with=sphinxdoc --buildsystem=pybuild
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
export PYTHONPATH=$$(pybuild --print build_dir | grep "^$$(py3versions -d)" | sed -e 's/^.*: //'); \
sphinx-build -W -b html docs docs/_build/html
cp docs/example.md docs/_build/html/example.md.txt
perl -i -pe 's%<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax\@3/es5/tex-mml-chtml.js">%<script type="text/javascript" src="file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-MML-AM_CHTML">%' docs/_build/html/index.html docs/_build/html/example.html
endif
execute_after_dh_python3:
rm -rf debian/python3-sphinx-mdinclude/usr/lib/python3/dist-packages/sphinx_mdinclude/tests
override_dh_installdocs:
dh_installdocs -ppython-sphinx-mdinclude-doc --doc-main-package=python3-sphinx-mdinclude
dh_installdocs --remaining-packages
override_dh_installexamples:
dh_installexamples -ppython-sphinx-mdinclude-doc --doc-main-package=python3-sphinx-mdinclude
dh_installexamples --remaining-packages
override_dh_compress:
dh_compress -ppython-sphinx-mdinclude-doc -X.html
dh_compress --remaining-packages
execute_after_dh_auto_clean:
rm -rf docs/_build
|