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 35 36 37 38 39 40 41 42
|
export PYBUILD_DESTDIR=debian/mkdocs
export PYBUILD_BEFORE_TEST=cp -r {dir}/mkdocs/tests {build_dir}/mkdocs
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/mkdocs/tests
export PYBUILD_TEST_ARGS=-s mkdocs/tests -p "*_tests.py"
export LC_ALL=C.UTF-8
%:
dh $@ --buildsystem=pybuild
execute_after_dh_clean:
rm -rf .mypy_cache
for mo_file in `find mkdocs/themes/ -type f -name "*.mo"`; do \
rm -f $${mo_file} ;\
done
execute_after_dh_auto_build:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
PYTHONPATH=. python3 -m mkdocs build -v -d docs.debian/html
rm -rf docs.debian/html/__pycache__
endif
execute_after_dh_auto_install:
rm debian/mkdocs/usr/bin/mkdocs
find debian -name LICENSE -exec rm -f {} \;;
find debian -type d -empty -delete
override_dh_installman:
pod2man -c Debhelper -r '' debian/scripts/dh_mkdocs debian/dh_mkdocs.1
dh_installman
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_installdocs:
./debian/scripts/dh_mkdocs
endif
override_dh_compress:
dh_compress -Xsearch_index.json
|