#!/usr/bin/make -f

SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
PYTHON2 := $(shell pyversions -vr)

%:
	dh $@ --with python2

override_dh_auto_install:
	dh_auto_install -- SUBDIRS="bin docs"
	set -e && for py in $(PYTHON2); do \
		dh_auto_install -- -C createrepo \
			PKGDIR="/usr/lib/python$$py/dist-packages/$(SOURCE)"; \
	done
	dh_bash-completion
	rm -rf debian/$(SOURCE)/usr/etc
