* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2007-09-15 0:42 Chris Gianelloni (wolf31o2)
0 siblings, 0 replies; 27+ messages in thread
From: Chris Gianelloni (wolf31o2) @ 2007-09-15 0:42 UTC (permalink / raw
To: gentoo-commits
wolf31o2 07/09/15 00:42:42
Modified: games-mods.eclass
Log:
Changing GAME_EXE and DED_EXE for quake4 to quake4 and quake4-ded, respectively.
Revision Changes Path
1.16 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.15&r2=1.16
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- games-mods.eclass 9 Jan 2007 23:17:33 -0000 1.15
+++ games-mods.eclass 15 Sep 2007 00:42:41 -0000 1.16
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.15 2007/01/09 23:17:33 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.16 2007/09/15 00:42:41 wolf31o2 Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -47,8 +47,8 @@
GAME_TITLE="Quake IV"
DEFAULT_MOD_ICON="quake4.bmp"
SELECT_MOD="+set fs_game "
- GAME_EXE="q4"
- DED_EXE="q4-ded"
+ GAME_EXE="quake4"
+ DED_EXE="quake4-ded"
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
;;
"ut2003")
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2008-02-13 19:54 Michael Sterrett (mr_bones_)
0 siblings, 0 replies; 27+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2008-02-13 19:54 UTC (permalink / raw
To: gentoo-commits
mr_bones_ 08/02/13 19:54:33
Modified: games-mods.eclass
Log:
quoting
Revision Changes Path
1.17 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.16&r2=1.17
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- games-mods.eclass 15 Sep 2007 00:42:41 -0000 1.16
+++ games-mods.eclass 13 Feb 2008 19:54:33 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.16 2007/09/15 00:42:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.17 2008/02/13 19:54:33 mr_bones_ Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -382,7 +382,7 @@
if [[ -e ${FILESDIR}/server.cfg ]]
then
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
- doins ${FILESDIR}/server.cfg || die "Copying server config"
+ doins "${FILESDIR}"/server.cfg || die "Copying server config"
case ${GAME} in
doom3)
dodir "${GAMES_PREFIX}"/.doom3/${MOD_DIR}
@@ -487,7 +487,7 @@
games-mods_make_conf.d() {
if [[ -e ${FILESDIR}/${GAME_EXE}-${MOD_DIR}.conf.d ]]
then
- cp ${FILESDIR}/${GAME_EXE}-${MOD_DIR}.conf.d \
+ cp "${FILESDIR}"/${GAME_EXE}-${MOD_DIR}.conf.d \
"${T}"/${GAME_EXE}-${MOD_DIR}-ded.conf.d
return 0
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-08-02 7:29 Michael Sterrett (mr_bones_)
0 siblings, 0 replies; 27+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2009-08-02 7:29 UTC (permalink / raw
To: gentoo-commits
mr_bones_ 09/08/02 07:29:50
Modified: games-mods.eclass
Log:
format like the other games eclasses
Revision Changes Path
1.18 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.17&r2=1.18
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- games-mods.eclass 13 Feb 2008 19:54:33 -0000 1.17
+++ games-mods.eclass 2 Aug 2009 07:29:50 -0000 1.18
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.17 2008/02/13 19:54:33 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.18 2009/08/02 07:29:50 mr_bones_ Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -91,13 +91,11 @@
Ddir=${D}/${dir}
default_client() {
- if use opengl || ! use dedicated
- then
+ if use opengl || ! use dedicated ; then
# Use opengl by default
return 0
- else
- return 1
fi
+ return 1
}
games-mods_pkg_setup() {
@@ -105,28 +103,20 @@
games_pkg_setup
- if has_version ${CATEGORY}/${GAME}
- then
- if use dedicated && ! built_with_use ${CATEGORY}/${GAME} dedicated
- then
+ if has_version ${CATEGORY}/${GAME} ; then
+ if use dedicated && ! built_with_use ${CATEGORY}/${GAME} dedicated ; then
die "You must merge ${CATEGORY}/${GAME} with USE=dedicated!"
fi
- if has_version ${CATEGORY}/${GAME}-bin
- then
+ if has_version ${CATEGORY}/${GAME}-bin ; then
if use dedicated && \
- ! built_with_use ${CATEGORY}/${GAME}-bin dedicated
- then
+ ! built_with_use ${CATEGORY}/${GAME}-bin dedicated ; then
die "You must merge ${CATEGORY}/${GAME}-bin with USE=dedicated!"
fi
fi
- elif has_version ${CATEGORY}/${GAME}-bin
- then
- if use dedicated && ! built_with_use ${CATEGORY}/${GAME}-bin dedicated
- then
+ elif has_version ${CATEGORY}/${GAME}-bin ; then
+ if use dedicated && ! built_with_use ${CATEGORY}/${GAME}-bin dedicated ; then
die "You must merge ${CATEGORY}/${GAME}-bin with USE=dedicated!"
fi
-# else
-# die "${CATEGORY}/${GAME} not installed!"
fi
}
@@ -158,8 +148,7 @@
do
for ext in tar.bz2 tar.gz tbz2 tgz
do
- if [[ -e "${name}.${ext}" ]]
- then
+ if [[ -e "${name}.${ext}" ]] ; then
tar xf "${name}.${ext}" -C "${S}"/unpack \
|| die "uncompressing tarball"
# Remove the tarball after we unpack it
@@ -177,14 +166,11 @@
INS_DIR=${dir}
# We check if we have a specific MOD_DIR listed
- if [[ -n "${MOD_DIR}" ]]
- then
+ if [[ -n "${MOD_DIR}" ]] ; then
# Am installing into a new subdirectory of the game
- if [[ -d "${S}"/unpack/"${MOD_DIR}" ]]
- then
+ if [[ -d "${S}"/unpack/"${MOD_DIR}" ]] ; then
INS_DIR=${dir}
- elif [[ -d "${S}"/"${MOD_DIR}" ]]
- then
+ elif [[ -d "${S}"/"${MOD_DIR}" ]] ; then
S=${WORKDIR}/${MOD_DIR}
INS_DIR=${dir}/${MOD_DIR}
fi
@@ -195,16 +181,13 @@
# If we have a README, install it
for readme in README*
do
- if [[ -e "${readme}" ]]
- then
+ if [[ -s "${readme}" ]] ; then
dodoc "${readme}" || die "dodoc failed"
fi
done
- if default_client
- then
- if [[ -n "${MOD_ICON}" ]]
- then
+ if default_client ; then
+ if [[ -n "${MOD_ICON}" ]] ; then
# Install custom icon
MOD_ICON_EXT=${MOD_ICON##*.}
newicon "${MOD_ICON}" "${PN}.${MOD_ICON_EXT}"
@@ -222,18 +205,15 @@
fi
# Set up command-line and desktop menu entries
- if [[ -n "${MOD_BINS}" ]]
- then
+ if [[ -n "${MOD_BINS}" ]] ; then
for binary in ${MOD_BINS}
do
- if [[ -n "${MOD_DIR}" ]]
- then
+ if [[ -n "${MOD_DIR}" ]] ; then
games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
make_desktop_entry "${GAME_EXE}-${MOD_BINS}" \
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}"
- elif [[ -e "${S}"/bin/"${binary}" ]]
- then
+ elif [[ -e "${S}"/bin/"${binary}" ]] ; then
exeinto "${dir}"
newexe bin/${binary} ${GAME_EXE}-${binary} \
|| die "newexe failed"
@@ -242,16 +222,14 @@
# We want our wrapper to use the libraries/starting
# directory of our game. If the game is in
# GAMES_PREFIX_OPT, then we want to start there.
- if [[ -d "${GAMES_PREFIX_OPT}"/${GAME} ]]
- then
+ if [[ -d "${GAMES_PREFIX_OPT}"/${GAME} ]] ; then
GAME_DIR="${GAMES_PREFIX_OPT}/${GAME}"
else
GAME_DIR="${dir}"
fi
games_make_wrapper "${GAME_EXE}-${binary}" \
./"${GAME_EXE}-${binary}" "${GAME_DIR}" "${GAME_DIR}"
- if [[ "${bin_name}" == "${binary}" ]]
- then
+ if [[ "${bin_name}" == "${binary}" ]] ; then
bin_name=${MOD_NAME}
else
for tmp1 in ${bin_name}
@@ -270,10 +248,9 @@
rm -f bin/${binary}
fi
done
- # We don't want to leave the binary directory around
- rm -rf bin
- elif [[ -n "${MOD_DIR}" ]]
- then
+ # We don't want to leave the binary directory around
+ rm -rf bin
+ elif [[ -n "${MOD_DIR}" ]] ; then
games_make_wrapper "${GAME_EXE}-${MOD_DIR}" \
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
make_desktop_entry "${GAME_EXE}-${MOD_DIR}" \
@@ -282,8 +259,7 @@
# we only look for quake3 here.
case "${GAME_EXE}" in
"quake3")
- if has_version games-fps/quake3-bin
- then
+ if has_version games-fps/quake3-bin ; then
games_make_wrapper "${GAME_EXE}-bin-${MOD_DIR}" \
"${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}" \
"${dir}" "${dir}"
@@ -297,16 +273,14 @@
fi
# Copy our unpacked files, if it exists
- if [[ -d "${S}"/unpack ]]
- then
+ if [[ -d "${S}"/unpack ]] ; then
insinto "${INS_DIR}"
doins -r "${S}"/unpack/* || die "copying files"
rm -rf "${S}"/unpack
fi
# We expect anything not wanted to have been deleted by the ebuild
- if [[ ! -z $(ls "${S}"/* 2> /dev/null) ]]
- then
+ if [[ ! -z $(ls "${S}"/* 2> /dev/null) ]] ; then
insinto "${INS_DIR}"
doins -r * || die "doins -r failed"
fi
@@ -316,37 +290,31 @@
# into ${GAMES_PREFIX_OPT}/${GAME}/${MOD_DIR} for each game. This should
# allow us to support both binary and source-based games easily.
if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]] && \
- [[ "${GAMES_PREFIX_OPT}" != "${GAMES_DATADIR}" ]]
- then
+ [[ "${GAMES_PREFIX_OPT}" != "${GAMES_DATADIR}" ]] ; then
dodir "${GAMES_PREFIX_OPT}"/"${GAME}"
mod=$(echo "${INS_DIR}" | sed -e "s:${GAMES_DATADIR}/${GAME}::" -e "s:^/::" )
- if [[ -z "${mod}" ]]
- then
+ if [[ -z "${mod}" ]] ; then
# Our mod doesn't have its own directory. We now traverse the
# directory structure and try to symlink everything to
# GAMES_PREFIX_OPT/GAME so it'll work.
directories=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type d -printf '%P ')
for i in ${directories}
do
- if [[ -h "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]]
- then
+ if [[ -h "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
# Skip this directory, and just run a symlink
dosym "${INS_DIR}"/${i} \
"${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
- elif [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]]
- then
+ elif [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
dodir "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}
cd "${D}"/"${INS_DIR}"/${i}
files="$(find . -type f -printf '%P ')"
for j in ${files}
do
- if has_version ${CATEGORY}/${PN}
- then
+ if has_version ${CATEGORY}/${PN} ; then
dosym "${INS_DIR}"/${i}/${j} \
"${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
|| die
- elif [[ ! -e "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} ]]
- then
+ elif [[ ! -e "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} ]] ; then
dosym "${INS_DIR}"/${i}/${j} \
"${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
|| die
@@ -369,18 +337,15 @@
cp -a "${D}"/"${INS_DIR}"/${i} \
${D}/"${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
done
- elif [[ ! -f "${GAMES_PREFIX_OPT}"/"${GAME}"/${mod} ]]
- then
+ elif [[ ! -f "${GAMES_PREFIX_OPT}"/"${GAME}"/${mod} ]] ; then
elog "Creating symlink for ${mod}"
dosym "${INS_DIR}" "${GAMES_PREFIX_OPT}"/"${GAME}" || die
fi
fi
- if use dedicated
- then
+ if use dedicated ; then
dodir "${GAMES_STATEDIR}"
- if [[ -e ${FILESDIR}/server.cfg ]]
- then
+ if [[ -e ${FILESDIR}/server.cfg ]] ; then
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
doins "${FILESDIR}"/server.cfg || die "Copying server config"
case ${GAME} in
@@ -422,25 +387,21 @@
games-mods_pkg_postinst() {
games_pkg_postinst
- if default_client
- then
- if [[ -n "${MOD_BINS}" ]]
- then
+ if default_client ; then
+ if [[ -n "${MOD_BINS}" ]] ; then
for binary in ${MOD_BINS}
do
elog "To play this mod run:"
elog " ${GAME_EXE}-${binary}"
echo
done
- elif [[ -n "${MOD_DIR}" ]]
- then
+ elif [[ -n "${MOD_DIR}" ]] ; then
elog "To play this mod run:"
elog " ${GAME_EXE}-${MOD_DIR}"
echo
fi
fi
- if use dedicated
- then
+ if use dedicated ; then
elog "To launch a dedicated server run:"
elog " ${GAME_EXE}-${MOD_DIR}-ded"
echo
@@ -485,8 +446,7 @@
}
games-mods_make_conf.d() {
- if [[ -e ${FILESDIR}/${GAME_EXE}-${MOD_DIR}.conf.d ]]
- then
+ if [[ -e ${FILESDIR}/${GAME_EXE}-${MOD_DIR}.conf.d ]] ; then
cp "${FILESDIR}"/${GAME_EXE}-${MOD_DIR}.conf.d \
"${T}"/${GAME_EXE}-${MOD_DIR}-ded.conf.d
return 0
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-09-30 19:47 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-09-30 19:47 UTC (permalink / raw
To: gentoo-commits
nyhm 09/09/30 19:47:00
Modified: games-mods.eclass
Log:
unused variable
Revision Changes Path
1.19 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.18&r2=1.19
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- games-mods.eclass 2 Aug 2009 07:29:50 -0000 1.18
+++ games-mods.eclass 30 Sep 2009 19:47:00 -0000 1.19
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.18 2009/08/02 07:29:50 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.19 2009/09/30 19:47:00 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -88,7 +88,6 @@
S=${WORKDIR}
dir=${GAMES_DATADIR}/${GAME}
-Ddir=${D}/${dir}
default_client() {
if use opengl || ! use dedicated ; then
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-09-30 20:27 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-09-30 20:27 UTC (permalink / raw
To: gentoo-commits
nyhm 09/09/30 20:27:50
Modified: games-mods.eclass
Log:
don't specify icon filename extensions in desktop entries
Revision Changes Path
1.20 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.19&r2=1.20
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- games-mods.eclass 30 Sep 2009 19:47:00 -0000 1.19
+++ games-mods.eclass 30 Sep 2009 20:27:48 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.19 2009/09/30 19:47:00 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.20 2009/09/30 20:27:48 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -21,7 +21,7 @@
case "${GAME}" in
"doom3")
GAME_TITLE="Doom III"
- DEFAULT_MOD_ICON="doom3.png"
+ DEFAULT_MOD_ICON="doom3"
SELECT_MOD="+set fs_game "
GAME_EXE="doom3"
DED_EXE="doom3-ded"
@@ -29,7 +29,7 @@
;;
"enemy-territory")
GAME_TITLE="Enemy Territory"
- DEFAULT_MOD_ICON="ET.xpm"
+ DEFAULT_MOD_ICON="ET"
SELECT_MOD="+set fs_game "
GAME_EXE="et"
DED_EXE="et-ded"
@@ -37,7 +37,7 @@
;;
"quake3")
GAME_TITLE="Quake III"
- DEFAULT_MOD_ICON="quake3.xpm"
+ DEFAULT_MOD_ICON="quake3"
SELECT_MOD="+set fs_game "
GAME_EXE="quake3"
DED_EXE="quake3-ded"
@@ -45,7 +45,7 @@
;;
"quake4")
GAME_TITLE="Quake IV"
- DEFAULT_MOD_ICON="quake4.bmp"
+ DEFAULT_MOD_ICON="/usr/share/pixmaps/quake4.bmp"
SELECT_MOD="+set fs_game "
GAME_EXE="quake4"
DED_EXE="quake4-ded"
@@ -53,7 +53,7 @@
;;
"ut2003")
GAME_TITLE="UT2003"
- DEFAULT_MOD_ICON="ut2003.xpm"
+ DEFAULT_MOD_ICON="ut2003"
SELECT_MOD="-mod="
GAME_EXE="ut2003"
DED_EXE="ucc"
@@ -61,7 +61,7 @@
;;
"ut2004")
GAME_TITLE="UT2004"
- DEFAULT_MOD_ICON="ut2004.xpm"
+ DEFAULT_MOD_ICON="ut2004"
SELECT_MOD="-mod="
GAME_EXE="ut2004"
DED_EXE="ucc"
@@ -195,7 +195,7 @@
MOD_ICON=/usr/share/pixmaps/${PN}.${MOD_ICON_EXT}
;;
*)
- MOD_ICON=${PN}.${MOD_ICON_EXT}
+ MOD_ICON=${PN}
;;
esac
else
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-09-30 23:40 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-09-30 23:40 UTC (permalink / raw
To: gentoo-commits
nyhm 09/09/30 23:40:17
Modified: games-mods.eclass
Log:
Add RDEPENDs for each GAME
Revision Changes Path
1.21 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.20&r2=1.21
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- games-mods.eclass 30 Sep 2009 20:27:48 -0000 1.20
+++ games-mods.eclass 30 Sep 2009 23:40:17 -0000 1.21
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.20 2009/09/30 20:27:48 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.21 2009/09/30 23:40:17 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -20,6 +20,7 @@
# Set our default title, icon, and cli options
case "${GAME}" in
"doom3")
+ RDEPEND="games-fps/doom3"
GAME_TITLE="Doom III"
DEFAULT_MOD_ICON="doom3"
SELECT_MOD="+set fs_game "
@@ -28,6 +29,7 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
;;
"enemy-territory")
+ RDEPEND="games-fps/enemy-territory"
GAME_TITLE="Enemy Territory"
DEFAULT_MOD_ICON="ET"
SELECT_MOD="+set fs_game "
@@ -36,6 +38,7 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
;;
"quake3")
+ RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin )"
GAME_TITLE="Quake III"
DEFAULT_MOD_ICON="quake3"
SELECT_MOD="+set fs_game "
@@ -44,6 +47,7 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
;;
"quake4")
+ RDEPEND="games-fps/quake4-bin"
GAME_TITLE="Quake IV"
DEFAULT_MOD_ICON="/usr/share/pixmaps/quake4.bmp"
SELECT_MOD="+set fs_game "
@@ -52,6 +56,7 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
;;
"ut2003")
+ RDEPEND="games-fps/ut2003"
GAME_TITLE="UT2003"
DEFAULT_MOD_ICON="ut2003"
SELECT_MOD="-mod="
@@ -60,6 +65,7 @@
DED_OPTIONS=""
;;
"ut2004")
+ RDEPEND="games-fps/ut2004"
GAME_TITLE="UT2004"
DEFAULT_MOD_ICON="ut2004"
SELECT_MOD="-mod="
@@ -83,7 +89,6 @@
RESTRICT="mirror strip"
DEPEND="app-arch/unzip"
-#RDEPEND="${CATEGORY}/${GAME}"
S=${WORKDIR}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-09-30 23:58 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-09-30 23:58 UTC (permalink / raw
To: gentoo-commits
nyhm 09/09/30 23:58:42
Modified: games-mods.eclass
Log:
use consistent style
Revision Changes Path
1.22 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.22&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.22&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.21&r2=1.22
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- games-mods.eclass 30 Sep 2009 23:40:17 -0000 1.21
+++ games-mods.eclass 30 Sep 2009 23:58:42 -0000 1.22
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.21 2009/09/30 23:40:17 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.22 2009/09/30 23:58:42 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -126,8 +126,7 @@
games-mods_src_unpack() {
# The first thing we do here is determine exactly what we're dealing with
- for src_uri in ${A}
- do
+ for src_uri in ${A} ; do
URI_SUFFIX="${src_uri##*.}"
case ${URI_SUFFIX##*.} in
bin|run)
@@ -145,13 +144,10 @@
done
# This code should only be executed for Makeself archives
- for tarball in ${MOD_TBZ2}
- do
+ for tarball in ${MOD_TBZ2} ; do
mkdir -p "${S}"/unpack
- for name in "${tarball}_${PV}-english" "${tarball}_${PV}" "${tarball}"
- do
- for ext in tar.bz2 tar.gz tbz2 tgz
- do
+ for name in "${tarball}_${PV}-english" "${tarball}_${PV}" "${tarball}" ; do
+ for ext in tar.bz2 tar.gz tbz2 tgz ; do
if [[ -e "${name}.${ext}" ]] ; then
tar xf "${name}.${ext}" -C "${S}"/unpack \
|| die "uncompressing tarball"
@@ -183,8 +179,7 @@
cd "${S}"
# If we have a README, install it
- for readme in README*
- do
+ for readme in README* ; do
if [[ -s "${readme}" ]] ; then
dodoc "${readme}" || die "dodoc failed"
fi
@@ -210,8 +205,7 @@
# Set up command-line and desktop menu entries
if [[ -n "${MOD_BINS}" ]] ; then
- for binary in ${MOD_BINS}
- do
+ for binary in ${MOD_BINS} ; do
if [[ -n "${MOD_DIR}" ]] ; then
games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
@@ -236,8 +230,7 @@
if [[ "${bin_name}" == "${binary}" ]] ; then
bin_name=${MOD_NAME}
else
- for tmp1 in ${bin_name}
- do
+ for tmp1 in ${bin_name} ; do
tmp2=$(echo ${tmp1} | cut -b1 | tr [[:lower:]] \
[[:upper:]])
tmp3=$(echo ${tmp1} | cut -b2-)
@@ -302,8 +295,7 @@
# directory structure and try to symlink everything to
# GAMES_PREFIX_OPT/GAME so it'll work.
directories=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type d -printf '%P ')
- for i in ${directories}
- do
+ for i in ${directories} ; do
if [[ -h "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
# Skip this directory, and just run a symlink
dosym "${INS_DIR}"/${i} \
@@ -312,8 +304,7 @@
dodir "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}
cd "${D}"/"${INS_DIR}"/${i}
files="$(find . -type f -printf '%P ')"
- for j in ${files}
- do
+ for j in ${files} ; do
if has_version ${CATEGORY}/${PN} ; then
dosym "${INS_DIR}"/${i}/${j} \
"${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
@@ -331,8 +322,7 @@
fi
done
files=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type f -printf '%P ')
- for i in ${files}
- do
+ for i in ${files} ; do
# Why don´t we use symlinks? Because these use ./$bin when
# they run and that doesn't work if the binary is in
# GAMES_PREFIX_OPT but the mod is in GAMES_DATADIR.
@@ -393,8 +383,7 @@
games_pkg_postinst
if default_client ; then
if [[ -n "${MOD_BINS}" ]] ; then
- for binary in ${MOD_BINS}
- do
+ for binary in ${MOD_BINS} ; do
elog "To play this mod run:"
elog " ${GAME_EXE}-${binary}"
echo
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 13:15 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 13:15 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 13:15:24
Modified: games-mods.eclass
Log:
remove useless dodir
Revision Changes Path
1.23 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.23&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.23&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.22&r2=1.23
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- games-mods.eclass 30 Sep 2009 23:58:42 -0000 1.22
+++ games-mods.eclass 1 Oct 2009 13:15:23 -0000 1.23
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.22 2009/09/30 23:58:42 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.23 2009/10/01 13:15:23 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -338,7 +338,6 @@
fi
if use dedicated ; then
- dodir "${GAMES_STATEDIR}"
if [[ -e ${FILESDIR}/server.cfg ]] ; then
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
doins "${FILESDIR}"/server.cfg || die "Copying server config"
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 13:35 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 13:35 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 13:35:21
Modified: games-mods.eclass
Log:
fix game titles
Revision Changes Path
1.24 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.23&r2=1.24
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- games-mods.eclass 1 Oct 2009 13:15:23 -0000 1.23
+++ games-mods.eclass 1 Oct 2009 13:35:21 -0000 1.24
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.23 2009/10/01 13:15:23 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.24 2009/10/01 13:35:21 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -21,7 +21,7 @@
case "${GAME}" in
"doom3")
RDEPEND="games-fps/doom3"
- GAME_TITLE="Doom III"
+ GAME_TITLE="Doom 3"
DEFAULT_MOD_ICON="doom3"
SELECT_MOD="+set fs_game "
GAME_EXE="doom3"
@@ -48,7 +48,7 @@
;;
"quake4")
RDEPEND="games-fps/quake4-bin"
- GAME_TITLE="Quake IV"
+ GAME_TITLE="Quake 4"
DEFAULT_MOD_ICON="/usr/share/pixmaps/quake4.bmp"
SELECT_MOD="+set fs_game "
GAME_EXE="quake4"
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 14:05 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 14:05 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 14:05:04
Modified: games-mods.eclass
Log:
unify server.cfg stuff (even though only quake3 mods use it atm)
Revision Changes Path
1.25 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.25&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.25&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.24&r2=1.25
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- games-mods.eclass 1 Oct 2009 13:35:21 -0000 1.24
+++ games-mods.eclass 1 Oct 2009 14:05:04 -0000 1.25
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.24 2009/10/01 13:35:21 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.25 2009/10/01 14:05:04 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -27,6 +27,7 @@
GAME_EXE="doom3"
DED_EXE="doom3-ded"
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ DED_CFG_DIR=".doom3"
;;
"enemy-territory")
RDEPEND="games-fps/enemy-territory"
@@ -36,6 +37,7 @@
GAME_EXE="et"
DED_EXE="et-ded"
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ DED_CFG_DIR=".etwolf"
;;
"quake3")
RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin )"
@@ -45,6 +47,7 @@
GAME_EXE="quake3"
DED_EXE="quake3-ded"
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ DED_CFG_DIR=".q3a"
;;
"quake4")
RDEPEND="games-fps/quake4-bin"
@@ -54,6 +57,7 @@
GAME_EXE="quake4"
DED_EXE="quake4-ded"
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ DED_CFG_DIR=".quake4"
;;
"ut2003")
RDEPEND="games-fps/ut2003"
@@ -63,6 +67,7 @@
GAME_EXE="ut2003"
DED_EXE="ucc"
DED_OPTIONS=""
+ DED_CFG_DIR=""
;;
"ut2004")
RDEPEND="games-fps/ut2004"
@@ -72,6 +77,7 @@
GAME_EXE="ut2004"
DED_EXE="ucc"
DED_OPTIONS=""
+ DED_CFG_DIR=""
;;
*)
eerror "This game is either not supported or you must set the GAME"
@@ -338,31 +344,12 @@
fi
if use dedicated ; then
- if [[ -e ${FILESDIR}/server.cfg ]] ; then
+ if [[ -f ${FILESDIR}/server.cfg ]] ; then
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
doins "${FILESDIR}"/server.cfg || die "Copying server config"
- case ${GAME} in
- doom3)
- dodir "${GAMES_PREFIX}"/.doom3/${MOD_DIR}
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
- "${GAMES_PREFIX}"/.doom3/${MOD_DIR}
- ;;
- enemy-territory)
- dodir "${GAMES_PREFIX}"/.etwolf/${MOD_DIR}
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
- "${GAMES_PREFIX}"/.etwolf/${MOD_DIR}
- ;;
- quake3)
- dodir "${GAMES_PREFIX}"/.q3a/${MOD_DIR}
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
- "${GAMES_PREFIX}"/.q3a/${MOD_DIR}
- ;;
- quake4)
- dodir "${GAMES_PREFIX}"/.quake4/${MOD_DIR}
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
- "${GAMES_PREFIX}"/.quake4/${MOD_DIR}
- ;;
- esac
+ dodir "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}
+ dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
+ "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg
fi
games-mods_make_ded_exec
newgamesbin "${T}"/${GAME_EXE}-${MOD_DIR}-ded.bin \
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 16:03 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 16:03 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 16:03:40
Modified: games-mods.eclass
Log:
use games_make_wrapper instead of own function; move installation of confd and initd files into the games-mod_make* functions
Revision Changes Path
1.26 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.26&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.26&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.25&r2=1.26
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- games-mods.eclass 1 Oct 2009 14:05:04 -0000 1.25
+++ games-mods.eclass 1 Oct 2009 16:03:40 -0000 1.26
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.25 2009/10/01 14:05:04 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.26 2009/10/01 16:03:40 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -351,15 +351,11 @@
dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
"${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg
fi
- games-mods_make_ded_exec
- newgamesbin "${T}"/${GAME_EXE}-${MOD_DIR}-ded.bin \
- ${GAME_EXE}-${MOD_DIR}-ded || die "dedicated"
- games-mods_make_init.d
- newinitd "${T}"/${GAME_EXE}-${MOD_DIR}-ded.init.d \
- ${GAME_EXE}-${MOD_DIR}-ded || die "init.d"
- games-mods_make_conf.d
- newconfd "${T}"/${GAME_EXE}-${MOD_DIR}-ded.conf.d \
- ${GAME_EXE}-${MOD_DIR}-ded || die "conf.d"
+ games_make_wrapper \
+ ${GAME_EXE}-${MOD_DIR}-ded \
+ "${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS}"
+ games-mods_make_initd
+ games-mods_make_confd
fi
prepgamesdirs
@@ -390,51 +386,41 @@
fi
}
-games-mods_make_ded_exec() {
- cat <<-EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded.bin
- #!/bin/sh
- ${GAMES_BINDIR}/${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS} \${@}
- EOF
-}
-
-games-mods_make_init.d() {
- cat <<EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded.init.d
+games-mods_make_initd() {
+ cat <<EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded
#!/sbin/runscript
-$(<${PORTDIR}/header.txt)
+$(head -n 2 ${PORTDIR}/header.txt)
+# Generated by games-mods.eclass
depend() {
need net
}
start() {
- ebegin "Starting ${GAME_TITLE} - ${MOD_NAME} dedicated server"
+ ebegin "Starting ${GAME_TITLE} ${MOD_NAME} dedicated server"
start-stop-daemon --start --quiet --background --chuid \\
${GAMES_USER_DED}:games --env HOME="${GAMES_PREFIX}" --exec \\
- ${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded \\
- \${${GAME_EXE}_${MOD_DIR}_OPTS}
+ ${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded -- \\
+ \${${GAME_EXE}_${MOD_DIR}_opts}
eend \$?
}
stop() {
- ebegin "Stopping ${GAME_TITLE} - ${MOD_NAME} dedicated server"
+ ebegin "Stopping ${GAME_TITLE} ${MOD_NAME} dedicated server"
start-stop-daemon --stop --quiet --exec \\
${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded
eend \$?
}
EOF
-}
-games-mods_make_conf.d() {
- if [[ -e ${FILESDIR}/${GAME_EXE}-${MOD_DIR}.conf.d ]] ; then
- cp "${FILESDIR}"/${GAME_EXE}-${MOD_DIR}.conf.d \
- "${T}"/${GAME_EXE}-${MOD_DIR}-ded.conf.d
- return 0
- fi
-cat <<-EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded.conf.d
- $(<${PORTDIR}/header.txt)
+ doinitd "${T}"/${GAME_EXE}-${MOD_DIR}-ded || die "doinitd failed"
+}
+games-mods_make_confd() {
+ cat <<-EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded
# Any extra options you want to pass to the dedicated server
- # ${GAME_EXE}_${MOD_DIR}_OPTS="+set com_hunkmegs 64 +set com_zonemegs 32"
-
+ ${GAME_EXE}_${MOD_DIR}_opts=""
EOF
+
+ doconfd "${T}"/${GAME_EXE}-${MOD_DIR}-ded || die "doconfd failed"
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 16:18 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 16:18 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 16:18:22
Modified: games-mods.eclass
Log:
run servers as ${GAMES_USER_DED}:${GAMES_GROUP}
Revision Changes Path
1.27 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.27&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.27&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.26&r2=1.27
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- games-mods.eclass 1 Oct 2009 16:03:40 -0000 1.26
+++ games-mods.eclass 1 Oct 2009 16:18:22 -0000 1.27
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.26 2009/10/01 16:03:40 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.27 2009/10/01 16:18:22 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -399,7 +399,7 @@
start() {
ebegin "Starting ${GAME_TITLE} ${MOD_NAME} dedicated server"
start-stop-daemon --start --quiet --background --chuid \\
- ${GAMES_USER_DED}:games --env HOME="${GAMES_PREFIX}" --exec \\
+ ${GAMES_USER_DED}:${GAMES_GROUP} --env HOME="${GAMES_PREFIX}" --exec \\
${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded -- \\
\${${GAME_EXE}_${MOD_DIR}_opts}
eend \$?
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 19:55 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 19:55 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 19:55:33
Modified: games-mods.eclass
Log:
don't set LICENSE
Revision Changes Path
1.28 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.27&r2=1.28
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- games-mods.eclass 1 Oct 2009 16:18:22 -0000 1.27
+++ games-mods.eclass 1 Oct 2009 19:55:33 -0000 1.28
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.27 2009/10/01 16:18:22 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.28 2009/10/01 19:55:33 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -89,7 +89,6 @@
DESCRIPTION="${GAME_TITLE} ${MOD_NAME} - ${MOD_DESC}"
SLOT="0"
-LICENSE="freedist"
KEYWORDS="-* amd64 x86"
IUSE="dedicated opengl"
RESTRICT="mirror strip"
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-01 22:36 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-01 22:36 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/01 22:36:25
Modified: games-mods.eclass
Log:
don't set KEYWORDS or IUSE
Revision Changes Path
1.29 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.28&r2=1.29
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- games-mods.eclass 1 Oct 2009 19:55:33 -0000 1.28
+++ games-mods.eclass 1 Oct 2009 22:36:24 -0000 1.29
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.28 2009/10/01 19:55:33 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.29 2009/10/01 22:36:24 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -89,8 +89,6 @@
DESCRIPTION="${GAME_TITLE} ${MOD_NAME} - ${MOD_DESC}"
SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="dedicated opengl"
RESTRICT="mirror strip"
DEPEND="app-arch/unzip"
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-02 4:56 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-02 4:56 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/02 04:56:24
Modified: games-mods.eclass
Log:
drop pkg_setup; USE deps to replace built_with_use tests; allow for mods with no server
Revision Changes Path
1.30 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.29&r2=1.30
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- games-mods.eclass 1 Oct 2009 22:36:24 -0000 1.29
+++ games-mods.eclass 2 Oct 2009 04:56:24 -0000 1.30
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.29 2009/10/01 22:36:24 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.30 2009/10/02 04:56:24 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -10,17 +10,18 @@
# MOD_ICON - Custom icon for the mod, instead of the default
# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod
# MOD_TBZ2 - File to extract within the Makeself archive
+# MOD_NO_DED - Set this non-empty if the mod doesn't have a server
inherit eutils games
-EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+EXPORT_FUNCTIONS src_unpack src_install pkg_postinst
[[ -z ${GAME} ]] && GAME=${PN%%-*}
# Set our default title, icon, and cli options
-case "${GAME}" in
- "doom3")
- RDEPEND="games-fps/doom3"
+case ${GAME} in
+ doom3)
+ GAME_PKGS="games-fps/doom3"
GAME_TITLE="Doom 3"
DEFAULT_MOD_ICON="doom3"
SELECT_MOD="+set fs_game "
@@ -29,8 +30,8 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".doom3"
;;
- "enemy-territory")
- RDEPEND="games-fps/enemy-territory"
+ enemy-territory)
+ GAME_PKGS="games-fps/enemy-territory"
GAME_TITLE="Enemy Territory"
DEFAULT_MOD_ICON="ET"
SELECT_MOD="+set fs_game "
@@ -39,8 +40,8 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".etwolf"
;;
- "quake3")
- RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin )"
+ quake3)
+ GAME_PKGS="games-fps/quake3 games-fps/quake3-bin"
GAME_TITLE="Quake III"
DEFAULT_MOD_ICON="quake3"
SELECT_MOD="+set fs_game "
@@ -49,8 +50,8 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".q3a"
;;
- "quake4")
- RDEPEND="games-fps/quake4-bin"
+ quake4)
+ GAME_PKGS="games-fps/quake4-bin"
GAME_TITLE="Quake 4"
DEFAULT_MOD_ICON="/usr/share/pixmaps/quake4.bmp"
SELECT_MOD="+set fs_game "
@@ -59,8 +60,8 @@
DED_OPTIONS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".quake4"
;;
- "ut2003")
- RDEPEND="games-fps/ut2003"
+ ut2003)
+ GAME_PKGS="games-fps/ut2003"
GAME_TITLE="UT2003"
DEFAULT_MOD_ICON="ut2003"
SELECT_MOD="-mod="
@@ -69,8 +70,8 @@
DED_OPTIONS=""
DED_CFG_DIR=""
;;
- "ut2004")
- RDEPEND="games-fps/ut2004"
+ ut2004)
+ GAME_PKGS="games-fps/ut2004"
GAME_TITLE="UT2004"
DEFAULT_MOD_ICON="ut2004"
SELECT_MOD="-mod="
@@ -86,45 +87,54 @@
;;
esac
+games-mods_get_rdepend() {
+ [[ $# -lt 1 ]] && die "${FUNCNAME}: need args"
+ [[ $# -gt 1 ]] && echo -n "|| ( "
+
+ case ${EAPI:-0} in
+ 0|1) echo -n $@ ;;
+ 2)
+ local pkg
+ for pkg in $@ ; do
+ if [[ -z ${MOD_NO_DED} ]] ; then
+ echo -n " ${pkg}[dedicated=,opengl=]"
+ else
+ echo -n " ${pkg}[opengl]"
+ fi
+ done
+ ;;
+ esac
+
+ [[ $# -gt 1 ]] && echo -n " )"
+}
+
DESCRIPTION="${GAME_TITLE} ${MOD_NAME} - ${MOD_DESC}"
SLOT="0"
RESTRICT="mirror strip"
DEPEND="app-arch/unzip"
+RDEPEND="$(games-mods_get_rdepend ${GAME_PKGS})"
S=${WORKDIR}
dir=${GAMES_DATADIR}/${GAME}
-default_client() {
+games-mods_use_opengl() {
+ [[ -n ${MOD_NO_DED} ]] && return 0
+
if use opengl || ! use dedicated ; then
# Use opengl by default
return 0
fi
+
return 1
}
-games-mods_pkg_setup() {
- [[ -z "${MOD_NAME}" ]] && die "what is the name of this mod?"
-
- games_pkg_setup
+games-mods_use_dedicated() {
+ [[ -n ${MOD_NO_DED} ]] && return 1
- if has_version ${CATEGORY}/${GAME} ; then
- if use dedicated && ! built_with_use ${CATEGORY}/${GAME} dedicated ; then
- die "You must merge ${CATEGORY}/${GAME} with USE=dedicated!"
- fi
- if has_version ${CATEGORY}/${GAME}-bin ; then
- if use dedicated && \
- ! built_with_use ${CATEGORY}/${GAME}-bin dedicated ; then
- die "You must merge ${CATEGORY}/${GAME}-bin with USE=dedicated!"
- fi
- fi
- elif has_version ${CATEGORY}/${GAME}-bin ; then
- if use dedicated && ! built_with_use ${CATEGORY}/${GAME}-bin dedicated ; then
- die "You must merge ${CATEGORY}/${GAME}-bin with USE=dedicated!"
- fi
- fi
+ use dedicated && return 0 || return 1
}
games-mods_src_unpack() {
@@ -188,7 +198,7 @@
fi
done
- if default_client ; then
+ if games-mods_use_opengl ; then
if [[ -n "${MOD_ICON}" ]] ; then
# Install custom icon
MOD_ICON_EXT=${MOD_ICON##*.}
@@ -340,7 +350,7 @@
fi
fi
- if use dedicated ; then
+ if games-mods_use_dedicated ; then
if [[ -f ${FILESDIR}/server.cfg ]] ; then
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
doins "${FILESDIR}"/server.cfg || die "Copying server config"
@@ -360,7 +370,7 @@
games-mods_pkg_postinst() {
games_pkg_postinst
- if default_client ; then
+ if games-mods_use_opengl ; then
if [[ -n "${MOD_BINS}" ]] ; then
for binary in ${MOD_BINS} ; do
elog "To play this mod run:"
@@ -373,7 +383,7 @@
echo
fi
fi
- if use dedicated ; then
+ if games-mods_use_dedicated ; then
elog "To launch a dedicated server run:"
elog " ${GAME_EXE}-${MOD_DIR}-ded"
echo
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-04 14:13 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-04 14:13 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/04 14:13:59
Modified: games-mods.eclass
Log:
disable installation of client or server specific files if MOD_DIR and MOD_BINS are empty
Revision Changes Path
1.31 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.30&r2=1.31
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- games-mods.eclass 2 Oct 2009 04:56:24 -0000 1.30
+++ games-mods.eclass 4 Oct 2009 14:13:59 -0000 1.31
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.30 2009/10/02 04:56:24 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.31 2009/10/04 14:13:59 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -10,7 +10,6 @@
# MOD_ICON - Custom icon for the mod, instead of the default
# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod
# MOD_TBZ2 - File to extract within the Makeself archive
-# MOD_NO_DED - Set this non-empty if the mod doesn't have a server
inherit eutils games
@@ -96,10 +95,10 @@
2)
local pkg
for pkg in $@ ; do
- if [[ -z ${MOD_NO_DED} ]] ; then
- echo -n " ${pkg}[dedicated=,opengl=]"
+ if [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] ; then
+ echo -n " ${pkg}"
else
- echo -n " ${pkg}[opengl]"
+ echo -n " ${pkg}[dedicated=,opengl=]"
fi
done
;;
@@ -121,7 +120,7 @@
dir=${GAMES_DATADIR}/${GAME}
games-mods_use_opengl() {
- [[ -n ${MOD_NO_DED} ]] && return 0
+ [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
if use opengl || ! use dedicated ; then
# Use opengl by default
@@ -132,7 +131,7 @@
}
games-mods_use_dedicated() {
- [[ -n ${MOD_NO_DED} ]] && return 1
+ [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
use dedicated && return 0 || return 1
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-06 12:59 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-06 12:59 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/06 12:59:07
Modified: games-mods.eclass
Log:
name wrappers and init scripts ${PN/${GAME}-} instead of ${MOD_DIR}
Revision Changes Path
1.32 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.31&r2=1.32
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- games-mods.eclass 4 Oct 2009 14:13:59 -0000 1.31
+++ games-mods.eclass 6 Oct 2009 12:59:07 -0000 1.32
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.31 2009/10/04 14:13:59 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.32 2009/10/06 12:59:07 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -260,20 +260,20 @@
# We don't want to leave the binary directory around
rm -rf bin
elif [[ -n "${MOD_DIR}" ]] ; then
- games_make_wrapper "${GAME_EXE}-${MOD_DIR}" \
+ games_make_wrapper "${GAME_EXE}-${PN/${GAME}-}" \
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
- make_desktop_entry "${GAME_EXE}-${MOD_DIR}" \
+ make_desktop_entry "${GAME_EXE}-${PN/${GAME}-}" \
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}"
# Since only quake3 has both a binary and a source-based install,
# we only look for quake3 here.
case "${GAME_EXE}" in
"quake3")
if has_version games-fps/quake3-bin ; then
- games_make_wrapper "${GAME_EXE}-bin-${MOD_DIR}" \
+ games_make_wrapper "${GAME_EXE}-bin-${PN/${GAME}-}" \
"${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}" \
"${dir}" "${dir}"
fi
- make_desktop_entry "${GAME_EXE}-bin-${MOD_DIR}" \
+ make_desktop_entry "${GAME_EXE}-bin-${PN/${GAME}-}" \
"${GAME_TITLE} - ${MOD_NAME} (binary)" \
"${MOD_ICON}"
;;
@@ -358,7 +358,7 @@
"${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg
fi
games_make_wrapper \
- ${GAME_EXE}-${MOD_DIR}-ded \
+ ${GAME_EXE}-${PN/${GAME}-}-ded \
"${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS}"
games-mods_make_initd
games-mods_make_confd
@@ -378,13 +378,13 @@
done
elif [[ -n "${MOD_DIR}" ]] ; then
elog "To play this mod run:"
- elog " ${GAME_EXE}-${MOD_DIR}"
+ elog " ${GAME_EXE}-${PN/${GAME}-}"
echo
fi
fi
if games-mods_use_dedicated ; then
elog "To launch a dedicated server run:"
- elog " ${GAME_EXE}-${MOD_DIR}-ded"
+ elog " ${GAME_EXE}-${PN/${GAME}-}-ded"
echo
elog "To launch server at startup run:"
elog " rc-update add ${GAME_EXE}-${MOD_DIR}-ded default"
@@ -393,7 +393,7 @@
}
games-mods_make_initd() {
- cat <<EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded
+ cat <<EOF > "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded
#!/sbin/runscript
$(head -n 2 ${PORTDIR}/header.txt)
# Generated by games-mods.eclass
@@ -406,27 +406,27 @@
ebegin "Starting ${GAME_TITLE} ${MOD_NAME} dedicated server"
start-stop-daemon --start --quiet --background --chuid \\
${GAMES_USER_DED}:${GAMES_GROUP} --env HOME="${GAMES_PREFIX}" --exec \\
- ${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded -- \\
- \${${GAME_EXE}_${MOD_DIR}_opts}
+ ${GAMES_BINDIR}/${GAME_EXE}-${PN/${GAME}-}-ded -- \\
+ \${${GAME_EXE}_${PN/${GAME}-}_opts}
eend \$?
}
stop() {
ebegin "Stopping ${GAME_TITLE} ${MOD_NAME} dedicated server"
start-stop-daemon --stop --quiet --exec \\
- ${GAMES_BINDIR}/${GAME_EXE}-${MOD_DIR}-ded
+ ${GAMES_BINDIR}/${GAME_EXE}-${PN/${GAME}-}-ded
eend \$?
}
EOF
- doinitd "${T}"/${GAME_EXE}-${MOD_DIR}-ded || die "doinitd failed"
+ doinitd "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded || die "doinitd failed"
}
games-mods_make_confd() {
- cat <<-EOF > "${T}"/${GAME_EXE}-${MOD_DIR}-ded
+ cat <<-EOF > "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded
# Any extra options you want to pass to the dedicated server
- ${GAME_EXE}_${MOD_DIR}_opts=""
+ ${GAME_EXE}_${PN/${GAME}-}_opts=""
EOF
- doconfd "${T}"/${GAME_EXE}-${MOD_DIR}-ded || die "doconfd failed"
+ doconfd "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded || die "doconfd failed"
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-06 13:07 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-06 13:07 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/06 13:07:26
Modified: games-mods.eclass
Log:
missed one
Revision Changes Path
1.33 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.32&r2=1.33
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- games-mods.eclass 6 Oct 2009 12:59:07 -0000 1.32
+++ games-mods.eclass 6 Oct 2009 13:07:26 -0000 1.33
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.32 2009/10/06 12:59:07 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.33 2009/10/06 13:07:26 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -387,7 +387,7 @@
elog " ${GAME_EXE}-${PN/${GAME}-}-ded"
echo
elog "To launch server at startup run:"
- elog " rc-update add ${GAME_EXE}-${MOD_DIR}-ded default"
+ elog " rc-update add ${GAME_EXE}-${PN/${GAME}-}-ded default"
echo
fi
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-06 13:37 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-06 13:37 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/06 13:37:42
Modified: games-mods.eclass
Log:
exec ut2004-ded for ut2004 servers (doesn't exist yet but neither does ucc)
Revision Changes Path
1.34 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.33&r2=1.34
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- games-mods.eclass 6 Oct 2009 13:07:26 -0000 1.33
+++ games-mods.eclass 6 Oct 2009 13:37:42 -0000 1.34
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.33 2009/10/06 13:07:26 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.34 2009/10/06 13:37:42 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -75,7 +75,7 @@
DEFAULT_MOD_ICON="ut2004"
SELECT_MOD="-mod="
GAME_EXE="ut2004"
- DED_EXE="ucc"
+ DED_EXE="ut2004-ded"
DED_OPTIONS=""
DED_CFG_DIR=""
;;
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-09 2:20 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-09 2:20 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/09 02:20:18
Modified: games-mods.eclass
Log:
install everything in ${S}
Revision Changes Path
1.35 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.34&r2=1.35
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- games-mods.eclass 6 Oct 2009 13:37:42 -0000 1.34
+++ games-mods.eclass 9 Oct 2009 02:20:18 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.34 2009/10/06 13:37:42 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.35 2009/10/09 02:20:18 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -177,19 +177,6 @@
local readme MOD_ICON_EXT new_bin_name bin_name mod files directories i j
INS_DIR=${dir}
- # We check if we have a specific MOD_DIR listed
- if [[ -n "${MOD_DIR}" ]] ; then
- # Am installing into a new subdirectory of the game
- if [[ -d "${S}"/unpack/"${MOD_DIR}" ]] ; then
- INS_DIR=${dir}
- elif [[ -d "${S}"/"${MOD_DIR}" ]] ; then
- S=${WORKDIR}/${MOD_DIR}
- INS_DIR=${dir}/${MOD_DIR}
- fi
- fi
-
- cd "${S}"
-
# If we have a README, install it
for readme in README* ; do
if [[ -s "${readme}" ]] ; then
@@ -201,7 +188,11 @@
if [[ -n "${MOD_ICON}" ]] ; then
# Install custom icon
MOD_ICON_EXT=${MOD_ICON##*.}
- newicon "${MOD_ICON}" "${PN}.${MOD_ICON_EXT}"
+ if [[ -f ${MOD_ICON} ]] ; then
+ newicon "${MOD_ICON}" ${PN}.${MOD_ICON_EXT}
+ else
+ newicon ${MOD_DIR}/"${MOD_ICON}" ${PN}.${MOD_ICON_EXT}
+ fi
case ${MOD_ICON_EXT} in
bmp|ico)
MOD_ICON=/usr/share/pixmaps/${PN}.${MOD_ICON_EXT}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-09 3:44 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-09 3:44 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/09 03:44:22
Modified: games-mods.eclass
Log:
symlink all files not in MOD_DIR
Revision Changes Path
1.36 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.35&r2=1.36
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- games-mods.eclass 9 Oct 2009 02:20:18 -0000 1.35
+++ games-mods.eclass 9 Oct 2009 03:44:22 -0000 1.36
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.35 2009/10/09 02:20:18 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.36 2009/10/09 03:44:22 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -174,7 +174,7 @@
}
games-mods_src_install() {
- local readme MOD_ICON_EXT new_bin_name bin_name mod files directories i j
+ local readme MOD_ICON_EXT new_bin_name bin_name
INS_DIR=${dir}
# If we have a README, install it
@@ -285,59 +285,35 @@
doins -r * || die "doins -r failed"
fi
- # We are installing everything for these mods into ${INS_DIR}, which should
- # be ${GAMES_DATADIR}/${GAME}/${MOD_DIR} in most cases, and symlinking it
- # into ${GAMES_PREFIX_OPT}/${GAME}/${MOD_DIR} for each game. This should
+ # We are installing everything for these mods into ${INS_DIR},
+ # ${GAMES_DATADIR}/${GAME} in most cases, and symlinking it
+ # into ${GAMES_PREFIX_OPT}/${GAME} for each game. This should
# allow us to support both binary and source-based games easily.
- if [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}" ]] && \
- [[ "${GAMES_PREFIX_OPT}" != "${GAMES_DATADIR}" ]] ; then
- dodir "${GAMES_PREFIX_OPT}"/"${GAME}"
- mod=$(echo "${INS_DIR}" | sed -e "s:${GAMES_DATADIR}/${GAME}::" -e "s:^/::" )
- if [[ -z "${mod}" ]] ; then
- # Our mod doesn't have its own directory. We now traverse the
- # directory structure and try to symlink everything to
- # GAMES_PREFIX_OPT/GAME so it'll work.
- directories=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type d -printf '%P ')
- for i in ${directories} ; do
- if [[ -h "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
- # Skip this directory, and just run a symlink
- dosym "${INS_DIR}"/${i} \
- "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
- elif [[ -d "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} ]] ; then
- dodir "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}
- cd "${D}"/"${INS_DIR}"/${i}
- files="$(find . -type f -printf '%P ')"
- for j in ${files} ; do
- if has_version ${CATEGORY}/${PN} ; then
- dosym "${INS_DIR}"/${i}/${j} \
- "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
- || die
- elif [[ ! -e "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} ]] ; then
- dosym "${INS_DIR}"/${i}/${j} \
- "${GAMES_PREFIX_OPT}"/"${GAME}"/${i}/${j} \
- || die
- fi
- done
+ if [[ ${GAMES_PREFIX_OPT} != ${GAMES_DATADIR} ]] ; then
+ pushd "${D}/${INS_DIR}" > /dev/null || die "pushd failed"
+ local i
+ for i in * ; do
+ if [[ -d ${i} ]] ; then
+ if [[ ${i} == ${MOD_DIR} ]] ; then
+ dosym "${INS_DIR}/${i}" \
+ "${GAMES_PREFIX_OPT}/${GAME}/${i}" \
+ || die "dosym ${i} failed"
else
- # Skip this directory, and just run a symlink
- dosym "${INS_DIR}"/${i} \
- "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
+ local f
+ while read f ; do
+ dosym "${INS_DIR}/${f}" \
+ "${GAMES_PREFIX_OPT}/${GAME}/${f}" \
+ || die "dosym ${f} failed"
+ done < <(find "${i}" -type f)
fi
- done
- files=$(cd "${D}"/"${INS_DIR}";find . -maxdepth 1 -type f -printf '%P ')
- for i in ${files} ; do
- # Why don´t we use symlinks? Because these use ./$bin when
- # they run and that doesn't work if the binary is in
- # GAMES_PREFIX_OPT but the mod is in GAMES_DATADIR.
- # dosym "${INS_DIR}"/${i} \
- # "${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
- cp -a "${D}"/"${INS_DIR}"/${i} \
- ${D}/"${GAMES_PREFIX_OPT}"/"${GAME}"/${i} || die
- done
- elif [[ ! -f "${GAMES_PREFIX_OPT}"/"${GAME}"/${mod} ]] ; then
- elog "Creating symlink for ${mod}"
- dosym "${INS_DIR}" "${GAMES_PREFIX_OPT}"/"${GAME}" || die
- fi
+ elif [[ -f ${i} ]] ; then
+ dosym "${INS_DIR}/${i}" "${GAMES_PREFIX_OPT}/${GAME}/${i}" \
+ || die "dosym ${i} failed"
+ else
+ die "${i} shouldn't be there"
+ fi
+ done
+ popd > /dev/null || die "popd failed"
fi
if games-mods_use_dedicated ; then
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-10 19:56 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-10 19:56 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/10 19:56:06
Modified: games-mods.eclass
Log:
remove MOD_BINS mess
Revision Changes Path
1.37 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.36&r2=1.37
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- games-mods.eclass 9 Oct 2009 03:44:22 -0000 1.36
+++ games-mods.eclass 10 Oct 2009 19:56:06 -0000 1.37
@@ -1,10 +1,9 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.36 2009/10/09 03:44:22 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.37 2009/10/10 19:56:06 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
-# MOD_BINS - Name of the binary to run
# MOD_DESC - Description for the mod
# MOD_DIR - Subdirectory name for the mod, if applicable
# MOD_ICON - Custom icon for the mod, instead of the default
@@ -95,7 +94,7 @@
2)
local pkg
for pkg in $@ ; do
- if [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] ; then
+ if [[ -z ${MOD_DIR} ]] ; then
echo -n " ${pkg}"
else
echo -n " ${pkg}[dedicated=,opengl=]"
@@ -120,7 +119,7 @@
dir=${GAMES_DATADIR}/${GAME}
games-mods_use_opengl() {
- [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
+ [[ -z ${MOD_DIR} ]] && return 1
if use opengl || ! use dedicated ; then
# Use opengl by default
@@ -131,7 +130,7 @@
}
games-mods_use_dedicated() {
- [[ -z ${MOD_BINS} && -z ${MOD_DIR} ]] && return 1
+ [[ -z ${MOD_DIR} ]] && return 1
use dedicated && return 0 || return 1
}
@@ -207,50 +206,7 @@
fi
# Set up command-line and desktop menu entries
- if [[ -n "${MOD_BINS}" ]] ; then
- for binary in ${MOD_BINS} ; do
- if [[ -n "${MOD_DIR}" ]] ; then
- games_make_wrapper "${GAME_EXE}-${MOD_BINS}" \
- "${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
- make_desktop_entry "${GAME_EXE}-${MOD_BINS}" \
- "${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}"
- elif [[ -e "${S}"/bin/"${binary}" ]] ; then
- exeinto "${dir}"
- newexe bin/${binary} ${GAME_EXE}-${binary} \
- || die "newexe failed"
- new_bin_name=
- bin_name=$(echo ${binary} | sed -e 's:[-_.]: :g')
- # We want our wrapper to use the libraries/starting
- # directory of our game. If the game is in
- # GAMES_PREFIX_OPT, then we want to start there.
- if [[ -d "${GAMES_PREFIX_OPT}"/${GAME} ]] ; then
- GAME_DIR="${GAMES_PREFIX_OPT}/${GAME}"
- else
- GAME_DIR="${dir}"
- fi
- games_make_wrapper "${GAME_EXE}-${binary}" \
- ./"${GAME_EXE}-${binary}" "${GAME_DIR}" "${GAME_DIR}"
- if [[ "${bin_name}" == "${binary}" ]] ; then
- bin_name=${MOD_NAME}
- else
- for tmp1 in ${bin_name} ; do
- tmp2=$(echo ${tmp1} | cut -b1 | tr [[:lower:]] \
- [[:upper:]])
- tmp3=$(echo ${tmp1} | cut -b2-)
- new_bin_name="${new_bin_name} ${tmp2}${tmp3}"
- done
- new_bin_name=$(echo ${new_bin_name} | cut -b1-)
- bin_name="${MOD_NAME} (${new_bin_name})"
- fi
- make_desktop_entry "${GAME_EXE}-${binary}" \
- "${GAME_TITLE} - ${bin_name}" "${MOD_ICON}"
- # We remove the binary after we have installed it.
- rm -f bin/${binary}
- fi
- done
- # We don't want to leave the binary directory around
- rm -rf bin
- elif [[ -n "${MOD_DIR}" ]] ; then
+ if [[ -n ${MOD_DIR} ]] ; then
games_make_wrapper "${GAME_EXE}-${PN/${GAME}-}" \
"${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
make_desktop_entry "${GAME_EXE}-${PN/${GAME}-}" \
@@ -337,13 +293,7 @@
games-mods_pkg_postinst() {
games_pkg_postinst
if games-mods_use_opengl ; then
- if [[ -n "${MOD_BINS}" ]] ; then
- for binary in ${MOD_BINS} ; do
- elog "To play this mod run:"
- elog " ${GAME_EXE}-${binary}"
- echo
- done
- elif [[ -n "${MOD_DIR}" ]] ; then
+ if [[ -n ${MOD_DIR} ]] ; then
elog "To play this mod run:"
elog " ${GAME_EXE}-${PN/${GAME}-}"
echo
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-10 20:08 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-10 20:08 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/10 20:08:51
Modified: games-mods.eclass
Log:
remove MOD_TBZ2 mess
Revision Changes Path
1.38 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.37&r2=1.38
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- games-mods.eclass 10 Oct 2009 19:56:06 -0000 1.37
+++ games-mods.eclass 10 Oct 2009 20:08:51 -0000 1.38
@@ -1,14 +1,13 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.37 2009/10/10 19:56:06 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.38 2009/10/10 20:08:51 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
# MOD_DESC - Description for the mod
+# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod
# MOD_DIR - Subdirectory name for the mod, if applicable
# MOD_ICON - Custom icon for the mod, instead of the default
-# MOD_NAME - Creates a command-line wrapper and desktop icon for the mod
-# MOD_TBZ2 - File to extract within the Makeself archive
inherit eutils games
@@ -154,21 +153,6 @@
esac
done
- # This code should only be executed for Makeself archives
- for tarball in ${MOD_TBZ2} ; do
- mkdir -p "${S}"/unpack
- for name in "${tarball}_${PV}-english" "${tarball}_${PV}" "${tarball}" ; do
- for ext in tar.bz2 tar.gz tbz2 tgz ; do
- if [[ -e "${name}.${ext}" ]] ; then
- tar xf "${name}.${ext}" -C "${S}"/unpack \
- || die "uncompressing tarball"
- # Remove the tarball after we unpack it
- rm -f "${name}.${ext}"
- fi
- done
- done
- done
- # Since we remove all of these anyway, let's move it to the eclass
rm -f 3355_patch 3339_patch
}
@@ -228,18 +212,9 @@
fi
fi
- # Copy our unpacked files, if it exists
- if [[ -d "${S}"/unpack ]] ; then
- insinto "${INS_DIR}"
- doins -r "${S}"/unpack/* || die "copying files"
- rm -rf "${S}"/unpack
- fi
-
# We expect anything not wanted to have been deleted by the ebuild
- if [[ ! -z $(ls "${S}"/* 2> /dev/null) ]] ; then
- insinto "${INS_DIR}"
- doins -r * || die "doins -r failed"
- fi
+ insinto "${INS_DIR}"
+ doins -r * || die "doins -r failed"
# We are installing everything for these mods into ${INS_DIR},
# ${GAMES_DATADIR}/${GAME} in most cases, and symlinking it
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-11 0:05 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-11 0:05 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/11 00:05:41
Modified: games-mods.eclass
Log:
remove src_unpack
Revision Changes Path
1.39 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.38&r2=1.39
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- games-mods.eclass 10 Oct 2009 20:08:51 -0000 1.38
+++ games-mods.eclass 11 Oct 2009 00:05:40 -0000 1.39
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.38 2009/10/10 20:08:51 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.39 2009/10/11 00:05:40 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -11,7 +11,7 @@
inherit eutils games
-EXPORT_FUNCTIONS src_unpack src_install pkg_postinst
+EXPORT_FUNCTIONS src_install pkg_postinst
[[ -z ${GAME} ]] && GAME=${PN%%-*}
@@ -134,28 +134,6 @@
use dedicated && return 0 || return 1
}
-games-mods_src_unpack() {
- # The first thing we do here is determine exactly what we're dealing with
- for src_uri in ${A} ; do
- URI_SUFFIX="${src_uri##*.}"
- case ${URI_SUFFIX##*.} in
- bin|run)
- # We have a Makeself archive, use unpack_makeself
- unpack_makeself "${src_uri}"
- # Since this is a Makeself archive, it has a lot of useless
- # files (for us), so we delete them.
- rm -rf setup.data setup.sh uninstall
- ;;
- bz2|gz|Z|z|ZIP|zip)
- # We have a normal tarball/zip file, use unpack
- unpack "${src_uri}"
- ;;
- esac
- done
-
- rm -f 3355_patch 3339_patch
-}
-
games-mods_src_install() {
local readme MOD_ICON_EXT new_bin_name bin_name
INS_DIR=${dir}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-11 0:29 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-11 0:29 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/11 00:29:23
Modified: games-mods.eclass
Log:
mod wrappers shouldn't need to cd or set LD_LIBRARY_PATH because the game wrappers do that
Revision Changes Path
1.40 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.39&r2=1.40
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- games-mods.eclass 11 Oct 2009 00:05:40 -0000 1.39
+++ games-mods.eclass 11 Oct 2009 00:29:23 -0000 1.40
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.39 2009/10/11 00:05:40 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.40 2009/10/11 00:29:23 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -170,7 +170,7 @@
# Set up command-line and desktop menu entries
if [[ -n ${MOD_DIR} ]] ; then
games_make_wrapper "${GAME_EXE}-${PN/${GAME}-}" \
- "${GAME_EXE} ${SELECT_MOD}${MOD_DIR}" "${dir}" "${dir}"
+ "${GAME_EXE} ${SELECT_MOD}${MOD_DIR}"
make_desktop_entry "${GAME_EXE}-${PN/${GAME}-}" \
"${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}"
# Since only quake3 has both a binary and a source-based install,
@@ -179,8 +179,7 @@
"quake3")
if has_version games-fps/quake3-bin ; then
games_make_wrapper "${GAME_EXE}-bin-${PN/${GAME}-}" \
- "${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}" \
- "${dir}" "${dir}"
+ "${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}"
fi
make_desktop_entry "${GAME_EXE}-bin-${PN/${GAME}-}" \
"${GAME_TITLE} - ${MOD_NAME} (binary)" \
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-11 11:50 Markus Meier (maekke)
0 siblings, 0 replies; 27+ messages in thread
From: Markus Meier (maekke) @ 2009-10-11 11:50 UTC (permalink / raw
To: gentoo-commits
maekke 09/10/11 11:50:21
Modified: games-mods.eclass
Log:
whitespace
Revision Changes Path
1.41 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.40&r2=1.41
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- games-mods.eclass 11 Oct 2009 00:29:23 -0000 1.40
+++ games-mods.eclass 11 Oct 2009 11:50:21 -0000 1.41
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.40 2009/10/11 00:29:23 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.41 2009/10/11 11:50:21 maekke Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -234,7 +234,7 @@
fi
games_make_wrapper \
${GAME_EXE}-${PN/${GAME}-}-ded \
- "${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS}"
+ "${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS}"
games-mods_make_initd
games-mods_make_confd
fi
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass
@ 2009-10-12 0:53 Tristan Heaven (nyhm)
0 siblings, 0 replies; 27+ messages in thread
From: Tristan Heaven (nyhm) @ 2009-10-12 0:53 UTC (permalink / raw
To: gentoo-commits
nyhm 09/10/12 00:53:52
Modified: games-mods.eclass
Log:
support symlinking files to more than one directory; mod support for ut2004-ded; fix init scripts; cleanup
Revision Changes Path
1.42 eclass/games-mods.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.41&r2=1.42
Index: games-mods.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- games-mods.eclass 11 Oct 2009 11:50:21 -0000 1.41
+++ games-mods.eclass 12 Oct 2009 00:53:51 -0000 1.42
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.41 2009/10/11 11:50:21 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.42 2009/10/12 00:53:51 nyhm Exp $
# Variables to specify in an ebuild which uses this eclass:
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-"
@@ -15,107 +15,134 @@
[[ -z ${GAME} ]] && GAME=${PN%%-*}
-# Set our default title, icon, and cli options
case ${GAME} in
doom3)
GAME_PKGS="games-fps/doom3"
- GAME_TITLE="Doom 3"
- DEFAULT_MOD_ICON="doom3"
- SELECT_MOD="+set fs_game "
- GAME_EXE="doom3"
- DED_EXE="doom3-ded"
- DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ GAME_DIRS=( "${GAMES_PREFIX_OPT}"/doom3 )
+ GAME_NAME="Doom 3"
+ GAME_BIN="doom3"
+ GAME_ICON="doom3"
+ DED_PKGS=""
+ DED_BIN="doom3-ded"
+ DED_OPTS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".doom3"
+ SELECT_MOD="+set fs_game "
;;
enemy-territory)
GAME_PKGS="games-fps/enemy-territory"
- GAME_TITLE="Enemy Territory"
- DEFAULT_MOD_ICON="ET"
- SELECT_MOD="+set fs_game "
- GAME_EXE="et"
- DED_EXE="et-ded"
- DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ GAME_DIRS=( "${GAMES_PREFIX_OPT}"/enemy-territory )
+ GAME_NAME="Enemy Territory"
+ GAME_BIN="et"
+ GAME_ICON="ET"
+ DED_PKGS=""
+ DED_BIN="et-ded"
+ DED_OPTS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".etwolf"
+ SELECT_MOD="+set fs_game "
;;
quake3)
GAME_PKGS="games-fps/quake3 games-fps/quake3-bin"
- GAME_TITLE="Quake III"
- DEFAULT_MOD_ICON="quake3"
- SELECT_MOD="+set fs_game "
- GAME_EXE="quake3"
- DED_EXE="quake3-ded"
- DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ GAME_DIRS=( "${GAMES_DATADIR}"/quake3 "${GAMES_PREFIX_OPT}"/quake3 )
+ GAME_NAME="Quake III"
+ GAME_BIN="quake3"
+ GAME_ICON="quake3"
+ DED_PKGS=""
+ DED_BIN="quake3-ded"
+ DED_OPTS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".q3a"
+ SELECT_MOD="+set fs_game "
;;
quake4)
GAME_PKGS="games-fps/quake4-bin"
- GAME_TITLE="Quake 4"
- DEFAULT_MOD_ICON="/usr/share/pixmaps/quake4.bmp"
- SELECT_MOD="+set fs_game "
- GAME_EXE="quake4"
- DED_EXE="quake4-ded"
- DED_OPTIONS="+set dedicated 1 +exec server.cfg"
+ GAME_DIRS=( "${GAMES_PREFIX_OPT}"/quake4 )
+ GAME_NAME="Quake 4"
+ GAME_BIN="quake4"
+ GAME_ICON="/usr/share/pixmaps/quake4.bmp"
+ DED_PKGS=""
+ DED_BIN="quake4-ded"
+ DED_OPTS="+set dedicated 1 +exec server.cfg"
DED_CFG_DIR=".quake4"
+ SELECT_MOD="+set fs_game "
;;
ut2003)
GAME_PKGS="games-fps/ut2003"
- GAME_TITLE="UT2003"
- DEFAULT_MOD_ICON="ut2003"
- SELECT_MOD="-mod="
- GAME_EXE="ut2003"
- DED_EXE="ucc"
- DED_OPTIONS=""
+ GAME_DIRS=( "${GAMES_PREFIX_OPT}"/ut2003 )
+ GAME_NAME="UT2003"
+ GAME_BIN="ut2003"
+ GAME_ICON="ut2003"
+ DED_PKGS=""
+ DED_BIN="ucc"
+ DED_OPTS=""
DED_CFG_DIR=""
+ SELECT_MOD="-mod="
;;
ut2004)
GAME_PKGS="games-fps/ut2004"
- GAME_TITLE="UT2004"
- DEFAULT_MOD_ICON="ut2004"
- SELECT_MOD="-mod="
- GAME_EXE="ut2004"
- DED_EXE="ut2004-ded"
- DED_OPTIONS=""
+ GAME_DIRS=( "${GAMES_PREFIX_OPT}"/{ut2004,ut2004-ded} )
+ GAME_NAME="UT2004"
+ GAME_BIN="ut2004"
+ GAME_ICON="ut2004"
+ DED_PKGS="games-server/ut2004-ded"
+ DED_BIN="ut2004-ded"
+ DED_OPTS=""
DED_CFG_DIR=""
+ SELECT_MOD="-mod="
;;
*)
eerror "This game is either not supported or you must set the GAME"
eerror "variable to the proper game."
- die "unsupported game"
+ die "games-mods.eclass: unsupported GAME"
;;
esac
+MOD_BIN="${GAME_BIN}-${PN/${GAME}-}"
+MOD_DED_BIN="${MOD_BIN}-ded"
+
games-mods_get_rdepend() {
- [[ $# -lt 1 ]] && die "${FUNCNAME}: need args"
- [[ $# -gt 1 ]] && echo -n "|| ( "
+ local pkgs
+
+ if [[ ${1} == "--ded" ]] ; then
+ pkgs=( ${DED_PKGS} ${GAME_PKGS} )
+ else
+ pkgs=( ${GAME_PKGS} )
+ fi
+
+ [[ ${#pkgs[@]} -gt 1 ]] && echo -n "|| ( "
case ${EAPI:-0} in
- 0|1) echo -n $@ ;;
+ 0|1) echo -n "${pkgs[@]}" ;;
2)
- local pkg
- for pkg in $@ ; do
- if [[ -z ${MOD_DIR} ]] ; then
- echo -n " ${pkg}"
- else
- echo -n " ${pkg}[dedicated=,opengl=]"
- fi
- done
+ local p
+ if [[ ${1} == "--ded" ]] ; then
+ echo -n "${DED_PKGS}"
+ for p in ${GAME_PKGS} ; do
+ echo -n " ${p}[dedicated]"
+ done
+ else
+ for p in ${GAME_PKGS} ; do
+ echo -n " || ( ${p}[opengl] ${p}[-dedicated] )"
+ done
+ fi
;;
esac
- [[ $# -gt 1 ]] && echo -n " )"
+ [[ ${#pkgs[@]} -gt 1 ]] && echo -n " )"
}
-DESCRIPTION="${GAME_TITLE} ${MOD_NAME} - ${MOD_DESC}"
+DESCRIPTION="${GAME_NAME} ${MOD_NAME} - ${MOD_DESC}"
SLOT="0"
+IUSE="dedicated opengl"
RESTRICT="mirror strip"
DEPEND="app-arch/unzip"
-RDEPEND="$(games-mods_get_rdepend ${GAME_PKGS})"
+RDEPEND="dedicated? ( $(games-mods_get_rdepend --ded) )
+ opengl? ( $(games-mods_get_rdepend) )
+ !dedicated? ( !opengl? ( $(games-mods_get_rdepend) ) )"
S=${WORKDIR}
-dir=${GAMES_DATADIR}/${GAME}
+INS_DIR=${GAMES_DATADIR}/${GAME}
games-mods_use_opengl() {
[[ -z ${MOD_DIR} ]] && return 1
@@ -134,135 +161,41 @@
use dedicated && return 0 || return 1
}
-games-mods_src_install() {
- local readme MOD_ICON_EXT new_bin_name bin_name
- INS_DIR=${dir}
-
- # If we have a README, install it
- for readme in README* ; do
- if [[ -s "${readme}" ]] ; then
- dodoc "${readme}" || die "dodoc failed"
- fi
- done
-
- if games-mods_use_opengl ; then
- if [[ -n "${MOD_ICON}" ]] ; then
- # Install custom icon
- MOD_ICON_EXT=${MOD_ICON##*.}
- if [[ -f ${MOD_ICON} ]] ; then
- newicon "${MOD_ICON}" ${PN}.${MOD_ICON_EXT}
- else
- newicon ${MOD_DIR}/"${MOD_ICON}" ${PN}.${MOD_ICON_EXT}
- fi
- case ${MOD_ICON_EXT} in
- bmp|ico)
- MOD_ICON=/usr/share/pixmaps/${PN}.${MOD_ICON_EXT}
- ;;
- *)
- MOD_ICON=${PN}
- ;;
- esac
- else
- # Use the game's standard icon
- MOD_ICON=${DEFAULT_MOD_ICON}
- fi
-
- # Set up command-line and desktop menu entries
- if [[ -n ${MOD_DIR} ]] ; then
- games_make_wrapper "${GAME_EXE}-${PN/${GAME}-}" \
- "${GAME_EXE} ${SELECT_MOD}${MOD_DIR}"
- make_desktop_entry "${GAME_EXE}-${PN/${GAME}-}" \
- "${GAME_TITLE} - ${MOD_NAME}" "${MOD_ICON}"
- # Since only quake3 has both a binary and a source-based install,
- # we only look for quake3 here.
- case "${GAME_EXE}" in
- "quake3")
- if has_version games-fps/quake3-bin ; then
- games_make_wrapper "${GAME_EXE}-bin-${PN/${GAME}-}" \
- "${GAME_EXE}-bin ${SELECT_MOD}${MOD_DIR}"
- fi
- make_desktop_entry "${GAME_EXE}-bin-${PN/${GAME}-}" \
- "${GAME_TITLE} - ${MOD_NAME} (binary)" \
- "${MOD_ICON}"
- ;;
- esac
- fi
- fi
-
- # We expect anything not wanted to have been deleted by the ebuild
- insinto "${INS_DIR}"
- doins -r * || die "doins -r failed"
-
+games-mods_dosyms() {
# We are installing everything for these mods into ${INS_DIR},
# ${GAMES_DATADIR}/${GAME} in most cases, and symlinking it
# into ${GAMES_PREFIX_OPT}/${GAME} for each game. This should
# allow us to support both binary and source-based games easily.
- if [[ ${GAMES_PREFIX_OPT} != ${GAMES_DATADIR} ]] ; then
+ local dir
+ for dir in "${GAME_DIRS[@]}" ; do
+ [[ -z ${dir} || ${INS_DIR} == ${dir} ]] && continue
pushd "${D}/${INS_DIR}" > /dev/null || die "pushd failed"
local i
for i in * ; do
if [[ -d ${i} ]] ; then
if [[ ${i} == ${MOD_DIR} ]] ; then
- dosym "${INS_DIR}/${i}" \
- "${GAMES_PREFIX_OPT}/${GAME}/${i}" \
+ dosym "${INS_DIR}/${i}" "${dir}/${i}" \
|| die "dosym ${i} failed"
else
local f
while read f ; do
- dosym "${INS_DIR}/${f}" \
- "${GAMES_PREFIX_OPT}/${GAME}/${f}" \
+ dosym "${INS_DIR}/${f}" "${dir}/${f}" \
|| die "dosym ${f} failed"
done < <(find "${i}" -type f)
fi
elif [[ -f ${i} ]] ; then
- dosym "${INS_DIR}/${i}" "${GAMES_PREFIX_OPT}/${GAME}/${i}" \
+ dosym "${INS_DIR}/${i}" "${dir}/${i}" \
|| die "dosym ${i} failed"
else
die "${i} shouldn't be there"
fi
done
popd > /dev/null || die "popd failed"
- fi
-
- if games-mods_use_dedicated ; then
- if [[ -f ${FILESDIR}/server.cfg ]] ; then
- insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
- doins "${FILESDIR}"/server.cfg || die "Copying server config"
- dodir "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
- "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg
- fi
- games_make_wrapper \
- ${GAME_EXE}-${PN/${GAME}-}-ded \
- "${DED_EXE} ${SELECT_MOD}${MOD_DIR} ${DED_OPTIONS}"
- games-mods_make_initd
- games-mods_make_confd
- fi
-
- prepgamesdirs
-}
-
-games-mods_pkg_postinst() {
- games_pkg_postinst
- if games-mods_use_opengl ; then
- if [[ -n ${MOD_DIR} ]] ; then
- elog "To play this mod run:"
- elog " ${GAME_EXE}-${PN/${GAME}-}"
- echo
- fi
- fi
- if games-mods_use_dedicated ; then
- elog "To launch a dedicated server run:"
- elog " ${GAME_EXE}-${PN/${GAME}-}-ded"
- echo
- elog "To launch server at startup run:"
- elog " rc-update add ${GAME_EXE}-${PN/${GAME}-}-ded default"
- echo
- fi
+ done
}
games-mods_make_initd() {
- cat <<EOF > "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded
+ cat <<EOF > "${T}"/${MOD_DED_BIN}
#!/sbin/runscript
$(head -n 2 ${PORTDIR}/header.txt)
# Generated by games-mods.eclass
@@ -272,30 +205,115 @@
}
start() {
- ebegin "Starting ${GAME_TITLE} ${MOD_NAME} dedicated server"
- start-stop-daemon --start --quiet --background --chuid \\
- ${GAMES_USER_DED}:${GAMES_GROUP} --env HOME="${GAMES_PREFIX}" --exec \\
- ${GAMES_BINDIR}/${GAME_EXE}-${PN/${GAME}-}-ded -- \\
- \${${GAME_EXE}_${PN/${GAME}-}_opts}
+ ebegin "Starting ${MOD_DED_BIN}"
+ start-stop-daemon --start --quiet --background --make-pidfile \\
+ --pidfile /var/run/${MOD_DED_BIN}.pid \\
+ --chuid \${${MOD_DED_BIN//-/_}_user}:\${${MOD_DED_BIN//-/_}_group} \\
+ --env HOME="\${${MOD_DED_BIN//-/_}_home}" \\
+ --exec "${GAMES_BINDIR}/${MOD_DED_BIN}" \\
+ -- \${${MOD_DED_BIN//-/_}_opts}
eend \$?
}
stop() {
- ebegin "Stopping ${GAME_TITLE} ${MOD_NAME} dedicated server"
- start-stop-daemon --stop --quiet --exec \\
- ${GAMES_BINDIR}/${GAME_EXE}-${PN/${GAME}-}-ded
+ ebegin "Stopping ${MOD_DED_BIN}"
+ start-stop-daemon --stop \\
+ --pidfile /var/run/${MOD_DED_BIN}.pid
eend \$?
}
EOF
- doinitd "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded || die "doinitd failed"
+ doinitd "${T}"/${MOD_DED_BIN} || die "doinitd failed"
}
games-mods_make_confd() {
- cat <<-EOF > "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded
+ cat <<-EOF > "${T}"/${MOD_DED_BIN}
+ # User and group the server should run as
+ ${MOD_DED_BIN//-/_}_user="${GAMES_USER_DED}"
+ ${MOD_DED_BIN//-/_}_group="${GAMES_GROUP}"
+
+ # Directory to use for HOME
+ ${MOD_DED_BIN//-/_}_home="${GAMES_PREFIX}"
+
# Any extra options you want to pass to the dedicated server
- ${GAME_EXE}_${PN/${GAME}-}_opts=""
+ ${MOD_DED_BIN//-/_}_opts=""
EOF
- doconfd "${T}"/${GAME_EXE}-${PN/${GAME}-}-ded || die "doconfd failed"
+ doconfd "${T}"/${MOD_DED_BIN} || die "doconfd failed"
+}
+
+games-mods_src_install() {
+ if games-mods_use_opengl ; then
+ if [[ -n ${MOD_ICON} ]] ; then
+ # Install custom icon
+ local ext=${MOD_ICON##*.}
+ if [[ -f ${MOD_ICON} ]] ; then
+ newicon "${MOD_ICON}" ${PN}.${ext} || die "newicon failed"
+ else
+ newicon ${MOD_DIR}/"${MOD_ICON}" ${PN}.${ext} \
+ || die "newicon failed"
+ fi
+ case ${ext} in
+ bmp|ico)
+ MOD_ICON=/usr/share/pixmaps/${PN}.${ext}
+ ;;
+ *)
+ MOD_ICON=${PN}
+ ;;
+ esac
+ else
+ # Use the game's standard icon
+ MOD_ICON=${GAME_ICON}
+ fi
+
+ games_make_wrapper ${MOD_BIN} "${GAME_BIN} ${SELECT_MOD}${MOD_DIR}"
+ make_desktop_entry ${MOD_BIN} "${GAME_NAME} - ${MOD_NAME}" "${MOD_ICON}"
+ # Since only quake3 has both a binary and a source-based install,
+ # we only look for quake3 here.
+ case ${GAME} in
+ quake3)
+ if has_version games-fps/quake3-bin ; then
+ games_make_wrapper ${GAME_BIN}-bin-${PN/${GAME}-} \
+ "${GAME_BIN}-bin ${SELECT_MOD}${MOD_DIR}"
+ fi
+ make_desktop_entry ${GAME_BIN}-bin-${PN/${GAME}-} \
+ "${GAME_NAME} - ${MOD_NAME} (binary)" "${MOD_ICON}"
+ ;;
+ esac
+ fi
+
+ # We expect anything not wanted to have been deleted by the ebuild
+ insinto "${INS_DIR}"
+ doins -r * || die "doins -r failed"
+ games-mods_dosyms
+
+ if games-mods_use_dedicated ; then
+ if [[ -f ${FILESDIR}/server.cfg ]] ; then
+ insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}
+ doins "${FILESDIR}"/server.cfg || die "doins server.cfg failed"
+ dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \
+ "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg \
+ || die "dosym server.cfg failed"
+ fi
+ games_make_wrapper ${MOD_DED_BIN} \
+ "\"${GAMES_BINDIR}/${DED_BIN}\" ${SELECT_MOD}${MOD_DIR} ${DED_OPTS}"
+ games-mods_make_initd
+ games-mods_make_confd
+ fi
+
+ prepgamesdirs
+}
+
+games-mods_pkg_postinst() {
+ games_pkg_postinst
+ if games-mods_use_opengl ; then
+ elog "To play this mod run:"
+ elog " ${MOD_BIN}"
+ fi
+ if games-mods_use_dedicated ; then
+ elog "To launch a dedicated server run:"
+ elog " ${MOD_DED_BIN}"
+ elog "To launch the server at startup run:"
+ elog " rc-update add ${MOD_DED_BIN} default"
+ fi
}
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2009-10-12 0:53 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 13:15 [gentoo-commits] gentoo-x86 commit in eclass: games-mods.eclass Tristan Heaven (nyhm)
-- strict thread matches above, loose matches on Subject: below --
2009-10-12 0:53 Tristan Heaven (nyhm)
2009-10-11 11:50 Markus Meier (maekke)
2009-10-11 0:29 Tristan Heaven (nyhm)
2009-10-11 0:05 Tristan Heaven (nyhm)
2009-10-10 20:08 Tristan Heaven (nyhm)
2009-10-10 19:56 Tristan Heaven (nyhm)
2009-10-09 3:44 Tristan Heaven (nyhm)
2009-10-09 2:20 Tristan Heaven (nyhm)
2009-10-06 13:37 Tristan Heaven (nyhm)
2009-10-06 13:07 Tristan Heaven (nyhm)
2009-10-06 12:59 Tristan Heaven (nyhm)
2009-10-04 14:13 Tristan Heaven (nyhm)
2009-10-02 4:56 Tristan Heaven (nyhm)
2009-10-01 22:36 Tristan Heaven (nyhm)
2009-10-01 19:55 Tristan Heaven (nyhm)
2009-10-01 16:18 Tristan Heaven (nyhm)
2009-10-01 16:03 Tristan Heaven (nyhm)
2009-10-01 14:05 Tristan Heaven (nyhm)
2009-10-01 13:35 Tristan Heaven (nyhm)
2009-09-30 23:58 Tristan Heaven (nyhm)
2009-09-30 23:40 Tristan Heaven (nyhm)
2009-09-30 20:27 Tristan Heaven (nyhm)
2009-09-30 19:47 Tristan Heaven (nyhm)
2009-08-02 7:29 Michael Sterrett (mr_bones_)
2008-02-13 19:54 Michael Sterrett (mr_bones_)
2007-09-15 0:42 Chris Gianelloni (wolf31o2)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox