# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Quake 4 CTF Mod" HOMEPAGE="http://www.deltactf.com" SRC_URI="http://turkeyfiles.escapedturkey.net/quake4/deltactf/deltactf_beta4.zip http://acmectf.com/downloads/Quake4/Mods/deltactf_beta4.zip http://playquakewith.us/deltactf/deltactf_beta4.zip http://team-infinity.ath.cx/slim/deltactf_beta4.zip http://team-infinity.ath.cx/slim/deltactf.xpm.tar.gz" LICENSE="" SLOT="0" KEYWORDS="x86, amd64" IUSE="dedicated" DEPEND="app-arch/unzip games-fps/quake4-bin" RDEPEND="sys-libs/glibc dedicated? ( app-misc/screen ) amd64? ( app-emulation/emul-linux-x86-baselibs )" S=${WORKDIR} dir=/opt/quake4/deltactf Pdir=/opt/quake4 src_unpack() { unpack deltactf_beta4.zip unpack deltactf.xpm.tar.gz } src_install() { dodir ${dir} insinto "${dir}" doins -r ${S}/deltactf/*.pk4 ${S}/deltactf/*.cfg ${S}/deltactf/*.dll ${S}/deltactf.xpm || die "copying data failed" games_make_wrapper ${PN} "/opt/quake4/quake4.x86 +set fs_game deltactf" "${Pdir}" "${Pdir}" make_desktop_entry ${PN} "Quake 4 DeltaCTF" /opt/quake4/deltactf/deltactf.xpm if use dedicated then games_make_wrapper q4dctf-ded "./q4ded.x86 +set fs_game deltactf" "${Pdir}" "${Pdir}" newinitd "${FILESDIR}"/q4dctf-ded.rc q4dctf-ded newconfd "${FILESDIR}"/q4dctf-ded.conf.d q4dctf-ded fi prepgamesdirs } pkg_postinst() { games_pkg_postinst if use dedicated; then echo einfo "To start a dedicated server, run" einfo " /etc/init.d/q4dctf-ded start" einfo "A custom config can be set up in" einfo " /etc/conf.d/q4dctf-ded" echo einfo "The dedicated server is started under the ${GAMES_USER_DED} user account." fi }