# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Widelands is an open source (GPLed) game (work in progress) using SDL. It is in many ways similar to Settlers II by Bluebyte" HOMEPAGE="http://widelands.sourceforge.net/tiki/tiki-index.php" SRC_URI="http://belnet.dl.sourceforge.net/sourceforge/${PN}/${PN}-b9-source.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="" DEPEND="media-libs/sdl-net media-libs/sdl-image media-libs/sdl-ttf" S=${WORKDIR}/${PN} MY_D=${GAMES_DATADIR}/${PN} src_unpack() { unpack ${A} || die "Unpacking the source failed" cd ${S} || die "Could not change directory." } src_compile() { emake || die "emake failed" } src_install() { dodir ${MY_D} cp -R campaigns ${D}${MY_D} && \ cp -R fonts ${D}${MY_D} && \ cp -R game_server ${D}${MY_D} && \ cp -R maps ${D}${MY_D} && \ cp -R pics ${D}${MY_D} && \ cp -R tribes ${D}${MY_D} && \ cp -R worlds ${D}${MY_D} || die "copy to image failed" #missing: set correct rights and ownership chown root:games ${PN} chmod ug +x ${PN} cp ${PN} ${D}${MY_D} || die "copy of bin failed" dodoc README* AUTHORS ChangeLog COPYING #create wrapper mv ${PN} ${PN}.bin echo "#!/bin/bash" > ${PN} echo "# starter-script for ${PN}" >> ${PN} echo "" >> ${PN} echo "directory=\$(pwd)" >> ${PN} echo "cd "${MY_D} >> ${PN} echo "./"${PN} >> ${PN} echo "cd \${directory}" >> ${PN} echo "exit 0" >> ${PN} chown root:games ${PN} chmod ug +x ${PN} dogamesbin ${PN} }