File: rules

package info (click to toggle)
python-proto-plus 1.26.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 816 kB
  • sloc: python: 4,649; makefile: 27
file content (30 lines) | stat: -rwxr-xr-x 1,314 bytes parent folder | download
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
#!/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