#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk

DEB_OPT_FLAG:=-O2
#DEB_SOURCE_PACKAGE:=maelstrom
DEB_TAR_SRCDIR:=Maelstrom-3.0.6.5
DEB_CONFIGURE_EXTRA_FLAGS:=--enable-maemo
#DEB_AUTO_UPDATE_AUTOCONF=2.59
#DEB_AUTO_UPDATE_AUTOMAKE=1.8

include /usr/share/cdbs/1/rules/tarball.mk

install/maelstrom::
	echo "*** Fixing up things for maemo"
	strip debian/maelstrom/usr/bin/Maelstrom
	mv debian/maelstrom/usr/bin/Maelstrom debian/maelstrom/usr/games/Maelstrom/
	install -m 755 Maelstrom.sh debian/maelstrom/usr/bin/Maelstrom
	chmod a-x debian/maelstrom/usr/games/Maelstrom/*_*
	chmod a-x debian/maelstrom/usr/games/Maelstrom/Images/*.*
	chmod 666 debian/maelstrom/usr/games/Maelstrom/Maelstrom-Scores

