# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild,v 1.1 2003/09/09 18:10:14 vapier Exp $ # Game is available for ppc too! # This ebuild may need additional use flags for all these: # [x] Base Install Required (+4 MB) # [x] Scenatios (+7 MB) # [x] Sounds and Graphics (+118 MB) # [x] Music (+65 MB) # [x] Videos (+147 MB) # -------------------- # Total 341 MB inherit games IUSE="" DESCRIPTION="Heroes of Might and Magic III : The Restoration of Erathia" HOMEPAGE="http://www.lokigames.com/products/heroes3/" KEYWORDS="x86 ppc" # ARCH is needed, but i don't know how to get it #if [ ${ARCH} = "x86" ] ; then SRC_URI="ftp://ftp.planetmirror.com/pub/lokigames/updates/heroes3/heroes3-${PV}a-cdrom-x86.run ftp://snuffleupagus.animearchive.org/loki/updates/heroes3/heroes3-${PV}a-cdrom-x86.run" #else # SRC_URI="ftp://ftp.planetmirror.com/pub/lokigames/updates/heroes3/heroes3-${PV}a-ppc.run # ftp://snuffleupagus.animearchive.org/loki/updates/heroes3/heroes3-${PV}a-ppc.run" #fi LICENSE="LOKI-EULA" SLOT="0" RESTRICT="nostrip" DEPEND="virtual/glibc" RDEPEND="${DEPEND} virtual/opengl" S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { ewarn "The full installation takes about 341 MB of space!" games_pkg_setup } src_unpack() { unpack_makeself } src_install() { dodir ${dir} games_get_cd icon.xpm games_verify_cd "Heroes of Might and Magic III" einfo "Copying files... this may take a while..." exeinto /opt/heroes3 doexe ${GAMES_CD}/bin/x86/heroes3 insinto /opt/heroes3 cp ${GAMES_CD}/{README,Heroes_III_Tutorial.pdf} ${Ddir} || die cp ${GAMES_CD}/icon.xpm ${S}/heroes3.xpm # Fetching files from CD to ${Ddir} is not working # Needs investigation # Sounds and graphics # ${GAMES_CD}/data # dodir ${Ddir}/data # einfo ${Ddir}/data # cd ${Ddir}/data # cp ${GAMES_CD}/data/*.lod ${Ddir}/data || die # cp -r ${GAMES_CD}/data/*.snd ./ || die # cp -r ${GAMES_CD}/data/*.dat ./ || die # Music # ${GAMES_CD}/mp3 # dodir ${Ddir}/mp3 # cd ${Ddir}/mp3 # cp -r ${GAMES_CD}/mp3/*.mp3 ${Ddir}/mp3 || die # cp -r ${GAMES_CD}/mp3/* ${Ddir}/mp3 || die # # Scenarios # ${GAMES_CD}/data/ # dodir ${Ddir}/maps # cd ${Ddir}/maps # cp -r ${GAMES_CD}/maps/*.h3m ${Ddir}/maps || die # cp -r ${GAMES_CD}/maps/* ${Ddir}/maps || die # Videos # ${GAMES_CD}/data/video # Patch game # Not working, gives an error message # cd ${S} # bin/Linux/x86/loki_patch --verify patch.dat # bin/Linux/x86/loki_patch patch.dat ${Ddir} >& /dev/null || die "patching" # now, since these files are coming off a cd, the times/sizes/md5sums wont # be different ... that means portage will try to unmerge some files (!) # we run touch on ${D} so as to make sure portage doesnt do any such thing find ${Ddir} -exec touch '{}' \; dodir ${GAMES_BINDIR} dogamesbin ${FILESDIR}/heroes3 dosed "s:GENTOO_DIR:${dir}:" ${GAMES_BINDIR}/heroes3 insinto /usr/share/pixmaps doins ${S}/heroes3.xpm prepgamesdirs make_desktop_entry heroes3 "Heroes of Might and Magic III" "heroes3.xpm" } pkg_postinst() { einfo "To play the game run:" einfo " heroes3" games_pkg_postinst }