# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils versionator games # MY_PV will be e.g. "beta1" MY_PV=$(get_version_component_range 2-2) SZ="ftp://ftp.planetmirror.com/pub/seriouszone" SH_FILE="${PN}-${MY_PV}.sh.bin" DESCRIPTION="Serious Sam: The Second Encounter" HOMEPAGE="http://www.croteam.com/ http://www.seriouszone.com/" SRC_URI="${SZ}/${SH_FILE} http://icculus.org/betas/ssam/${SH_FILE} maps? ( ${SZ}/ssse/maps/militarydecay.zip ${SZ}/ssse/maps/alpineii.zip ${SZ}/ssse/maps/otmosis.zip ) models? ( ${SZ}/ssse/models/SeriousSamantha.zip ${SZ}/ssse/models/ronaldmcdonald.zip ${SZ}/ssse/models/smoothsam.zip ${SZ}/ssse/models/sleepysam.zip ${SZ}/ssse/models/adventurousash.zip )" LICENSE="LOKI-EULA" SLOT="0" KEYWORDS="~x86" RESTRICT="mirror strip" IUSE="maps models" RDEPEND="virtual/opengl media-libs/libsdl" DEPEND="maps? ( app-arch/unzip ) models? ( app-arch/unzip )" # unshield is not used. # >=app-arch/unshield-0.5 S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${PN} pkg_setup() { cdrom_get_cds "Install/SE1_00.gro" games_pkg_setup } src_unpack() { mkdir Mods unpack_makeself "${SH_FILE}" unpack ./setupstuff.tar.gz || die unpack ./bins.tar.bz2 || die local f if use maps ; then for f in otmosis alpineii militarydecay ; do unpack "${f}.zip" done fi if use models ; then for f in adventurousash sleepysam smoothsam ronaldmcdonald SeriousSamantha ; do unpack "${f}.zip" done fi } src_install() { insinto "${dir}" einfo "Copying from ${CDROM_ROOT}" doins -r "${CDROM_ROOT}"/Install/* || die "doins CD failed" # Data CABs local n for n in 1 2 ; do f=${D}/${dir}/data${n}.cab # unshield-0.5 fails part-way through the extract. # Hopefully a new version in the future will work. # The CABs contain optional multiplayer maps in the "Levels" directory. einfo "Ignoring data${n}.cab - unshield cannot extract it" #unshield x "${f}" || die "unshield ${f} failed" #rm "${f}" done exeinto "${dir}" doexe bin/${PN} || die exeinto "${dir}"/Bin doexe Bin/ssam_lnx* || die rm Bin/ssam_lnx* doins -r Bin Data Levels Mods *.txt README* \ || die "doins main failed" if use maps ; then doins *.{doc,gro} || die fi if use models ; then doins -r *.gro Models || die fi newicon ssam.xpm ${PN}.xpm || die games_make_wrapper ${PN} ./${PN} "${dir}" "${dir}" || die make_desktop_entry ${PN} "Serious Sam - Second Encounter" ${PN}.xpm || die # Ensure that file datestamps from the CD are sane find "${D}/${dir}" -exec touch '{}' \; prepgamesdirs } pkg_postinst() { einfo "You may wish to read the comments about the linux port" einfo "found online at:" einfo " http://files.seriouszone.com/download.php?fileid=616" echo games_pkg_postinst }