#!/usr/bin/make -f
#export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_build:
	$(MAKE) CFLAGS_DEBUG="$(CFLAGS)" \
		DP_FS_BASEDIR=/usr/share/games/nexuiz \
		sdl-debug sv-debug

override_dh_auto_clean:
	rm -rf debian/tmp
	$(MAKE) clean

override_dh_auto_install:
	mkdir -p debian/tmp
	cp darkplaces-sdl debian/tmp/nexuiz
	cp darkplaces-dedicated debian/tmp/nexuiz-server
	convert nexuiz.xpm debian/tmp/nexuiz48x48.png
	convert -scale 32x32 nexuiz.xpm debian/tmp/nexuiz.xpm

override_dh_strip:
	dh_strip -pnexuiz --dbg-package=nexuiz-dbg
	dh_strip -pnexuiz-server --dbg-package=nexuiz-server-dbg

override_dh_icons:
	dh_icons -pnexuiz
