#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk
include /usr/share/GNUstep/debian/config.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
d_app := $(CURDIR)/debian/gmastermind.app/usr/share/GNUstep/GMastermind.app

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(optim) $(verbose) \
	  $(shell dpkg-buildflags --export=cmdline)

execute_before_dh_link:
	gsdh_gnustep --app --game
	convert Resources/GMastermind.tiff -resize 64x64 $(d_app)/app-icon.png
# Convert a translation to fix lintian W: national-encoding.
	iconv -f ISO-8859-1 -t UTF-8 < French.lproj/Localizable.strings \
	  > $(d_app)/French.lproj/Localizable.strings
