File: rules

package info (click to toggle)
dput-ng 1.33
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,008 kB
  • sloc: python: 3,750; makefile: 154; sh: 10
file content (45 lines) | stat: -rwxr-xr-x 974 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

MANPAGES := $(patsubst docs/man/%.man, debian/man/%, $(wildcard docs/man/*.man))
VENDOR = $(shell dpkg-vendor --query vendor)
export PYBUILD_NAME = dput
export PYBUILD_BEFORE_TEST = cp -r {dir}/skel {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST = rm -r {build_dir}/skel {build_dir}/tests

%:
	dh $@ --with bash-completion,python3,sphinxdoc --buildsystem pybuild


override_dh_auto_clean:
	dh_auto_clean
	rm -rvf ./docs/_build ./*.egg-info ./build .coverage
	rm -f $(MANPAGES)
	rm -rf debian/man
	find . -name '__pycache__' -type d -delete


override_dh_auto_build:
	dh_auto_build
	make -C docs html


override_dh_install:
	dh_install
	debian/bin/adjust-vendor $(VENDOR)


debian/man:
	mkdir $@


$(MANPAGES): debian/man
	a2x --doctype manpage --format manpage -D $(dir $@) \
		$(patsubst debian/man/%, docs/man/%.man, $@)


override_dh_installman: $(MANPAGES)
	dh_installman --language=C


override_dh_installexamples:
	dh_installexamples examples/*