ChangeLog

# ChangeLog for games-fps/quake2-demodata
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-demodata/ChangeLog,v 1.3 2007/03/12 14:51:22 genone Exp $

12 Mar 2007; Marius Mauch quake2-demodata-3.14.ebuild:
Replacing einfo with elog

27 Jun 2006; Chris Gianelloni
quake2-demodata-3.14.ebuild:
Added a few more architectures for testing. This is data-only, so should be
safe on all of them.

*quake2-demodata-3.14 (27 Jun 2006)

27 Jun 2006; Chris Gianelloni +metadata.xml,
+quake2-demodata-3.14.ebuild:
Initial import. Ebuild by Paul Bredbury . Closing bug
#137519.

Manifest

DIST q2-314-demo-x86.exe 39015499 RMD160 5a4237cb4288882a713d79abea07d91f10a3d0ac SHA1 5b4dedc59ceee306956a3e48a8bdf6dd33bc91ed SHA256 7ace5a43983f10d6bdc9d9b6e17a1032ba6223118d389bd170df89b945a04a1e
EBUILD quake2-demodata-3.14.ebuild 2043 RMD160 75acdae0cae5655ce636055bc7255d208b1944c3 SHA1 484e9c786631f8e85eb497ae5a65476228e29454 SHA256 f808daf76e7622f0daa40f764634dfb63022ff5aaba8d6d889394329803f92fc
MISC ChangeLog 738 RMD160 4cd9174dae5845e00580940808327275261e156c SHA1 0aaa1167a53d6bd177924c5afa1332e19c5a509f SHA256 faa53d8de5048c655123362d0957a8d453d487999522ab7892a509aafb341ccf
MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3

metadata.xml




games

quake2-demodata-3.14.ebuild

# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-demodata/quake2-demodata-3.14.ebuild,v 1.3 2007/03/12 14:51:22 genone Exp $

inherit eutils versionator games

MY_PV=$(delete_all_version_separators)
MY_PN="quake2"
FILE="q2-${MY_PV}-demo-x86.exe"

DESCRIPTION="Demo data for Quake 2"
HOMEPAGE="http://en.wikipedia.org/wiki/Quake_II"
SRC_URI="mirror://idsoftware/${MY_PN}/${FILE}"

# See license.txt - it's a bit different to Q2EULA in Portage
LICENSE="quake2-demodata"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
IUSE="symlink"

RDEPEND=""
DEPEND="app-arch/unzip"

S=${WORKDIR}
dir=${GAMES_DATADIR}/${MY_PN}

pkg_setup() {
games_pkg_setup

local alert_user

if ! use symlink ; then
ewarn "The 'symlink' USE flag is needed for Quake 2 clients"
ewarn "to easily play the demo data."
echo
alert_user=y
fi

if has_version "games-fps/quake2-data" ; then
ewarn "games-fps/quake2-data already includes the demo data,"
ewarn "so this installation is not very useful."
echo
if use symlink ; then
eerror "The symlink for the demo data conflicts with the cdinstall data"
die "Remove the 'symlink' USE flag for this package"
fi
alert_user=y
fi

if [[ -n "${alert_user}" ]] ; then
ebeep
epause
fi
}

src_unpack() {
unzip -qo "${DISTDIR}/${FILE}" || die "unzip failed"
}

src_install() {
insinto "${dir}"/demo
doins -r Install/Data/baseq2/{pak0.pak,players} || die "doins pak players failed"

dodoc Install/Data/DOCS/*.txt

if use symlink ; then
# Make the demo the default, so that people can just run it,
# without having to mess with command-line options.
cd "${D}/${dir}" && ln -sfn demo baseq2
fi

prepgamesdirs
}

pkg_postinst() {
games_pkg_postinst

elog "This is just the demo data. To play, install a client"
elog "such as games-fps/qudos"
echo

if use symlink ; then
elog "baseq2 has been symlinked to demo, for convenience, within:"
elog "${dir}"
echo
fi
}