#!/usr/bin/make -f export PYBUILD_NAME=proto-plus %: dh $@ --buildsystem=pybuild override_dh_installdocs: https_proxy='127.0.0.1:9' sphinx-build -b html docs build/sphinx/html # Replace jquery.js with local paths rm build/sphinx/html/_static/jquery.js find -type f -name "*.html" -exec sed -i 's|src="../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + find -type f -name "*.html" -exec sed -i 's|src="../../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + find -type f -name "*.html" -exec sed -i 's|src="../../../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + find -type f -name "*.html" -exec sed -i 's|src="_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + # Removing embedded javascript libraries, no replacements available in Debian rm build/sphinx/html/_static/doctools.js rm build/sphinx/html/_static/searchtools.js rm build/sphinx/html/_static/language_data.js # Remove python-doctree-files rm -rf build/sphinx/html/.doctrees # Remove fonts from the package rm -rf build/sphinx/html/_static/fonts dh_installdocs -ppython-proto-plus-doc --doc-main-package=python-proto-plus-doc build/sphinx/html dh_installdocs