# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils games DESCRIPTION="Alien Arena 2006 is the ultimate freeware deathmatch game!" HOMEPAGE="http://red.planetarena.org/" #there is several websites with the game. I just provided the one to which direct link was available #I guess it needs to be asked if NOFETCH restriction would need to be added SRC_URI="http://www.forsakenweb.com/gamepage/loaders/games/${P}-x86.run" #http://icculus.org/~ravage/alienarena2006/alienarena-2006-sdl-i386.tar.gz #http://icculus.org/~ravage/alienarena2006/alienarena-2006-sdl-x86_64.tar.gz #binaries for sound problems # (according to the game forums some seem to need it, but I don't ;) ) LICENSE="?" #after like a hour in their web site I just can't find what licence are they using SLOT="0" KEYWORDS="-* ~x86 ~amd64" IUSE="dedicated opengl amd64" RESTRICT="mirror nostrip" DEPEND="sys-libs/glibc" RDEPEND="dedicated? ( app-misc/screen ) !dedicated? ( virtual/opengl ) opengl? ( virtual/opengl ) amd64? ( >=app-emulation/emul-linux-x86-xlibs-1.0-r1 )" S="${WORKDIR}" dir="${GAMES_PREFIX_OPT}/${PN}" Ddir="${D}/${dir}" pkg_setup() { games_pkg_setup } src_unpack() { cd ${S} unpack_makeself ${P}-x86.run } src_install() { # unpack alienarena-2006-src.tar.gz # could not get it to compile on my ~x86 machine.... cd ${S} exeinto ${dir} doexe bin/Linux/x86/glibc-2.1/AlienArena || die "doexe failed" tar -xf alienarena-2006-data.tar.bz2 || die "untar failed" rm alienarena-2006-data.tar.bz2 insinto ${dir} doins -r arena botinfo data1 || die "doins failed" insinto ${dir} if use amd64 ; then doins -r engine/x86_64 else doins -r engine/x86 fi dodoc README.txt || die "doins failed" doicon alienarena.xpm games_make_wrapper Alienarena ./Alienarena "${dir}" "${dir}" if use dedicated ; then exeinto ${dir} doexe bin/Linux/x86/glibc-2.1/AlienArenaDedicated || die "doexe failed" games_make_wrapper Alienarena-ded ./Alienarena-ded ${dir} newinitd ${S}/Alienarena-ded.rc Alienarena-ded || die "newinitd failed" dosed "s:GAMES_USER_DED:${GAMES_USER_DED}:" /etc/init.d/Alienarena dosed "s:GENTOO_DIR:${GAMES_BINDIR}:" /etc/init.d/Alienarena newconfd ${S}/Alienarena-ded.conf.d Alienarena-ded || die "newconfd failed" fi prepgamesdirs make_desktop_entry alienarena "Alien Arena 2006" alienarena.xpm chmod g+rx "${Ddir}" chmod g+x "${Ddir}/arena/*.so" "${Ddir}/data1/*.so" } pkg_postinst() { games_pkg_postinst einfo "To play the game run:" einfo " Alienarena" if use dedicated; then echo einfo "To start a dedicated server run:" einfo " /etc/init.d/Alienarena-ded start" echo einfo "To run the dedicated server at boot, type:" einfo " rc-update add Alienarena-ded default" echo einfo "The dedicated server is started under the ${GAMES_USER_DED} user account" fi # not nedded? if use amd64; then echo einfo "If you are running an amd64 system and using ALSA, you must have" einfo "ALSA 32-bit emulation enabled in your kernel for this to function properly." fi }