childsplay/childsplay-0.90.2-install_plugins.patch

104 lines
3.4 KiB
Diff

--- childsplay-0.90.2/childsplay_plugins-0.90/install.sh 2008-09-27 04:03:14.000000000 +0200
+++ childsplay-0.90.2/childsplay_plugins-0.90/install.sh-gil 2008-09-27 04:12:53.000000000 +0200
@@ -8,33 +8,33 @@
# However, you can change the "prefix" to "/usr" and childsplay will still
# work. Set it to anything else and your on your own.
-PREFIX=/usr/local
+PREFIX=/usr
#################################################################
# DON'T EDIT BEHIND THIS POINT
#################################################################
-if [ $1 ] && [ -e $1 ]
-then PREFIX=$1
-fi
+DESTDIR=
+
+[ "$1" ] && DESTDIR="$1"
-LOCALEDIR=$PREFIX/share/locale
-MTDIR=$PREFIX/bin
-ASSETMLDIR=/usr/share/assetml
+LOCALEDIR=$DESTDIR$PREFIX/share/locale
+MTDIR=$DESTDIR$PREFIX/bin
+ASSETMLDIR=$DESTDIR$PREFIX/share/assetml
PYTHON=`which python`
-SCOREDIR=/var/games
-DOCDIR=$PREFIX/share/doc/childsplay
-MANDIR=$PREFIX/man/man6
-CPDIR=$PREFIX/lib/games/childsplay
-SHAREDIR=$PREFIX/share/childsplay
-BINDIR=$PREFIX/games
+SCOREDIR=$DESTDIR/var/games
+DOCDIR=$DESTDIR$PREFIX/share/doc/childsplay
+MANDIR=$DESTDIR$PREFIX/man/man6
+CPDIR=$DESTDIR$PREFIX/lib/childsplay
+SHAREDIR=$DESTDIR$PREFIX/share/childsplay
+BINDIR=$DESTDIR$PREFIX/bin
SHARELIBDATADIR=$SHAREDIR/lib
SHAREDATADIR=$SHAREDIR/Data
##################################################
# Package text to be displayed as last step
# 0 = no readmes to display, 1 = there are readmes
-README=1
+README=0
# if README=1 then READMES=names of readmes in CWD
# like this READMES="README README2 README3"
READMES="README README-PACKID README.MT_users2csv"
@@ -45,52 +45,11 @@
# the names of which plugins are to be added to the score file
SCORE="Packid,Numbers,Soundmemory,Fallingletters,Findsound,Findsound2,Billiard,Puzzle"
-USERID=`id | sed -e 's/).*//; s/^.*(//;'`
-if [ "$USERID" != "root" ]; then
- echo " You must be root to install the plugins"
- echo " exit"
- exit 1
-fi
-
echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
echo -e "\n This release depends on childsplay version >= $DEPEN"
-echo -n " Checking, version = "
-#CP=`which childsplay`
-CP=$BINDIR/childsplay
-VERSION=$($CP --version)
-echo $VERSION
-
-if [ `expr $VERSION \< $DEPEN` -eq 1 ]
-then
- echo " Childsplay version incorrect, please upgrade to at least";
- echo " version $DEPEN";
- echo "exit";
- exit 1
-fi
-
-if [ ! -f $CP ]
-then echo "############# Can\`t find childsplay ###########" && \
- echo "Be sure to install childsplay first" && \
- exit 1
-fi
set -e
-echo -e "\n The path to install the plugins in is $CPDIR."
-echo " If you have installed childsplay in a other place, you can"
-echo " give the full path to childsplay, otherwise just hit enter"
-echo " Hit enter to install in $CPDIR, or give the full path"
-read path
-if [ $path ];then
- if [ -e $path/install.py ];then
- CPDIR=path
- else
- echo "*********** WARNING *************"
- echo " $path does not exists or is not the childsplay directory"
- echo " exit"
- exit 1
- fi
-fi
echo " Installing in $CPDIR"
echo "Compiling modules to bytecode..."