| 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | |
| 4 | #export DH_VERBOSE=1 |
| 5 | |
| 6 | include /usr/share/dpkg/default.mk |
| 7 | |
| 8 | BUILD_DATE = $(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") |
| 9 | SPHINXOPTS := -E -N -D html_last_updated_fmt="$(BUILD_DATE)" |
| 10 | |
| 11 | export LC_ALL=C.UTF-8 |
| 12 | export LANG=C.UTF-8 |
| 13 | |
| 14 | export DEB_VERSION_UPSTREAM # used by patched docs/conf.py |
| 15 | |
| 16 | export PYBUILD_NAME=click |
| 17 | export PYBUILD_TEST_PYTEST=1 |
| 18 | export PYBUILD_TEST_ARGS=-k 'not test_expand_args' {dir}/tests/ |
| 19 | |
| 20 | export SOURCE = $(CURDIR)/debian/ |
| 21 | |
| 22 | %: |
| 23 | dh $@ --buildsystem=pybuild |
| 24 | |
| 25 | execute_before_dh_sphinxdoc: |
| 26 | PYTHONPATH=src/ python3 -m sphinx -b html $(SPHINXOPTS) docs/ debian/python-click-doc/usr/share/doc/python-click-doc/html/ |
| 27 | |
| 28 | override_dh_installexamples: |
| 29 | dh_installexamples -ppython-click-doc examples/* |
| 30 | |
| 31 | execute_after_dh_fixperms: |
| 32 | rm -f debian/python-click-doc/usr/share/doc/python-click-doc/examples/imagepipe/.gitignore |