|
|
pkg_setup() { | pkg_setup() { |
games_pkg_setup | games_pkg_setup |
| |
if built_with_use "games-fps/quake1-demodata" symlink ; then |
if has_version "games-fps/quake1-demodata" \ |
eerror "The symlink for the demo data conflicts with the cdinstall data" |
&& built_with_use "games-fps/quake1-demodata" symlink ; then |
die "Unmerge games-fps/quake1-demodata to remove the conflict" |
eerror "The symlink for the demo data conflicts with the cdinstall data." |
|
die "Unmerge games-fps/quake1-demodata to remove the conflict." |
fi | fi |
| |
export CDROM_NAME_SET=("Existing Install" "Quake CD" "Ultimate Quake Collection") |
export CDROM_SET_NAMES=("Existing Install" "Quake CD" "Quake CD (alternate)" "Ultimate Quake Collection") |
cdrom_get_cds id1:q101_int.1:Setup/ID1 |
cdrom_get_cds id1:q101_int.1:resource.1:Setup/ID1 |
} | } |
| |
src_unpack() { | src_unpack() { |
echo ">>> Unpacking q101_int to ${PWD}" |
if [[ "${CDROM_SET}" == "1" ]] ; then |
if [[ ${CDROM_SET} == "1" ]] ; then |
echo ">>> Unpacking q101_int to ${PWD}" |
cat "${CDROM_ROOT}"/q101_int.1 "${CDROM_ROOT}"/q101_int.2 > \ |
cat "${CDROM_ROOT}"/q101_int.{1,2} > q101_int.exe |
"${S}"/q101_int.exe |
lha xqf q101_int.exe || die "lha q101_int.exe failed" |
lha xqf "${S}"/q101_int.exe || die "failure unpacking q101_int.exe" |
|
rm -f q101_int.exe | rm -f q101_int.exe |
|
elif [[ "${CDROM_SET}" == "2" ]] ; then |
|
echo ">>> Unpacking resource.1 to ${PWD}" |
|
lha xqf "${CDROM_ROOT}"/resource.1 || die "lha resource.1 failed" |
fi | fi |
} | } |
| |
src_install() { | src_install() { |
insinto ${GAMES_DATADIR}/quake1/id1 |
insinto "${GAMES_DATADIR}/quake1/id1" |
case ${CDROM_SET} in |
|
0) doins "${CDROM_ROOT}"/id1/* || die "doins pak files" |
case "${CDROM_SET}" in |
|
0) doins "${CDROM_ROOT}"/id1/* || die "doins id1/* 0 failed" |
dodoc "${CDROM_ROOT}"/*.txt | dodoc "${CDROM_ROOT}"/*.txt |
;; | ;; |
1) doins id1/* || die "doins pak files" |
1) doins id1/* || die "doins id1/* 1 failed" |
|
dodoc *.txt |
|
;; |
|
2) doins id1/* || die "doins id1/* 2 failed" |
dodoc *.txt | dodoc *.txt |
;; | ;; |
2) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak \ |
3) newins "${CDROM_ROOT}"/Setup/ID1/PAK0.PAK pak0.pak \ |
|| die "ins pak0.pak failed" | || die "ins pak0.pak failed" |
newins "${CDROM_ROOT}"/Setup/ID1/PAK1.PAK pak1.pak \ | newins "${CDROM_ROOT}"/Setup/ID1/PAK1.PAK pak1.pak \ |
|| die "ins pak1.pak failed" | || die "ins pak1.pak failed" |
dodoc "${CDROM_ROOT}"/Docs/* | dodoc "${CDROM_ROOT}"/Docs/* |
;; | ;; |
esac | esac |
|
|
prepgamesdirs | prepgamesdirs |
} | } |