| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
include /usr/share/dpkg/pkg-info.mk |
| 5 |
|
| 6 |
export PYBUILD_NAME=xmlschema |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --buildsystem=pybuild |
| 10 |
|
| 11 |
execute_after_dh_auto_build: |
| 12 |
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 13 |
PYTHONPATH="$(shell pybuild --print {build_dir} --interpreter python3)" http_proxy="127.0.0.1:9" https_proxy="127.0.0.1:9" \ |
| 14 |
$(MAKE) -C doc html |
| 15 |
endif |
| 16 |
|
| 17 |
execute_after_dh_auto_install: |
| 18 |
for CMD in xmlschema-json2xml xmlschema-validate xmlschema-xml2json ; \ |
| 19 |
do \ |
| 20 |
PYTHONPATH="debian/python3-xmlschema/$(shell pybuild --print {install_dir} --interpreter python3)" \ |
| 21 |
help2man \ |
| 22 |
--version-string $(DEB_VERSION_UPSTREAM) \ |
| 23 |
--no-info \ |
| 24 |
--output $$CMD.1 \ |
| 25 |
--name "REPLACE" \ |
| 26 |
debian/python3-xmlschema/usr/bin/$$CMD ;\ |
| 27 |
done |
| 28 |
sed -i -e 's/REPLACE/XML to JSON converter/' xmlschema-xml2json.1 |
| 29 |
sed -i -e 's/REPLACE/XML validator/' xmlschema-validate.1 |
| 30 |
sed -i -e 's/REPLACE/JSON to XML converter/' xmlschema-json2xml.1 |
| 31 |
|
| 32 |
override_dh_installdocs: |
| 33 |
dh_installdocs --package=python-xmlschema-doc --doc-main-package=python3-xmlschema |
| 34 |
dh_installdocs --remaining-packages |