# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit games DESCRIPTION="Return to Castle Worlfenstein - Enemy Territory" SRC_URI="et-linux-${PV}.x86.run" HOMEPAGE="http://www.idsoftware.com/" LICENSE="RTCW" SLOT="0" KEYWORDS="x86 -ppc -sparc" IUSE="X opengl" RDEPEND="virtual/glibc opengl? ( virtual/opengl ) app-misc/screen X? ( x11-base/xfree )" S=${WORKDIR} RESTRICT="nostrip" DEBUG="yes" src_unpack() { if [ ! -f ${DISTDIR}/et-linux-${PV}.x86.run ] ; then die "Please download et-linux-${PV}.x86.run from ${HOMEPAGE}" fi dd if=${DISTDIR}/et-linux-${PV}.x86.run ibs=7676 skip=1 obs=1024 conv=sync | gzip -cd | tar xf - } src_install() { dodir /opt/enemy-territory/ insinto /opt/enemy-territory/main/video doins etmain/video/* insinto /opt/enemy-territory/etmain/ doins etmain/* mv Docs ${D}/opt/enemy-territory/ mv pb ${D}/opt/enemy-territory/ exeinto /opt/enemy-territory/ insinto /opt/enemy-territory/ doexe bin/Linux/x86/{et.x86,etded.x86} ${FILESDIR}/startetded doins ET.xpm openurl.sh CHANGES dogamesbin ${FILESDIR}/et exeinto /etc/init.d newexe ${FILESDIR}/etded.rc etded prepgamesdirs /opt/enemy-territory/ } pkg_postinst() { id &>/dev/null et || useradd -g games -d /opt/enemy-territory -c "Enemy Territory dedicated server user" -s /bin/bash et einfo "To start a dedicated server, run" einfo "\t/etc/init.d/etded start" echo einfo "The dedicated server is started under the et user account." games_pkg_postinst }