# SliTaz package receipt.

PACKAGE="puzzles"
VERSION="r8972"
CATEGORY="games"
SHORT_DESC="Misc puzzles games."
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE.tar.gz"
WEB_SITE="http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
WGET_URL="${WEB_SITE}$TARBALL"
DEPENDS="gtk+ cairo libxcb xorg-libXrandr"
BUILD_DEPENDS="gtk+-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	sed -i 's/-pedantic//' Makefile mkfiles.pl
	mkdir -p _pkg/usr/local/games 2> /dev/null
	make &&
	make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/pixmaps \
		$fs/usr/share/applications
		
	cp -a $_pkg/usr/local/games $fs/usr
	
	for img in $(ls $src/icons/*16d24*)
	do
		cp $img $fs/usr/share/pixmaps/$(basename $img -16d24.png).png
	done
	
	cp -a stuff/*.desktop $fs/usr/share/applications
}