#!/usr/bin/make -f
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Disable wxWidgets assertions
export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DWANT_USE_XercesC:BOOL=ON \
    -DCMAKE_BUILD_TYPE=Release ..

override_dh_installchangelogs:
	dh_installchangelogs docs/CHANGELOG.txt

override_dh_install:
	dh_install
	# Remove empty directory
	$(RM) -r debian/glest/usr/share/games/glest/data
	echo \
		"CountryTexturePath=/usr/share/flags/countries/16x11/" >> \
		debian/glest/usr/share/games/glest/glest.ini

get-orig-source:
	uscan --verbose --download-current-version --force-download
