1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DH_ALWAYS_EXCLUDE=__pycache__
export DH_VERBOSE=1
export PYBUILD_VERBOSE=1
export LC_ALL=C.UTF-8
export PYBUILD_NAME=uflash
export PYBUILD_TEST_PYTEST = 1
%:
dh $@ --with sphinxdoc --buildsystem=pybuild
override_dh_auto_clean:
dh_auto_clean
rm -f debian/uflash.1.md
rm -f debian/uflash.1
rm -rf docs/html
rm -rf uflash.egg-info
rm -rf __pycache__
override_dh_auto_build:
dh_auto_build
# build custom manpage
@echo DEB_VERSION_UPSTREAM $(DEB_VERSION_UPSTREAM)
sed -e "s/__VERSION__/$(DEB_VERSION_UPSTREAM)/g" \
< debian/uflash.1.md.in > debian/uflash.1.md
pandoc debian/uflash.1.md -s -f markdown -t man -o debian/uflash.1
# build documentation
PYTHONPATH=. http_proxy='127.0.0.1:9' https_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs/ docs/html
|