inherit games DESCRIPTION="FuhQuake is a (the most) popular net Quake1 client." HOMEPAGE="http://www.fuhquake.net/" SRC_URI="http://www.fuhquake.net/files/releases/v${PV}/fuhquake-linux-v${PV}.zip http://www.fuhquake.net/files/releases/v${PV}/fuhquake-security-v${PV}.zip" IUSE="opengl svga X" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="" RDEPEND="virtual/x11 svga? ( media-libs/svgalib ) opengl? ( virtual/opengl )" INSTALLDIR=${GAMES_PREFIX_OPT}/FuhQuake src_install() { dodir ${INSTALLDIR} dodir ${INSTALLDIR}/skel dodir ${INSTALLDIR}/skel/fuhquake keepdir ${INSTALLDIR}/skel/fuhquake insinto ${INSTALLDIR}/skel/qw doins ${WORKDIR}/qw/* insinto ${INSTALLDIR}/skel doins ${WORKDIR}/fuhquake-security.so mv ${WORKDIR}/README.TXT ${WORKDIR}/security_module.txt dodoc ${WORKDIR}/fuhquake/doc/* ${WORKDIR}/fuhquake.txt ${WORKDIR}/security_module.txt insinto ${INSTALLDIR} if use !opengl && use !svga && use !X ; then ewarn "How do you expect to display this game?" ewarn "Installing the x11 version..." doins ${WORKDIR}/fuhquake.x11 games_make_wrapper fuhquake.x11 ${INSTALLDIR}/fuhquake.x11 . sed -i -e '2c\cd ~/.fuhquake' ${D}/usr/games/bin/fuhquake.x11 fi if use opengl ; then doins ${WORKDIR}/fuhquake-gl.glx games_make_wrapper fuhquake-gl.glx ${INSTALLDIR}/fuhquake-gl.glx . sed -i -e '2c\cd ~/.fuhquake' ${D}/usr/games/bin/fuhquake-gl.glx fi if use svga ; then doins ${WORKDIR}/fuhquake.svga games_make_wrapper fuhquake.svga ${INSTALLDIR}/fuhquake.svga . sed -i -e '2c\cd ~/.fuhquake' ${D}/usr/games/bin/fuhquake.svga fi if use X ; then doins ${WORKDIR}/fuhquake.x11 games_make_wrapper fuhquake.x11 ${INSTALLDIR}/fuhquake.x11 . sed -i -e '2c\cd ~/.fuhquake' ${D}/usr/games/bin/fuhquake.x11 fi ### Perhaps not being able to cd to the home dir is a security feature, ### but I haven't found a way to make it easier for the user... prepgamesdirs } pkg_postinst() { games_pkg_postinst ### I'm not sure what doexe and dogamesbin does, but it seems to ### modify the executables, which does not make the security module ### happy if use !opengl && use !svga && use !X ; then chmod g+x ${INSTALLDIR}/fuhquake.x11 fi if use opengl ; then chmod g+x ${INSTALLDIR}/fuhquake-gl.glx fi if use X ; then chmod g+x ${INSTALLDIR}/fuhquake.x11 fi if use svga ; then chmod g+x ${INSTALLDIR}/fuhquake.svga fi einfo "Ok, some user interaction is going to be required... sorry" einfo "You're going to need to:" #/opt/FuhQuake is a skel dir for users to copy #so, everything in FuhQuake should be generic #then, copy /opt/FuhQuake to ~/.fuhquake #despues ln -s /usr/share/games/quake-data/id1/* ~/.fuhquake/fuhquake #luego, fuhquake-gl.glx einfo "1. cp -RP /opt/FuhQuake/skel ~/.fuhquake" einfo "2. ln -s ${GAMES_DATADIR}/quake-data/id1/* ~/.fuhquake/fuhquake" einfo "3. start up fuhquake and frag!" ewarn "**This example assumes that a valid pak0.pak file is in:" ewarn "** ${GAMES_DATADIR}/quake-data/id1" }