#!/usr/bin/make -f
# -*- makefile -*-

CCFLAGS=-DSTRATAGUS_LIB_PATH=\\\"/usr/share/games/boswars\\\"

%:
	dh $@

override_dh_auto_build:
	scons CCFLAGS=$(CCFLAGS)

override_dh_auto_install:

override_dh_install:
	# Copy (and rename) an icon to be used as desktop file
	cp units/tank/ico_tank.png debian/boswars.png
	# Default action
	dh_install
	# Remove unneeded files.
	for i in genpot.sh makesame.py updatepo.sh ; do \
		rm -f debian/boswars-data/usr/share/games/boswars/languages/$$i ; \
	done
	rm -f debian/boswars/usr/share/doc/boswars/html/README-SDL.txt
	rm -f debian/boswars/usr/share/doc/boswars/html/*copyright*

clean:
	scons -c
	# Additional icon (see build-indep-stamp)
	rm  -f debian/boswars.png
	# Scons is stupid and leaves them behind no matter what.
	rm  -f .sconsign.dblite
	rm -rf .sconf_temp
	rm  -f build_conf_cache.py build_options.py config.log

