File: rules

package info (click to toggle)
python-can 3.0.0%2Bgithub-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,892 kB
  • sloc: python: 8,014; makefile: 29; sh: 12
file content (42 lines) | stat: -rwxr-xr-x 1,004 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
#! /usr/bin/make -f

export PYBUILD_NAME=can
export PYBUILD_AFTER_INSTALL_python2=rm -rf {destdir}/usr/bin/

include /usr/share/dpkg/default.mk
export DEB_VERSION_UPSTREAM

%:
	dh $@ --with python3,python2,sphinxdoc --buildsystem=pybuild

override_dh_clean:
	dh_clean
	rm -f test.asc test.csv
	rm -rf .pytest_cache/

override_dh_auto_build:
	dh_auto_build
	python3 -m sphinx -E -T -b html doc $(CURDIR)/.pybuild/docs/html/
	#rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees

override_dh_auto_install:
	dh_auto_install
	-for f in debian/*/usr/bin/*.py; do mv $$f $${f%.py}; done
	-rm -f debian/*/usr/lib/python*/dist-packages/test.???

licensecheck:
	licensecheck --deb-machine -r * \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints

manpages=debian/can_logger.1 debian/can_player.1 debian/can_viewer.1


$(manpages): debian/helper2man
	cp $^ $(@:.1=)
	help2man -N -o $@ ./$(@:.1=)
	-rm $(@:.1=)

.PHONY: manpages
manpages: $(manpages)