| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=proto-plus |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ --buildsystem=pybuild |
| 7 |
|
| 8 |
override_dh_installdocs: |
| 9 |
https_proxy='127.0.0.1:9' sphinx-build -b html docs build/sphinx/html |
| 10 |
|
| 11 |
# Replace jquery.js with local paths |
| 12 |
rm build/sphinx/html/_static/jquery.js |
| 13 |
find -type f -name "*.html" -exec sed -i 's|src="../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + |
| 14 |
find -type f -name "*.html" -exec sed -i 's|src="../../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + |
| 15 |
find -type f -name "*.html" -exec sed -i 's|src="../../../_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + |
| 16 |
find -type f -name "*.html" -exec sed -i 's|src="_static/jquery.js?v=8dae8fb0"|src="file:////usr/share/javascript/jquery/jquery.js"|g' {} + |
| 17 |
|
| 18 |
# Removing embedded javascript libraries, no replacements available in Debian |
| 19 |
rm build/sphinx/html/_static/doctools.js |
| 20 |
rm build/sphinx/html/_static/searchtools.js |
| 21 |
rm build/sphinx/html/_static/language_data.js |
| 22 |
|
| 23 |
# Remove python-doctree-files |
| 24 |
rm -rf build/sphinx/html/.doctrees |
| 25 |
|
| 26 |
# Remove fonts from the package |
| 27 |
rm -rf build/sphinx/html/_static/fonts |
| 28 |
|
| 29 |
dh_installdocs -ppython-proto-plus-doc --doc-main-package=python-proto-plus-doc build/sphinx/html |
| 30 |
dh_installdocs |