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 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
PYVERS := python2.7
PY3VERS := $(shell py3versions -s)
UPSTREAM_VERSION := $(shell dpkg-parsechangelog -SVersion | cut -d- -f1)
PACKAGE_NAME := $(shell dpkg-parsechangelog -SSource)
export PYBUILD_NAME=$(PACKAGE_NAME)
%:
dh $@ --with bash-completion,sphinxdoc,python2,python3 --buildsystem=pybuild
override_dh_bash-completion:
cp bash_completion_doit debian/bash_completion_doit3
sed -i 's@doit@doit3@g' debian/bash_completion_doit3
dh_bash-completion
cp zsh_completion_doit debian/zsh_completion_doit3
sed -i 's@doit@doit3@g' debian/zsh_completion_doit3
cp zsh_completion_doit debian/python-doit/usr/share/zsh/functions/Completion/Linux/_doit
cp debian/zsh_completion_doit3 debian/python3-doit/usr/share/zsh/functions/Completion/Linux/_doit3
override_dh_auto_clean:
dh_auto_clean
rm -rf doc/_build
rm -f debian/doit.1
rm -f debian/doit3.1
rm -f debian/bash_completion_doit3
rm -f debian/zsh_completion_doit3
rm -f tests/data/stop
rm -f tests/data/dependency*
rm -f tests/data/target
rm -f tests/data/w*.txt
override_dh_auto_install:
dh_auto_install
# Renaming the binary for python3
mv debian/python3-doit/usr/bin/doit debian/python3-doit/usr/bin/doit3
# Generate manpages
rst2man debian/doit.rst debian/doit.1
rst2man debian/doit3.rst debian/doit3.1
# build the html pages for the -doc package
set -ex; \
cd doc; \
make html;
override_dh_auto_test:
# Disable test by default. From time to time it fails into chroots when it
# uses the strace output to compare the result. So I'll run the test suit
# in my computer and if I find something wrong report to upstream.
#ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# set -ex; \
# for py in $(PYVERS) $(PY3VERS); do \
# $$py runtests.py; \
# done
#endif
get-orig-source:
@if [ ! -d "debian" ] ; then \
echo 'Run this from the top directory of the Debian source' >&2; \
exit 1; \
fi
uscan --noconf --verbose --rename --destdir=$(CURDIR) \
--check-dirname-level=0 --force-download --download-version $(UPSTREAM_VERSION)
|