#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

TOSAVE := po/Makefile po/Makefile.in po/remove-potcdate.sed

%:
	dh $@ --with autotools-dev

override_dh_auto_configure:
	for f in $(TOSAVE) ; \
		do [ -e $$f.debian-rules-orig ] || cp -rpv $$f $$f.debian-rules-orig ; \
	done
	[ -e grhino_icon_menu.xpm ] || convert -resize 32x32 icon_new.xpm grhino_icon_menu.xpm
	dh_auto_configure -- --bindir=/usr/games

override_dh_auto_clean:
	[ ! -e Makefile ] || $(MAKE) clean
	for f in $(TOSAVE) ; \
		do [ ! -e $$f.debian-rules-orig ] || ( rm -rf $$f && mv -v $$f.debian-rules-orig $$f ) ; \
	done
