#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/GNUstep/debian/config.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
d_app := $(CURDIR)/debian/dictionaryreader.app
srcdir := Etoile/Services/User/DictionaryReader

%:
	dh $@ --sourcedirectory=$(srcdir)

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

override_dh_installchangelogs:
	dh_installchangelogs $(srcdir)/ChangeLog

execute_before_dh_link:
	gsdh_gnustep --app
# Fix lintian W: national-encoding.
	iconv -f ISO-8859-1 -t UTF-8 \
	  < $(srcdir)/Resources/Dictionaries/jargon/jargon.dict \
	  > $(d_app)/usr/share/GNUstep/DictionaryReader.app/jargon.dict
