more
authorMike Frysinger <vapier@gentoo.org>
Wed, 6 Nov 2002 05:53:33 +0000 (05:53 +0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 6 Nov 2002 05:53:33 +0000 (05:53 +0000)
eclass/games.eclass

index 78f3049d7d7b1e3ffb56c8a9b611298d9ce7be59..d706535346b3458ac1219da3327cb73d9b4435c6 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2000 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.4 2002/11/05 19:55:30 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.5 2002/11/06 05:53:33 vapier Exp $
 
 # devlist: {bass,phoenix,vapier}@gentoo.org
 # This is the games ebuild for standardizing the install of games ...
 ECLASS=games
 INHERITED="$INHERITED $ECLASS"
 
+EXPORT_FUNCTIONS pkg_postinst
+
 export GAMES_PREFIX="/usr/games"
+export GAMES_PREFIX_OPT="/opt/${PN}"
 export GAMES_DATADIR="/usr/share/games/${PN}"
 export GAMES_SYSCONFDIR="/etc/games/${PN}"
 export GAMES_STATEDIR="/var/games"
-export GAMES_PREFIX_OPT="/opt/${PN}"
+export GAMES_LIBDIR="/usr/games/lib"
+export GAMES_BINDIR="/usr/games/bin"
+export GAMES_ENVD="90games"
+export GAMES_USER="root"
 export GAMES_GROUP="games"
 
 egameconf() {
@@ -34,7 +40,7 @@ egameconf() {
 }
 
 gameswrapper() {
-       local olddtree=${DESTTREE}
+       local oldtree=${DESTTREE}
        into ${GAMES_PREFIX}
        local cmd="do$1"; shift
        ${cmd} $@
@@ -46,3 +52,11 @@ dogamesbin() { gameswrapper sbin $@; }
 dogamelib() { gameswrapper lib $@; }
 dogamelib.a() { gameswrapper lib.a $@; }
 dogamelib.so() { gameswrapper lib.so $@; }
+
+gameowners() { chown ${GAMES_USER}.${GAMES_ROOT} $@; }
+gameperms() { chmod ug+r,o-rwx $@; }
+
+games_pkg_postinst() {
+       echo "LDPATH=\"${GAMES_LIBDIR}\"" > /etc/env.d/${GAMES_ENVD}
+       echo "PATH=\"${GAMES_BINDIR}\"" >> /etc/env.d/${GAMES_ENVD}
+}