#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

DEB_COMPRESS_EXCLUDE		:= .py
DEB_PYTHON_INSTALL_ARGS_ALL 	+= --single-version-externally-managed
DEB_DESTDIR                      =$(CURDIR)/debian/python-traitsui
PYSHARED                         =$(DEB_DESTDIR)/usr/share/pyshared
PYLIBS                           =$(DEB_DESTDIR)/usr/lib/python*
EXAMPLES                         =$(DEB_DESTDIR)/usr/share/doc/python-traitsui

install/python-traitsui::
	find $(DEB_DESTDIR) -name 'image_LICENSE.txt' -delete

binary-predeb/python-traitsui::
	find $(PYLIBS) -type f -print0 | xargs -0 chmod 644
	find $(EXAMPLES) -type f -print0 | xargs -0 sed -i '/^#!/d'
	find $(EXAMPLES) -type f -print0 | xargs -0 chmod 644

get-orig-source:
	-uscan --force-download --rename
