#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--bindir=/usr/games \
		--localstatedir=/var \
		--mandir=/usr/share/man

override_dh_auto_install:
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/tenmado/
	# the high score directory is handled by the maintainer scripts,
	# so don't put it in .deb
	rmdir $(CURDIR)/debian/tenmado/var/games/tenmado/
	rmdir $(CURDIR)/debian/tenmado/var/games/
	rmdir $(CURDIR)/debian/tenmado/var/

override_dh_install:
	# debian menu and desktop icon
	cp icon.xpm debian/tenmado.xpm
	cp icon.png debian/tenmado.png
	dh_install

override_dh_fixperms:
	dh_fixperms
	chown root:games $(CURDIR)/debian/tenmado/usr/games/tenmado
	chmod 2755 $(CURDIR)/debian/tenmado/usr/games/tenmado

