| 1 |
#!/usr/bin/make -f |
| 2 |
#export DH_VERBOSE=1 |
| 3 |
|
| 4 |
export PYBUILD_NAME=hovercraft |
| 5 |
export PYBUILD_INSTALL_ARGS=--install-scripts=/usr/share/hovercraft --install-lib=/usr/share/hovercraft |
| 6 |
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests/ {build_dir}/ |
| 7 |
export PYBUILD_TEST_ARGS=tests/test_*.py |
| 8 |
|
| 9 |
DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +%F -f -) |
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 13 |
|
| 14 |
override_dh_auto_test: |
| 15 |
PYTHONPATH=. dh_auto_test |
| 16 |
|
| 17 |
execute_after_dh_auto_install: |
| 18 |
# use packaged impress.js instead of covenience code for binary: |
| 19 |
find debian/hovercraft -name impress.js -exec ln -sfv /usr/share/javascript/impress/impress.js '{}' \; |
| 20 |
|
| 21 |
override_dh_installdocs: |
| 22 |
PYTHONPATH=. python3 -m sphinx -N -bhtml docs debian/hovercraft/usr/share/doc/hovercraft/html |
| 23 |
dh_installdocs |
| 24 |
|
| 25 |
override_dh_installman: |
| 26 |
PYTHONPATH=. python3 -m sphinx -N -bman -D today_fmt="$(DEBDATE)" docs .pybuild |
| 27 |
dh_installman .pybuild/hovercraft.1 |
| 28 |
|
| 29 |
override_dh_compress: |
| 30 |
dh_compress -X.rst # save examples |