File: rules

package info (click to toggle)
python-mkdocs 1.6.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,812 kB
  • sloc: python: 14,346; javascript: 10,535; perl: 143; sh: 57; makefile: 30; xml: 11
file content (42 lines) | stat: -rwxr-xr-x 1,097 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE = 1

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