childsplay/childsplay-0.80.3.1-install.patch

130 lines
4.0 KiB
Diff
Raw Permalink Normal View History

diff -ru childsplay-0.80.3.1/INSTALL.sh childsplay-0.80.3.1-qi/INSTALL.sh
--- childsplay-0.80.3.1/INSTALL.sh 2005-08-29 10:06:25.000000000 +0200
+++ childsplay-0.80.3.1-qi/INSTALL.sh 2005-11-25 22:45:54.000000000 +0100
@@ -8,30 +8,32 @@
# 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 [ $* ]
-then PREFIX=$*
-fi
-echo "PREFIX=$PREFIX"
+
+DESTDIR=
+
+[ "$1" ] && DESTDIR="$1"
+
+echo "PREFIX=$DESTDIR$PREFIX"
PYTHON=`which python`
-EXECDIR=$PREFIX/bin
-LOCALEDIR=$PREFIX/share/locale
-ASSETMLDIR=/usr/share/assetml
-SCOREDIR=/var/games
+EXECDIR=$DESTDIR$PREFIX/bin
+LOCALEDIR=$DESTDIR$PREFIX/share/locale
+ASSETMLDIR=$DESTDIR$PREFIX/share/assetml
+SCOREDIR=$DESTDIR/var/games
SCOREFILE=$SCOREDIR/childsplay.score
-DOCDIR=$PREFIX/share/doc/childsplay
-MANDIR=$PREFIX/man/man6
-CPDIR=$PREFIX/lib/games/childsplay
-SHAREDIR=$PREFIX/share/childsplay
-BINDIR=$PREFIX/games
-LIBDIR=$CPDIR/lib
-MODULESDIR=$LIBDIR
+DOCDIR=$DESTDIR$PREFIX/share/doc/childsplay
+MANDIR=$DESTDIR$PREFIX/share/man/man6
+CPDIR=$DESTDIR$PREFIX/lib/childsplay
+SHAREDIR=$DESTDIR$PREFIX/share/childsplay
+BINDIR=$DESTDIR$PREFIX/bin
+LIBDIR=$CPDIR/lib
+MODULESDIR=$LIBDIR
SHARELIBDATADIR=$SHAREDIR/lib
SHAREDATADIR=$SHAREDIR/Data
RCDIR=$SHARELIBDATADIR/ConfigData
@@ -39,11 +41,11 @@
HOME_DIR_NAME=.childsplay
CHILDSPLAYRC=childsplayrc
-OLDCPDIR=$PREFIX/games/childsplay
+OLDCPDIR=$DESTDIR$PREFIX/bin/childsplay
echo "Making directorys"
mkdir -vp $CPDIR
-mkdir -vp $CPDIR/lib
+mkdir -vp $LIBDIR
mkdir -vp $DOCDIR
mkdir -vp $LOCALEDIR
mkdir -vp $ASSETMLDIR
@@ -58,17 +60,6 @@
set -e
CWD=`pwd`
-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 " Looking for obsolete childsplay files in $OLDCPDIR"
-if [ -e $OLDCPDIR ] && [ -d $OLDCPDIR ]
-then rm -fr $OLDCPDIR
- echo " Old files removed"
-fi
echo -e "\n>>>>>>>>>>> Install childsplay >>>>>>>>>>>>>>>>>>>>"
echo " Installing in $PREFIX"
@@ -122,12 +113,6 @@
chmod +x $CPDIR/childsplay.py
chmod +x $CPDIR/letters-trans.py
-#echo " Looking for the old executable, if any"
-#if [ -e /usr/local/bin/childsplay ]
-#then rm -f /usr/local/bin/childsplay
-# echo "found and removed"
-#fi
-
echo " Setting the base path in childsplay to $PREFIX"
echo "## Automated file please do not edit" > $CPDIR/BASEPATH.py
echo "BASEPATH=\"$PREFIX\"" >> $CPDIR/BASEPATH.py
@@ -152,7 +137,7 @@
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo ""
-echo " Instalation of childsplay complete"
+echo " Installation of childsplay complete"
echo " The childsplay executable is $BINDIR/childsplay"
echo ""
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
diff -ru childsplay-0.80.3.1/letters-trans.py childsplay-0.80.3.1-qi/letters-trans.py
--- childsplay-0.80.3.1/letters-trans.py 2005-08-29 10:06:24.000000000 +0200
+++ childsplay-0.80.3.1-qi/letters-trans.py 2005-11-25 22:47:37.000000000 +0100
@@ -36,10 +36,6 @@
import os,fnmatch,operator,sys,locale
from CPConstants import ASSETMLROOT
-if os.environ['USER'] != 'root':
- print "\nOnly root can use this script, sorry.\n"
- sys.exit(1)
-
try:
import pyassetml,pyassetmlcreator
except ImportError,info:
@@ -66,7 +62,7 @@
sys.exit(0)
# get description names from memory assetml, these are the words used by letters.py
-parser = pyassetml.AssetmlParser('childsplay/memory-136x136/memory-136x136.assetml')
+parser = pyassetml.AssetmlParser('assetml/childsplay/memory-136x136/memory-136x136.assetml')
loc = parser.get_locale()# get current locale setting, only the first two chars !!
wlist_org = parser.find_names((('file','.'),('description',"en")))
wlist = parser.find_names((('file','.'),('description',loc)))