#!/usr/bin/make -f
# debian/rules for dicompyler
# Andreas Tille <tille@debian.org>
# GPL

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')

export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/$(DEBPKGNAME)/
export PYBUILD_AFTER_INSTALL=mv {destdir}/usr/bin/$(DEBPKGNAME) {destdir}/usr/share/$(DEBPKGNAME)/run

%:
	dh $@ --with python2 --buildsystem=pybuild

override_dh_fixperms:
	dh_fixperms
	find debian -name __init__.py | xargs -r chmod a-x
	find debian -name "*.png" | xargs -r chmod a-x

get-orig-source:
	uscan --verbose --force-download --repack
