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
|
#! /usr/bin/make -f
export PYBUILD_NAME=can
export PYBUILD_TEST_ARGS=-k 'not BasicTestUdpMulticastBusIP'
include /usr/share/dpkg/default.mk
export DEB_VERSION_UPSTREAM
%:
dh $@ --buildsystem=pybuild
execute_after_dh_clean:
rm -f test.asc test.csv
rm -rf .pytest_cache/
execute_after_dh_auto_build:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
PYTHONPATH=$(CURDIR) python3 -m sphinx \
-E -T -b html \
doc $(CURDIR)/.pybuild/docs/html/
endif
execute_after_dh_auto_install:
-for f in debian/*/usr/bin/*.py; do mv $$f $${f%.py}; done
-find debian/python3-can -name test.trc -delete
override_dh_installdocs:
dh_installdocs --doc-main-package=python3-can -p python-can-doc
dh_installdocs --remaining-packages
manpages=debian/can_logger.1 debian/can_player.1 debian/can_viewer.1 debian/can_logconvert.1
$(manpages): debian/helper2man
cp $^ $(@:.1=)
help2man -N -o $@ ./$(@:.1=)
-rm $(@:.1=)
.PHONY: manpages
manpages: $(manpages)
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
debian/.*|doc/images/.*\.png
# licensecheck v1
.PHONY: licensecheck
licensecheck:
LANG=C.UTF-8 licensecheck \
-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
--check '.*' --recursive --deb-machine --lines 0 * \
> debian/copyright_newhints
cmp debian/copyright_hints debian/copyright_newhints \
&& rm debian/copyright_newhints
|