#!/usr/bin/make -f
%:
	dh $@ --with python2

override_dh_auto_build:
	# Building docs
	sh debian/scripts/gendoc.sh

override_dh_install:
	dh_install
	dh_python2
	if [ -d "debian/makehuman-data" ]; then \
	    echo "Deleting files"; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/license.txt ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/core/algos3d.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/core/files3d.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/core/module3d.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/lib/core.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/lib/getpath.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/lib/log.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/lib/unique.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/shared/material.pyc ; \
	    rm -f $(CURDIR)/debian/makehuman-data/usr/share/makehuman/shared/wavefront.pyc ; \
	fi

override_dh_auto_clean:
	rm -rf $(CURDIR)/docs/sphinx/build/*
	rm -f $(CURDIR)/makehuman/lib/getpath.pyc $(CURDIR)/makehuman/makehuman.pyc
	dh_auto_clean
