# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Warzone 2100, the 3D real-time strategy game." HOMEPAGE="http://www.realtimestrategies.net/forums/index.php" SRC_URI="http://download.berlios.de/warzone/${PN}-src-${PV}.tar.bz2 http://download.berlios.de/warzone/${PN}-data-${PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=sys-apps/gawk-3.1.3 >=media-libs/libsdl-1.2.8 >=media-libs/sdl-net-1.2.5 >=media-libs/openal-20040817" src_compile() { # A makefile is provided in the tarball in case the autotools don't # work. We use them though, so we need to run autogen.sh. cd ${WORKDIR} ./autogen.sh egamesconf emake || die "emake failed" } src_install() { # Can't install itself automatically yet. So we've got to do # it manually. mkdir -p ${D}/${GAMES_DATADIR} cp -Rf ${WORKDIR}/data ${D}/${GAMES_DATADIR}/warzone2100 cp ${WORKDIR}/src/warzone ${D}/${GAMES_DATADIR}/warzone2100 gamesperms -R ${D}/${GAMES_DATADIR}/warzone2100 gamesowners -R ${D}/${GAMES_DATADIR}/warzone2100 # The executable can only work when started from inside the # main warzone directory. Wrapper script needed. mkdir -p ${D}/${GAMES_BINDIR} echo '#!/bin/bash' > ${D}/${GAMES_BINDIR}/warzone2100 echo cd ${GAMES_DATADIR}/warzone2100 >> ${D}/${GAMES_BINDIR}/warzone2100 echo './warzone' >> ${D}/${GAMES_BINDIR}/warzone2100 gamesperms ${D}/${GAMES_BINDIR}/warzone2100 chmod ug+x ${D}/${GAMES_BINDIR}/warzone2100 gamesowners ${D}/${GAMES_BINDIR}/warzone2100 } pkg_postinst() { games_pkg_postinst einfo "To start the game, run :" einfo " warzone2100" einfo "You can then modify ~/.warzone2100/config to your liking." echo einfo "Please, post bugs at :" einfo " http://developer.berlios.de/bugs/?group_id=2909" einfo "Your reward will be a better Warzone 2100." echo }