| 1 | #!/usr/bin/make -f |
| 2 | |
| 3 | DOPACKAGES = $(shell dh_listpackages) |
| 4 | export PYBUILD_DESTDIR=debian/tmp |
| 5 | |
| 6 | # Make it easier to build on machines with ansible << 2.10 installed. |
| 7 | export ANSIBLE_SKIP_CONFLICT_CHECK=1 |
| 8 | |
| 9 | # tmpdir is needed during docs build, as ~ isn't writeable in sbuild |
| 10 | export ANSIBLE_LOCAL_TEMP=tmp/ |
| 11 | |
| 12 | export LC_ALL=C.UTF-8 |
| 13 | |
| 14 | %: |
| 15 | # dh $@ --with sphinxdoc --buildsystem=pybuild |
| 16 | dh $@ --buildsystem=pybuild |
| 17 | |
| 18 | override_dh_clean: |
| 19 | dh_clean \ |
| 20 | --exclude=test/units/inventory_test_data/group_vars/noparse/all.yml~ \ |
| 21 | --exclude=test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/uses_leaf_mu_flat_import.bak |
| 22 | |
| 23 | # now not part of the package anymore |
| 24 | rm -Rf docs/man/ |
| 25 | |
| 26 | execute_after_dh_auto_build: |
| 27 | # manpage documentation |
| 28 | mkdir -p docs/man/man1/ |
| 29 | /usr/bin/python3 packaging/cli-doc/build.py man --output-dir docs/man/man1/ |
| 30 | ifneq (,$(filter ansible-doc,$(DOPACKAGES))) |
| 31 | # html documentation |
| 32 | $(MAKE) webdocs |
| 33 | endif |
| 34 | |
| 35 | override_dh_auto_test: |
| 36 | # For now, disable the tests |
| 37 | #make tests-nonet |
| 38 | |
| 39 | override_dh_python3: |
| 40 | dh_python3 --shebang=/usr/bin/python3 |