# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="The Freespace 2 Source Code Project" HOMEPAGE="http://scp.indiegames.us/" SRC_URI="http://icculus.org/~taylor/fso/releases/${P}.tar.bz2" ZPACK_URI="http://scp.indiegames.us/request.php?148" # See COPYING file LICENSE="Freespace2" SLOT="0" KEYWORDS="~x86" # zpack is a large (172mb) collection of graphics enhancements: # http://scp.indiegames.us/download.php?view.148 IUSE="zpack" RESTRICT="nomirror" RDEPEND="virtual/x11 media-libs/libsdl media-libs/openal virtual/opengl" DEPEND="${RDEPEND} zpack? ( app-arch/unzip )" GAMEDIR="${GAMES_DATADIR}"/freespace2 src_install() { newgamesbin code/fs2_open_r fs2_open.bin games_make_wrapper fs2_open fs2_open.bin "${GAMEDIR}" if use zpack; then # It's naughty to download here, so what's a better way? einfo "Downloading graphics pack" wget -O mv_zpack.zip ${ZPACK_URI} \ || die "wget failed" unzip mv_zpack.zip \ || die "unzip failed" insinto "${GAMEDIR}" doins mv_*.vp fi dodoc README AUTHORS ChangeLog NEWS prepgamesdirs } pkg_postinst() { einfo "Copy the data files from a Freespace 2 Windows full installation" einfo "into ${GAMEDIR} (can be installed using wine)." einfo "" einfo " Example: cp -r /mnt/winc/Games/FreeSpace2/* ${GAMEDIR}" echo "" einfo "You can change resolution from (640x480)x16 to (1024x768)x32 if you edit" einfo "~/.fs2open/fs2_open.ini (created on the first run). The command is:" einfo "" einfo " sed -i \"s:(640x480)x16:(1024x768)x32:\" ~/.fs2_open/fs2_open.ini" games_pkg_postinst }