# SliTaz package receipt.

PACKAGE="freeciv"
VERSION="2.2.5"
CATEGORY="games"
SHORT_DESC="Empire-building strategy game."
MAINTAINER="pascal.bellard@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://freeciv.wikia.com/wiki/Main_Page"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
DEPENDS="zlib ncurses readline gtk+ gettext xorg-libXdamage libsdl-mixer bzip2"
BUILD_DEPENDS="zlib-dev ncurses-dev readline-dev gtk+-dev gettext libsdl-mixer-dev glibc-locale bzip2-dev expat-dev"
TAGS="strategy"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	sed -i 's/--best/-9/' Makefile* data/scenario/Makefile*
	./configure --enable-client=gtk --enable-shared \
		$CONFIGURE_ARGS &&
	make -j1 &&
	make -j1 install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share $fs/usr/lib
	cp -a $install/usr/bin $fs/usr
	cp -a $install/usr/lib/*.so* $fs/usr/lib
	cp -a $install/usr/share/freeciv $fs/usr/share
	# Add icons for desktop files
	cp -a $install/usr/share/icons/hicolor/32x32/apps $fs/usr/share/pixmaps
}