File: rules

package info (click to toggle)
dh-doc-privacy 0.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 84 kB
  • sloc: python: 670; makefile: 20; sh: 4
file content (26 lines) | stat: -rwxr-xr-x 832 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
#!/usr/bin/make -f

VERSION := $(shell dpkg-parsechangelog -SVersion)
BUILD_SCRIPT := build/dh_doc_privacy

%:
	dh $@

override_dh_auto_build:
	mkdir -p build
	sed 's/^__version__ = "unknown"$$/__version__ = "$(VERSION)"/' dh_doc_privacy > $(BUILD_SCRIPT)
	chmod 0755 $(BUILD_SCRIPT)

override_dh_auto_test:
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	@echo "Skipping tests because DEB_BUILD_OPTIONS contains nocheck"
else
	for py in $$(py3versions -s); do \
		$$py -Wd -m pytest -v; \
	done
	mypy --strict --scripts-are-modules dh_doc_privacy
endif

override_dh_installman:
	help2man --no-info --section=1 --source=Debian --manual="Debhelper Commands" --name="remove remote assets from package documentation" --include=debian/dh_doc_privacy.h2m $(BUILD_SCRIPT) > debian/dh_doc_privacy.1
	dh_installman debian/dh_doc_privacy.1