#!/usr/bin/make -f

#export DH_VERBOSE=1

%:
	dh --parallel --with autotools_dev --with autoreconf $@

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	# Remove GLee embedded code copy so we never use it
	rm -f lib/ivis_opengl/GLee.c lib/ivis_opengl/GLee.h
	# Remove miniupnpc embedded code copy so we never use it
	rm -rf lib/netplay/miniupnpc
	dh_auto_configure -- \
	    --bindir=\$${prefix}/games \
	    --datadir=\$${prefix}/share/games \
	    --with-icondir=\$${prefix}/share/icons/hicolor/128x128/apps \
	    --with-applicationdir=\$${prefix}/share/applications \
	    --with-distributor="$(shell dpkg-vendor --query vendor)" \
	    --disable-debug

override_dh_strip:
	dh_strip --dbg-package=warzone2100-dbg
