#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with python2,python3,sphinxdoc override_dh_auto_build: set -ex; for python in $$(py3versions -r); do \ $$python setup.py build; \ done dh_auto_build override_dh_auto_install: set -ex; for python in $$(py3versions -r); do \ $$python setup.py install --root=$$(pwd)/debian/tmp \ --install-layout=deb; \ done dh_auto_install override_dh_installdocs: python setup.py build_sphinx dh_installdocs override_dh_compress: dh_compress -X.rst override_dh_auto_clean: dh_auto_clean rm -Rf build/ docs/_build/ *.egg-info/ get-orig-source: uscan --noconf --verbose --rename --force-download \ --download-current-version unpack-orig-source: get-orig-source # Remove currently unpacked source. for f in * .[!.] .??*; do \ if [ -e $${f} ] && [ $${f} != debian ] && \ [ $${f} != .gitignore ]; then \ rm -Rf $${f}; \ fi; \ done # Unpack source archive. set -e; \ source=$$(dpkg-parsechangelog | sed -n 's/^Source: //p'); \ version=$$(dpkg-parsechangelog | \ sed -n 's/^Version: \([^-]*\).*$$/\1/p'); \ tar -xzf ../$${source}_$${version}.orig.tar.gz # Find directory containing unpacked source files. Move source files # into the top-level directory. set -e; \ for f in */ .[!.]/ .??*/; do \ if [ -d $${f} ] && [ $${f} != debian ]; then \ for ff in $${f}/* $${f}/.[!.] $${f}/.??*; do \ if [ -e $${ff} ]; then \ mv $${ff} .; \ fi; \ done; \ rmdir $${f}/; \ fi; \ done