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
NET_TESTFILES = tests/integration/test_end_to_end.py tests/integration/blockchain/test_verify.py
cmd = silkaj
_ENV = $(strip \
PATH="$(CURDIR)/debian/silkaj/usr/bin:$(PATH)" \
PYTHONPATH="$(CURDIR)/debian/silkaj/usr/lib/$(shell py3versions -d)/dist-packages")
# generate manpage with help2man from --help option of python script
_mkman = $(_ENV) \
help2man $(if $3,--name "$(strip $3)") --no-info --output $2 $1 \
|| { $(_ENV) $1 --help; false; }
export PYBUILD_TEST_ARGS = \
$(patsubst %,--ignore=%,$(NET_TESTFILES))
%:
dh $@ --buildsystem=pybuild
# generate manpage based on --help option of script itself
# * Fix encode special Duniter signature "Ğ"
# generate shell completion scripts
# check shell script
execute_after_dh_auto_install:
$(call _mkman, $(cmd), debian/$(cmd).1, \
command-line client for Duniter)
perl -i -pe 's/\?\?(?=1|Test)/ \\\[u011E\]/g' \
debian/$(cmd).1
$(_ENV) \
_SILKAJ_COMPLETE=bash_source $(cmd) \
> debian/bash-completion || true
test -s debian/bash-completion
$(_ENV) \
_SILKAJ_COMPLETE=zsh_source $(cmd) \
> debian/_$(cmd) || true
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test -s debian/_$(cmd)
endif
$(_ENV) prove debian/tests/*.t
find debian/silkaj/usr/lib -name '*.pyc' -delete
find debian/silkaj/usr/lib -type d -empty -delete
|