Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 #export DH_VERBOSE = 1
5
6 export PYBUILD_NAME=mkdocs_literate_nav
7 export PYBUILD_DESTDIR=debian/mkdocs-literate-nav
8
9 %:
10 dh $@ --with mkdocs --buildsystem=pybuild
11
12 override_dh_clean:
13 rm -rf html .pytest_cache
14 dh_clean
15
16 override_dh_auto_build:
17 dh_auto_build
18 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
19 PYTHONPATH=. python3 -m mkdocs build -v --site-dir=html
20 rm -f html/requirements.* html/sitemap.xml.gz
21 endif
22
23 override_dh_mkdocs:
24 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
25 dh_mkdocs
26 endif
27
28 override_dh_installdocs:
29 dh_installdocs
30 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
31 # Workaround to move content of mkdocs-literate-nav-doc into the right
32 # place.
33 mv $(CURDIR)/debian/mkdocs-literate-nav-doc/usr/share/doc/mkdocs-literate-nav/* \
34 $(CURDIR)/debian/mkdocs-literate-nav-doc/usr/share/doc/mkdocs-literate-nav-doc && \
35 rm -rf $(CURDIR)/debian/mkdocs-literate-nav-doc/usr/share/doc/mkdocs-literate-nav
36 endif