#!/usr/bin/make -f

BUILD_DATE := $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')

%:
	dh $@

override_dh_clean:
	rm -f Makefile oshw-sdl/Makefile oshw
	dh_clean

override_dh_auto_configure:
	dh_auto_configure -- --bindir=/usr/games --with-sharedir=/usr/share/games/tworld

override_dh_auto_build:
	echo \#define COMPILE_TIME \"$(BUILD_DATE)\" > comptime.h
	dh_auto_build

override_dh_auto_install:
	mkdir -p debian/tworld-data/usr/share/man/man6
	pod2man -s 6 -r 'Tile World' -c '' debian/c4 \
		debian/tworld-data/usr/share/man/man6/c4.6
	dh_auto_install
