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

%:
	dh $@

override_dh_install:
	## change permissions of sound files
	find $(CURDIR)/res -name "*.wav" | while read a; do chmod -x $$a; done
	chmod +x $(CURDIR)/res/sounds/player
	## rename files and install Changes as upstream changelog
	cp $(CURDIR)/Micropolis $(CURDIR)/micropolis
	cp $(CURDIR)/src/notes/Changes $(CURDIR)/Changelog
	## create micropolis.xpm with imagemagick
	convert -monitor -resize 32x32 Micropolis.png debian/micropolis.xpm
	## install all files
	dh_install
	## remove arch-dependent files and embedded fonts
	rm -f $(CURDIR)/debian/micropolis-data/usr/share/games/micropolis/res/dejavu-lgc/*
	rm -f $(CURDIR)/debian/micropolis-data/usr/share/games/micropolis/res/sim
