| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
# For DEB_VERSION_UPSTREAM |
| 5 |
include /usr/share/dpkg/pkg-info.mk |
| 6 |
|
| 7 |
export PYBUILD_NAME=cxxheaderparser |
| 8 |
|
| 9 |
%: |
| 10 |
dh $@ --with python3,sphinxdoc --buildsystem=pybuild |
| 11 |
|
| 12 |
# Some targets choke if version.py doesn't exist, and it only gets created if |
| 13 |
# a .git dir is present |
| 14 |
create_version_file: |
| 15 |
echo "# Autogenerated by debian/rules" > cxxheaderparser/version.py |
| 16 |
echo "__version__ = '$(DEB_VERSION_UPSTREAM)'" >> cxxheaderparser/version.py |
| 17 |
|
| 18 |
execute_before_dh_auto_configure: create_version_file |
| 19 |
: |
| 20 |
|
| 21 |
# This should be execute_after_dh_auto_build, but that fails because the |
| 22 |
# module cannot be found. I'll figure that out in the next upload |
| 23 |
override_dh_installdocs: |
| 24 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 25 |
PYTHONPATH=$(CURDIR) \ |
| 26 |
http_proxy='http://127.0.0.1:9' \ |
| 27 |
https_proxy='https://127.0.0.1:9' \ |
| 28 |
sphinx-build -b html docs html |
| 29 |
endif |
| 30 |
dh_installdocs --package=python-cxxheaderparser-doc --doc-main-package=python3-cxxheaderparser |
| 31 |
dh_installdocs --remaining-packages |
| 32 |
|
| 33 |
|
| 34 |
execute_before_dh_auto_clean: create_version_file |
| 35 |
: |
| 36 |
|
| 37 |
execute_after_dh_auto_clean: |
| 38 |
rm -f cxxheaderparser/version.py |
| 39 |
rm -rf cxxheaderparser.egg-info/ |
| 40 |
rm -rf html |