diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2005-05-24 20:39:29 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2005-05-24 20:39:29 +0000 |
commit | 3655868b044a4886b9a6112784ed73349ebe0709 (patch) | |
tree | 599ebd377af9cf7cb9aeb89db580eb4a0343ff93 /eclass/games.eclass | |
parent | Fix libdir path in libtool file. (diff) | |
download | historical-3655868b044a4886b9a6112784ed73349ebe0709.tar.gz historical-3655868b044a4886b9a6112784ed73349ebe0709.tar.bz2 historical-3655868b044a4886b9a6112784ed73349ebe0709.zip |
handle highscore saving in games_pkg_preinst instead of src_install.
Added commented for code review.
Diffstat (limited to 'eclass/games.eclass')
-rw-r--r-- | eclass/games.eclass | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/eclass/games.eclass b/eclass/games.eclass index 29448a0919e2..0f496f56421f 100644 --- a/eclass/games.eclass +++ b/eclass/games.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.94 2005/05/17 07:03:58 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.95 2005/05/24 20:39:29 mr_bones_ Exp $ # # devlist: {vapier,wolf31o2,mr_bones_}@gentoo.org -> games@gentoo.org # @@ -13,6 +13,8 @@ inherit eutils gnuconfig ECLASS=games INHERITED="$INHERITED $ECLASS" +# CHECKME +#EXPORT_FUNCTIONS pkg_preinst pkg_postinst src_compile pkg_setup EXPORT_FUNCTIONS pkg_postinst src_compile pkg_setup DESCRIPTION="Based on the ${ECLASS} eclass" @@ -124,9 +126,14 @@ prepgamesdirs() { die "refusing to merge a setuid root game" fi done + # CHECKME - remove for f in $(find "${D}/${GAMES_STATEDIR}" -type f -printf '%P ' 2>/dev/null) ; do if [[ -e ${ROOT}/${GAMES_STATEDIR}/${f} ]] ; then - cp -p "${ROOT}/${GAMES_STATEDIR}/${f}" "${D}/${GAMES_STATEDIR}/${f}" + cp -p \ + "${ROOT}/${GAMES_STATEDIR}/${f}" \ + "${D}/${GAMES_STATEDIR}/${f}" \ + || die "cp failed" + # make the date match the rest of the install touch "${D}/${GAMES_STATEDIR}/${f}" fi done @@ -160,7 +167,7 @@ games_pkg_setup() { # Dear portage team, we are so sorry. Lots of love, games team. # See Bug #61680 [[ $(getent passwd "${GAMES_USER_DED}" | cut -f7 -d:) == "/bin/false" ]] \ - && usermod -s /bin/bash "${GAMES_USER_DED}" + && usermod -s /bin/bash "${GAMES_USER_DED}" } games_src_compile() { @@ -168,6 +175,22 @@ games_src_compile() { [ -e [Mm]akefile ] && { emake || die "emake failed"; } } +# CHECKME +#games_pkg_preinst() { +# local f +# +# for f in $(find "${IMAGE}/${GAMES_STATEDIR}" -type f -printf '%P ' 2>/dev/null) ; do +# if [[ -e ${ROOT}/${GAMES_STATEDIR}/${f} ]] ; then +# cp -p \ +# "${ROOT}/${GAMES_STATEDIR}/${f}" \ +# "${IMAGE}/${GAMES_STATEDIR}/${f}" \ +# || die "cp failed" +# # make the date match the rest of the install +# touch "${IMAGE}/${GAMES_STATEDIR}/${f}" +# fi +# done +#} + # pkg_postinst function ... create env.d entry and warn about games group games_pkg_postinst() { gamesenv |