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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# location of datafiles
DATADIR=/usr/share/games/trigger-rally
# what manpages to build?
MANPAGES=debian/trigger-rally.6

%:
	dh $@ --with autotools-dev

# rule to build manpages
$(MANPAGES): $(addsuffix .sgml,$(MANPAGES))
	docbook-to-man $< > $@

override_dh_auto_configure:
	./autogen.sh
	dh_auto_configure -- --datadir=$(DATADIR)

override_dh_auto_build:
	jam

override_dh_installman: $(MANPAGES)
	dh_installman $(MANPAGES)

override_dh_auto_clean:
	if [ -f Jamconfig ]; then jam distclean; fi
	$(RM) $(MANPAGES)
	$(RM) Jamconfig.in
	$(RM) configure
	dh_auto_clean


