| 1 |
#! /usr/bin/make -f |
| 2 |
|
| 3 |
# Uncomment this to turn on verbose mode. |
| 4 |
#export DH_VERBOSE = 1 |
| 5 |
|
| 6 |
export PYBUILD_NAME = prov |
| 7 |
export PYBUILD_DESTDIR = debian/python3-$(PYBUILD_NAME) |
| 8 |
export PYBUILD_TEST_UNITTEST = 1 |
| 9 |
|
| 10 |
# generate documentation unless nodoc requested |
| 11 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 12 |
CHANGELOGS = HISTORY.html HISTORY.txt |
| 13 |
DOCS = README.html README.txt |
| 14 |
endif |
| 15 |
|
| 16 |
%: |
| 17 |
dh $@ --buildsystem=pybuild |
| 18 |
|
| 19 |
%.html: %.md |
| 20 |
cmark-gfm $< > $@ |
| 21 |
|
| 22 |
%.txt: %.md |
| 23 |
cmark-gfm --to plaintext $< > $@ |
| 24 |
|
| 25 |
override_dh_auto_clean: |
| 26 |
dh_auto_clean |
| 27 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) |
| 28 |
$(MAKE) -C docs clean |
| 29 |
endif |
| 30 |
|
| 31 |
override_dh_auto_build: export http_proxy=127.0.0.1:9 |
| 32 |
override_dh_auto_build: export https_proxy=127.0.0.1:9 |
| 33 |
override_dh_auto_build: |
| 34 |
dh_auto_build |
| 35 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) |
| 36 |
PYTHONPATH=$(CURDIR) $(MAKE) -C docs html |
| 37 |
endif |
| 38 |
|
| 39 |
execute_after_dh_auto_build: $(DOCS) $(CHANGELOGS) |
| 40 |
|
| 41 |
execute_after_dh_auto_install: |
| 42 |
dh_movefiles --package=$(PYBUILD_NAME)-tools \ |
| 43 |
--sourcedir=$(PYBUILD_DESTDIR) usr/bin |
| 44 |
|
| 45 |
override_dh_installdocs: |
| 46 |
dh_installdocs --all -- $(DOCS) |
| 47 |
|
| 48 |
override_dh_installchangelogs: |
| 49 |
dh_installchangelogs -- $(CHANGELOGS) |