#!/usr/bin/make -f

SHELL+= -e
export DH_COMPAT=4
#export DH_VERBOSE=1

build:

clean:
	$(checkdir)
	-rm -f build
	dh_clean

binary-indep: checkroot
	$(checkdir)
	dh_clean
	dh_installdirs usr/share/games/purity/
	cp tests/* debian/purity-off/usr/share/games/purity/
	dh_installdocs
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_builddeb
	
define checkdir
	test -f debian/rules
endef

binary: binary-indep

checkroot:
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot
