File: rules

package info (click to toggle)
python-pyfunceble 4.2.29.dev-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,108 kB
  • sloc: python: 27,413; sh: 142; makefile: 27
file content (40 lines) | stat: -rwxr-xr-x 1,324 bytes parent folder | download
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
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=pyfunceble
PACKAGE = python3-pyfunceble

# Tests disabled due to trying to connect to an external network
export PYBUILD_DISABLE=test

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),)
	python3 $(CURDIR)/docs/gen_ref_pages.py
	mkdocs build -d $(CURDIR)/debian/html -f $(CURDIR)/mkdocs.yml
endif

# Fixed lintian python-pyfunceble-doc: privacy-breach-generic
override_dh_installdocs:
	dh_installdocs
	find debian/python-pyfunceble-doc/ -type f -name sitemap.xml.gz -delete
	find debian/python-pyfunceble-doc/ -name '*.html' -exec sed -i \
		-e '/https:\/\/asciinema.org/d' \
		-e '/https:\/\/fonts.googleapis.com\//d' \
		-e '/https:\/\/fonts.gstatic.com/d' \
		-e '/https:\/\/unpkg.com\/iframe-worker\/shim/d' \
		-e 's/<img [^>]*>//g' {} \;

override_dh_mkdocs:
	dh_mkdocs --theme-package mkdocs-material

# Upstream informs that such tools are intended for developers only. Unnecessary for user use.
# https://github.com/funilrys/PyFunceble/commit/3a61b8424bafa17b1879e94e90ae3e0ad972be41
execute_after_dh_install:
	rm -f debian/$(PACKAGE)/usr/bin/PyFunceble
	rm -f debian/$(PACKAGE)/usr/bin/clean-pyfunceble

override_dh_installexamples:
	dh_installexamples examples/api_usage examples/lists