Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE = 1
5
6 export PYBUILD_DESTDIR=debian/mkdocs
7 export PYBUILD_BEFORE_TEST=cp -r {dir}/mkdocs/tests {build_dir}/mkdocs
8 export PYBUILD_AFTER_TEST=rm -rf {build_dir}/mkdocs/tests
9 export PYBUILD_TEST_ARGS=-s mkdocs/tests -p "*_tests.py"
10 export LC_ALL=C.UTF-8
11
12 %:
13 dh $@ --buildsystem=pybuild
14
15 execute_after_dh_clean:
16 rm -rf .mypy_cache
17 for mo_file in `find mkdocs/themes/ -type f -name "*.mo"`; do \
18 rm -f $${mo_file} ;\
19 done
20
21 execute_after_dh_auto_build:
22 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
23 PYTHONPATH=. python3 -m mkdocs build -v -d docs.debian/html
24 rm -rf docs.debian/html/__pycache__
25 endif
26
27 execute_after_dh_auto_install:
28 rm debian/mkdocs/usr/bin/mkdocs
29 find debian -name LICENSE -exec rm -f {} \;;
30 find debian -type d -empty -delete
31
32 override_dh_installman:
33 pod2man -c Debhelper -r '' debian/scripts/dh_mkdocs debian/dh_mkdocs.1
34 dh_installman
35
36 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
37 execute_after_dh_installdocs:
38 ./debian/scripts/dh_mkdocs
39 endif
40
41 override_dh_compress:
42 dh_compress -Xsearch_index.json