#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

DEB_CONFIGURE_EXTRA_FLAGS :=	--bindir=/usr/games --datadir=/usr/share/games --with-sound-dir=/usr/share/games/crossfire/sounds

clean::
	find . -name Makefile.in -exec rm '{}' ';'
	rm -f utils/config.* utils/depcomp utils/install-sh utils/missing
	rm -f aclocal.m4 configure common/config.h.in
	rm -f macros/pkg.m4 sound-src/soundsdef.h

post-patches:: configure

configure:
	autoreconf --install

binary-install/crossfire-client::
	install -pm 0644 gtk-v2/README debian/crossfire-client/usr/share/doc/crossfire-client/README.gtk-v2
	install -pm 0644 gtk-v2/README-dev debian/crossfire-client/usr/share/doc/crossfire-client/README-dev.gtk-v2
	install -pm 0644 gtk-v2/TODO debian/crossfire-client/usr/share/doc/crossfire-client/TODO.gtk-v2
