summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-10-30 03:38:24 +0000
committerMike Frysinger <vapier@gentoo.org>2006-10-30 03:38:24 +0000
commit05fd9109468304d6199ea9981bb65f1f57df0391 (patch)
treea2606e426154e6da48341d367a780b3e515e8243 /games-action/armagetronad
parentMask +games-action/phobiaiii +media-libs/allegttf +games-strategy/magnant for... (diff)
downloadgentoo-2-05fd9109468304d6199ea9981bb65f1f57df0391.tar.gz
gentoo-2-05fd9109468304d6199ea9981bb65f1f57df0391.tar.bz2
gentoo-2-05fd9109468304d6199ea9981bb65f1f57df0391.zip
Make the wrapper scripts less sucky #153338 by Richard Freeman.
(Portage version: 2.1.2_rc1-r1)
Diffstat (limited to 'games-action/armagetronad')
-rw-r--r--games-action/armagetronad/ChangeLog6
-rw-r--r--games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild38
-rw-r--r--games-action/armagetronad/files/armagetronad51
-rw-r--r--games-action/armagetronad/files/armagetronad-ded60
4 files changed, 68 insertions, 87 deletions
diff --git a/games-action/armagetronad/ChangeLog b/games-action/armagetronad/ChangeLog
index 75c6e51d780f..720303c503bd 100644
--- a/games-action/armagetronad/ChangeLog
+++ b/games-action/armagetronad/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-action/armagetronad
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/armagetronad/ChangeLog,v 1.10 2006/10/28 07:40:37 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/armagetronad/ChangeLog,v 1.11 2006/10/30 03:38:24 vapier Exp $
+
+ 30 Oct 2006; Mike Frysinger <vapier@gentoo.org> files/armagetronad,
+ files/armagetronad-ded, armagetronad-0.2.7.1-r1.ebuild:
+ Make the wrapper scripts less sucky #153338 by Richard Freeman.
28 Oct 2006; <tupone@gentoo.org> files/armagetronad-ded,
-armagetronad-0.2.7.1.ebuild, armagetronad-0.2.7.1-r1.ebuild:
diff --git a/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild b/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild
index c552ef10fdbf..6017e33d1e68 100644
--- a/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild
+++ b/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild
@@ -1,9 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild,v 1.3 2006/10/28 07:40:37 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/armagetronad/armagetronad-0.2.7.1-r1.ebuild,v 1.4 2006/10/30 03:38:24 vapier Exp $
-
-inherit flag-o-matic eutils games
+inherit eutils games
DESCRIPTION="3d tron lightcycles, just like the movie"
HOMEPAGE="http://armagetronad.sourceforge.net/"
@@ -26,7 +25,8 @@ RDEPEND="
media-libs/libsdl
media-libs/sdl-image
media-libs/jpeg
- media-libs/libpng )"
+ media-libs/libpng
+ )"
DEPEND="${RDEPEND}
!dedicated? ( app-arch/unzip )"
@@ -35,23 +35,20 @@ src_unpack() {
cd "${S}"
epatch "${FILESDIR}"/${P}-gcc4.patch
epatch "${FILESDIR}"/${P}-security-1.patch
- if use dedicated; then
- cp "${FILESDIR}"/${PN}-ded .
+ if use dedicated ; then
+ cp "${FILESDIR}"/${PN}-ded "${FILESDIR}"/${PN} . || die
sed -i \
-e "s:@GAMES_SYSCONFDIR@:${GAMES_SYSCONFDIR}:" \
-e "s:@GAMES_LIBDIR@:${GAMES_LIBDIR}:" \
-e "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \
- ${PN}-ded
+ ${PN}-ded ${PN}
fi
}
src_compile() {
- filter-flags -fno-exceptions
- if use dedicated; then
- egamesconf --disable-glout || die "egamesconf failed"
- else
- egamesconf || die "egamesconf failed"
- fi
+ local myconf=""
+ use dedicated && myconf="--disable-glout"
+ egamesconf ${myconf} || die "egamesconf failed"
emake || die "emake failed"
make documentation || "make doc failed"
}
@@ -62,7 +59,7 @@ src_install() {
dohtml doc/net/*.html
newicon tron.ico ${PN}.ico
exeinto "${GAMES_LIBDIR}/${PN}"
- if use dedicated; then
+ if use dedicated ; then
doexe src/tron/${PN}-dedicated || die "copying files"
else
doexe src/tron/${PN} || die "copying files"
@@ -70,21 +67,20 @@ src_install() {
doexe src/network/armagetronad-* || die "copying files"
insinto "${GAMES_DATADIR}/${PN}"
doins -r log language || die "copying files"
- if ! use dedicated; then
+ if ! use dedicated ; then
doins -r arenas models sound textures music || die "copying files"
fi
insinto "${GAMES_SYSCONFDIR}/${PN}"
doins -r config/* || die "copying files"
- if use dedicated; then
- dogamesbin ${PN}-ded
- fi
cd "${S}"
- insinto "${GAMES_DATADIR}/${PN}"
- if ! use dedicated; then
- dogamesbin "${FILESDIR}/${PN}"
+ if ! use dedicated ; then
+ insinto "${GAMES_DATADIR}/${PN}"
+ dogamesbin ${PN} || die
insinto "${GAMES_DATADIR}/${PN}"
doins -r ../moviepack ../moviesounds || die "copying movies"
make_desktop_entry armagetronad "Armagetron Advanced" ${PN}.ico
+ else
+ dogamesbin ${PN}-ded || die
fi
prepgamesdirs
}
diff --git a/games-action/armagetronad/files/armagetronad b/games-action/armagetronad/files/armagetronad
index fe647e03a56b..bf362ebbad75 100644
--- a/games-action/armagetronad/files/armagetronad
+++ b/games-action/armagetronad/files/armagetronad
@@ -2,38 +2,35 @@
#
# starts Armagetron Advanced from the installation directory
-GAMES_LIBDIR=/usr/games/lib/armagetronad
-GAMES_DATADIR=/usr/share/games
-GAMES_SYSCONFDIR=/etc/games
+GAMES_LIBDIR="@GAMES_LIBDIR@/armagetronad"
+GAMES_DATADIR="@GAMES_DATADIR@"
+GAMES_SYSCONFDIR="@GAMES_SYSCONFDIR@"
PN=armagetronad
-if test ! -r $HOME/.armagetronad ; then
- mkdir $HOME/.armagetronad
- if test -r $HOME/.ArmageTronrc ; then
- #migrage very old configuration
- echo "Porting very old configuration..."
- mkdir $HOME/.armagetronad/var
- mv $HOME/.ArmageTronrc $HOME/.armagetronad/var/user.cfg
- fi
-fi
-
-if test ! -r $HOME/.armagetronad/var ; then
- #migrate old configuration
- files=$( find $HOME/.armagetronad -type f -maxdepth 1 )
+if test ! -r "${HOME}"/.armagetronad ; then
+ mkdir "${HOME}"/.armagetronad
- mkdir $HOME/.armagetronad/var
-
- test "$files" != "" && echo "Porting old configuration..." && mv $files $HOME/.armagetronad/var
+ if test -r "${HOME}"/.ArmageTronrc ; then
+ # migrage very old configuration
+ echo "Porting very old configuration..."
+ mkdir "${HOME}"/.armagetronad/var
+ mv "${HOME}"/.ArmageTronrc "${HOME}"/.armagetronad/var/user.cfg
+ fi
fi
-if test "x$1" = "x-h" ; then
- echo -e "\n\nTo uninstall Armagetron Advanced, type armagetronad --uninstall."
-fi
+if test ! -r "${HOME}"/.armagetronad/var ; then
+ #migrate old configuration
+ files=$( find "${HOME}"/.armagetronad -type f -maxdepth 1 )
-if test "x$1" = "x--uninstall" ; then
- emerge unmerge armagetronad
-else
- $GAMES_LIBDIR/$PN --datadir $GAMES_DATADIR/$PN --configdir $GAMES_SYSCONFDIR/$PN \
- --userdatadir $HOME/.armagetronad $*
+ mkdir "${HOME}"/.armagetronad/var
+ if test "$files" != "" ; then
+ echo "Porting old configuration..."
+ mv $files "${HOME}"/.armagetronad/var
+ fi
fi
+exec \
+"${GAMES_LIBDIR}"/${PN} \
+ --datadir "${GAMES_DATADIR}"/${PN} \
+ --configdir "${GAMES_SYSCONFDIR}"/${PN} \
+ --userdatadir "${HOME}"/.armagetronad "$@"
diff --git a/games-action/armagetronad/files/armagetronad-ded b/games-action/armagetronad/files/armagetronad-ded
index 82a23e1721b6..a28dc3bf3b2b 100644
--- a/games-action/armagetronad/files/armagetronad-ded
+++ b/games-action/armagetronad/files/armagetronad-ded
@@ -2,47 +2,31 @@
#
# starts Armagetron Advanced Dedicated Server from the installation directory
- GAME_CONFDIR=@GAMES_SYSCONFDIR@/armagetronad
- GAME_LIBDIR=@GAMES_LIBDIR@/armagetronad
- GAME_DATADIR=@GAMES_DATADIR@/armagetronad
+GAME_CONFDIR="@GAMES_SYSCONFDIR@/armagetronad"
+GAME_LIBDIR="@GAMES_LIBDIR@/armagetronad"
+GAME_DATADIR="@GAMES_DATADIR@/armagetronad"
- NO=$'\x1b[0;0m'
- RD=$'\x1b[31;01m'
- GR=$'\x1b[32;01m'
- YL=$'\x1b[33;01m'
+echo "Checking Configuration"
+if test ! -r "${HOME}"/.armagetronad-ded ; then
+ mkdir -p "${HOME}"/.armagetronad-ded
- echo "${GR} *${NO} Checking Configuration."
- if test ! -r $HOME/.armagetronad-ded ; then
- mkdir $HOME/.armagetronad-ded
-
- if test -r $HOME/.ArmageTronrc ; then
- echo "${YL} *${NO} Migrating very old configuration."
- cp $HOME/.ArmageTronrc $HOME/.armagetronad-ded/user.cfg
- fi
-fi
- if test ! -r $HOME/.armagetronad-ded/var ; then
- files=$( ls $HOME/.armagetronad-ded )
- mkdir $HOME/.armagetronad-ded/var
- echo "${GR} *${NO} Testing configuration."
- test "$files" != "" && mv $files $HOME/.armagetronad-ded/var
+ if test -r "${HOME}"/.ArmageTronrc ; then
+ echo "Migrating very old configuration"
+ cp "${HOME}"/.ArmageTronrc "${HOME}"/.armagetronad-ded/user.cfg
fi
-
- echo "${GR} *${NO} Done."
-
-
- if test "x$1" = "x-h" ; then
- echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
fi
- if test "x$1" = "x--uninstall" ; then
- echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
- else
-
- while true; do
-
- $GAME_LIBDIR/armagetronad-dedicated \
- --datadir $GAME_DATADIR \
- --configdir $GAME_CONFDIR \
- --userdatadir $HOME/.armagetronad-ded
-done
+if test ! -r "${HOME}"/.armagetronad-ded/var ; then
+ files=$(ls "${HOME}"/.armagetronad-ded)
+ mkdir "${HOME}"/.armagetronad-ded/var
+ echo "Testing configuration"
+ test "$files" != "" && mv $files "${HOME}"/.armagetronad-ded/var
fi
+
+echo "Done"
+
+exec \
+"${GAME_LIBDIR}"/armagetronad-dedicated \
+ --datadir "${GAME_DATADIR}" \
+ --configdir "${GAME_CONFDIR}" \
+ --userdatadir "${HOME}"/.armagetronad-ded