# SliTaz package receipt.

PACKAGE="gnome-games"
VERSION="2.32.1"
CATEGORY="games"
SHORT_DESC="A set of of simple games from Gnome."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnome.org/"
WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION%.*}/$TARBALL"

# Games: aisleriot need guile. glchess use pygtk/mesa and is splitted
DEPENDS="GConf librsvg libcroco mesa clutter clutter-gtk libcanberra \
libvorbis libogg util-linux-ng-uuid gnuchess gnome-games-icons seed"
BUILD_DEPENDS="GConf-dev librsvg-dev libcroco-dev mesa-dev clutter-dev \
clutter-gtk-dev python-dev pygtk-dev libcanberra-dev gnome-doc-utils-dev \
libvorbis-dev libogg-dev util-linux-ng-uuid-dev seed-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./configure \
		--bindir=/usr/games \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-omitgames=aisleriot \
		--disable-scrollkeeper \
		$CONFIGURE_ARGS &&
	make && make install &&
	rm $DESTDIR/usr/share/*/glchess.desktop &&
	rm $DESTDIR/usr/share/*/gnome-sudoku.desktop
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib $fs/usr/share
	
	cp -a $install/usr/games $fs/usr
	cp -a $install/usr/share/$PACKAGE $fs/usr/share

	# Remove splitted games files
	rm -f $fs/usr/games/glchess
	rm -f $fs/usr/games/gnome-sudoku
	
	cp -a $install/var $fs
	chmod a+w $fs/var/games/*
}