#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_install:
	dh_install --list-missing
	cp -v $(CURDIR)/app/Pencil2D $(CURDIR)/debian/pencil2d/usr/bin/pencil2d
	cp -v $(CURDIR)/icons/icon.png $(CURDIR)/debian/pencil2d/usr/share/icons/hicolor/128x128/apps/pencil2d.png

get-orig-source:
	dh_testdir
	git clone git@github.com:pencil2d/pencil.git pencil2d
	rm -rf pencil2d/util
	rm -rf pencil2d/Help
	rm -rf pencil2d/3rdlib/zlib
	cd pencil2d && tar --exclude-vcs -cjf ../../pencil2d_0.5.4~git$$(git log -1 --format="%ci"|awk {'print $$1'}|tr -d '-')+dfsg.orig.tar.bz2 .
	rm -rf pencil2d
