You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.2 KiB
78 lines
2.2 KiB
4 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
|
|
||
|
inherit cdrom unpacker
|
||
13 years ago
|
|
||
|
DESCRIPTION="iD Software's Quake 2 ... the data files"
|
||
4 years ago
|
HOMEPAGE="https://www.idsoftware.com/"
|
||
13 years ago
|
SRC_URI="mirror://idsoftware/quake2/q2-${PV}-x86-full-ctf.exe"
|
||
4 years ago
|
S="${WORKDIR}"
|
||
13 years ago
|
|
||
|
LICENSE="Q2EULA"
|
||
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="~alpha ~amd64 ~x86"
|
||
13 years ago
|
IUSE="videos"
|
||
|
|
||
4 years ago
|
RDEPEND="!games-fps/quake2-demodata[symlink]"
|
||
|
BDEPEND="app-arch/unzip"
|
||
13 years ago
|
|
||
|
src_unpack() {
|
||
|
export CDROM_NAME_SET=("Existing Install" "Ultimate Quake Edition" "Quake2 CD" "Quake4 Bonus DVD")
|
||
|
cdrom_get_cds baseq2:Install/patch:Install:Movies
|
||
|
# The .exe is just a self-extracting .zip
|
||
12 years ago
|
unpack_zip ${A}
|
||
13 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
dodoc DOCS/* 3.20_Changes.txt
|
||
|
newdoc ctf/readme.txt ctf-readme.txt
|
||
4 years ago
|
|
||
13 years ago
|
case ${CDROM_SET} in
|
||
4 years ago
|
0) { docinto html && dodoc -r "${CDROM_ROOT}"/Install/DOCS/quake2_manual/* ; } ;;
|
||
|
1) { docinto html && dodoc -r "${CDROM_ROOT}"/Install/Docs/quake2_manual/* ; } ;;
|
||
|
2) { docinto html && dodoc -r "${CDROM_ROOT}"/Install/DOCS/quake2_manual/* ; } ;;
|
||
13 years ago
|
3) dodoc "${CDROM_ROOT}"/Docs/* ;;
|
||
|
esac
|
||
|
|
||
|
local baseq2_cdpath
|
||
|
case ${CDROM_SET} in
|
||
|
0) baseq2_cdpath=${CDROM_ROOT}/baseq2;;
|
||
|
1) baseq2_cdpath=${CDROM_ROOT}/Install/Data/baseq2;;
|
||
|
2) baseq2_cdpath=${CDROM_ROOT}/Install/Data/baseq2;;
|
||
|
3) baseq2_cdpath=${CDROM_ROOT}/setup/Data/baseq2;;
|
||
|
esac
|
||
|
|
||
4 years ago
|
dodir /usr/share/quake2/baseq2
|
||
13 years ago
|
|
||
|
if use videos ; then
|
||
4 years ago
|
insinto /usr/share/quake2/baseq2/video
|
||
9 years ago
|
doins "${baseq2_cdpath}"/video/*
|
||
13 years ago
|
fi
|
||
|
|
||
4 years ago
|
insinto /usr/share/quake2/baseq2
|
||
9 years ago
|
doins "${baseq2_cdpath}"/pak0.pak
|
||
|
doins baseq2/*.pak baseq2/maps.lst
|
||
4 years ago
|
|
||
|
dodir /usr/share/quake2/baseq2/players
|
||
13 years ago
|
cp -R "${baseq2_cdpath}"/players/* baseq2/players/* \
|
||
4 years ago
|
"${ED}"/usr/share/quake2/baseq2/players/ || die
|
||
13 years ago
|
|
||
|
for mod in ctf rogue xatrix ; do
|
||
|
if [[ -d ${baseq2_cdpath}/../${mod} ]] ; then
|
||
|
if use videos && [[ -d ${baseq2_cdpath}/../${mod}/video ]] ; then
|
||
4 years ago
|
insinto /usr/share/quake2/${mod}/video
|
||
13 years ago
|
doins "${baseq2_cdpath}"/../${mod}/video/* 2>/dev/null
|
||
|
fi
|
||
|
if [[ -n $(ls "${baseq2_cdpath}"/../${mod}/*.pak 2>/dev/null) ]] ; then
|
||
4 years ago
|
insinto /usr/share/quake2/${mod}
|
||
9 years ago
|
doins "${baseq2_cdpath}"/../${mod}/*.pak
|
||
13 years ago
|
fi
|
||
|
fi
|
||
|
done
|
||
|
|
||
4 years ago
|
insinto /usr/share/quake2/ctf
|
||
9 years ago
|
doins ctf/*.{cfg,ico,pak}
|
||
13 years ago
|
}
|