diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/games-mods.eclass | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/eclass/games-mods.eclass b/eclass/games-mods.eclass index 629c803cc693..5e66146d6793 100644 --- a/eclass/games-mods.eclass +++ b/eclass/games-mods.eclass @@ -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 @@ games-mods_src_install() { # 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-mods_src_install() { "${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 @@ games-mods_pkg_postinst() { 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_pkg_postinst() { } 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 @@ 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}-${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" } |