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 36 37 38
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=ndcube
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=../../../ndcube
export http_proxy=127.0.0.1:9
export HOME=$(shell mktemp -d)
BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)" -D html_show_copyright=0
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_auto_build:
dh_auto_build
PYTHONPATH=. sphinx-build $(SPHINXOPTS) -N -bhtml docs/ build/html # HTML generator
# Replace static files with symlinks when possible
for file in $$(find build/html/_static/ -name jquery-*.min.js); do rm $$file; ln -s /usr/share/javascript/jquery/jquery.min.js $$file; done
override_dh_python3:
dh_python3
rm -rf debian/python3-ndcube/usr/lib/python3/dist-packages/ndcube/data/README.rst
override_dh_auto_clean:
rm -rf ndcube/_version.py
override_dh_sphinxdoc:
dh_sphinxdoc
# Replace static files with symlinks when possible
for dir in $$(find debian/python3-ndcube-doc/usr/share/doc/python3-ndcube/html/_static/ -name bootstrap-* -type d -maxdepth 1); do rm -rf $$dir; ln -s /usr/share/javascript/bootstrap $$dir; done
for dir in $$(find debian/python3-ndcube-doc/usr/share/doc/python3-ndcube/html/_static/ -name bootswatch-* -type d -maxdepth 1); do rm -rf $$dir; ln -s /usr/share/javascript/bootswatch $$dir; done
override_dh_link:
dh_link
# Remove duplicates in documentation package
jdupes -rl debian/python3-ndcube-doc/usr
|