Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 #export DH_VERBOSE = 1
3
4 export PYBUILD_NAME=mkdocs-rss-plugin
5 export PYBUILD_DESTDIR=debian/mkdocs-rss-plugin
6
7 # Tests ignored due to missing dependencies or incompatibilities in Debian:
8 # - test_rss_util: requires 'validator_collection' (not packaged in Debian)
9 # - test_build/test_build_no_git/test_no_material: require 'jsonfeed' (not packaged in Debian)
10 # - test_integrations_material*: require 'materialx' theme (not available in Debian's mkdocs-material)
11 # - test_plugin_config_through_mkdocs: uses 'materialx' theme fixture, incompatible with Debian
12 export PYBUILD_TEST_ARGS=-v --no-cov \
13 --ignore=tests/test_rss_util.py \
14 --ignore=tests/test_build.py \
15 --ignore=tests/test_build_no_git.py \
16 --ignore=tests/test_integrations_material.py \
17 --ignore=tests/test_integrations_material_blog.py \
18 --ignore=tests/test_integrations_material_social_cards.py \
19 --ignore=tests/test_no_material.py \
20 -k "not test_plugin_config_through_mkdocs"
21 %:
22 dh $@ --buildsystem=pybuild
23
24 override_dh_auto_build:
25 dh_auto_build
26 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
27 PYTHONPATH=. mkdocs build -d $(CURDIR)/debian/html -f $(CURDIR)/mkdocs.yml
28 endif
29
30 override_dh_mkdocs:
31 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
32 dh_mkdocs
33 endif
34
35 override_dh_installdocs:
36 dh_installdocs
37 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
38 # Workaround to move content into the correct -doc package directory
39 mv $(CURDIR)/debian/mkdocs-rss-plugin-doc/usr/share/doc/mkdocs-rss-plugin/* \
40 $(CURDIR)/debian/mkdocs-rss-plugin-doc/usr/share/doc/mkdocs-rss-plugin-doc && \
41 rm -rf $(CURDIR)/debian/mkdocs-rss-plugin-doc/usr/share/doc/mkdocs-rss-plugin
42 find debian/mkdocs-rss-plugin-doc/ -type f -name sitemap.xml.gz -delete
43 endif
44
45 override_dh_auto_install:
46 dh_auto_install
47 find debian -type d -name junit -exec rm -rf {} + 2>/dev/null