# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Team-based aliens vs humans FPS with buildable structures" HOMEPAGE="http://tremulous.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.zip http://0day.icculus.org/mirrors/${PN}/${P}.zip ftp://ftp.wireplay.co.uk/pub/quake3arena/mods/${PN}/${P}.zip" LICENSE="GPL-2 CCPL-Attribution-ShareAlike-2.5" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dedicated sdl" UIDEPEND="media-libs/alsa-lib media-libs/libsdl || ( ( x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext ) virtual/x11 )" # Both client and server are built - there's no choice RDEPEND="${UIDEPEND}" DEPEND="${RDEPEND} app-arch/unzip" home=${WORKDIR}/${PN} S=${home}/${P}-src dir=${GAMES_DATADIR}/${PN} src_unpack() { unpack ${P}.zip cd "${home}" unpack "./${P}-src.tar.gz" } src_compile() { # Only compile for x86, otherwise use pre-compiled x86 binaries. # The x86_64 JIT compiler has poor performance. if use x86 ; then emake \ COPYDIR="${dir}" \ || die "emake main failed" fi } src_install() { insinto "${dir}" doins -r "${home}"/{base,*.pdf} || die "doins -r failed" # The executables must be in the same tree as the game data exeinto "${dir}" if use sdl || ! use dedicated ; then # Install client if use x86 ; then newexe "build/release-linux-${ARCH}/${PN}.${ARCH}" ${PN}.bin \ || die "newexe x86 client failed" else newexe "${home}/${PN}.x86" ${PN}.bin \ || die "newexe non-x86 client failed" fi doicon "${home}/${PN}.xpm" games_make_wrapper ${PN} ./${PN}.bin "${dir}" make_desktop_entry ${PN} "Tremulous" ${PN}.xpm fi if use dedicated ; then # Install server if use x86 ; then newexe "build/release-linux-${ARCH}/tremded.${ARCH}" \ ${PN}-ded.bin \ || die "newexe x86 ded failed" else newexe "${home}/tremded.x86" ${PN}.bin \ || die "newexe non-x86 ded failed" fi games_make_wrapper ${PN}-ded ./${PN}-ded.bin "${dir}" fi dodoc "${home}"/ChangeLog prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "Read http://tremulous.net/manual/" echo }