File: rules

package info (click to toggle)
python-pyfunceble 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,144 kB
  • sloc: python: 27,918; sh: 142; makefile: 48
file content (60 lines) | stat: -rwxr-xr-x 2,256 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=pyfunceble
PACKAGE = python3-pyfunceble

ifneq ($(PYBUILD_AUTOPKGTEST),1)
export PYBUILD_TEST_ARGS := \
	--ignore tests/checker/availability/test_base.py \
	--ignore tests/checker/availability/test_domain.py \
	--ignore tests/checker/availability/test_ip.py \
	--ignore tests/checker/availability/test_url.py \
	--ignore tests/checker/reputation/test_base.py \
	--ignore tests/checker/reputation/test_domain.py \
	--ignore tests/checker/reputation/test_domain_and_ip.py \
	--ignore tests/checker/reputation/test_ip.py \
	--ignore tests/checker/reputation/test_url.py \
	--ignore tests/checker/syntax/test_domain.py \
	--ignore tests/checker/syntax/test_second_lvl_domain.py \
	--ignore tests/checker/syntax/test_subdomain.py \
	--ignore tests/checker/syntax/test_url.py \
	--ignore tests/checker/utils/test_whois.py \
	--ignore tests/checker/test_base.py \
	--ignore tests/config/test_loader.py \
	--ignore tests/converter/test_subject2complements.py \
	--ignore tests/query/dnss \
	--ignore tests/query/test_platform.py \
	--ignore tests/query/test_http_status_code.py
endif

%:
	dh $@ --buildsystem=pybuild

execute_after_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