wok-6.x diff childsplay-plugins/stuff/install.sh.patch @ rev 3762

Add pptpclient
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 29 09:09:42 2009 +0200 (2009-07-29)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/childsplay-plugins/stuff/install.sh.patch	Wed Jul 29 09:09:42 2009 +0200
     1.3 @@ -0,0 +1,186 @@
     1.4 +--- childsplay_plugins-0.90/install.sh.orig	Sat Aug 25 07:53:40 2007
     1.5 ++++ childsplay_plugins-0.90/install.sh	Thu Jun 11 18:19:32 2009
     1.6 +@@ -8,8 +8,18 @@
     1.7 + # However, you can change the "prefix" to "/usr" and childsplay will still
     1.8 + # work. Set it to anything else and your on your own.
     1.9 +   
    1.10 +-PREFIX=/usr/local
    1.11 + 
    1.12 ++PKG_PREFIX=$PWD/_pkg/usr
    1.13 ++PREFIX=/usr
    1.14 ++
    1.15 ++# Create directories to install the package
    1.16 ++mkdir -p $PKG_PREFIX/bin
    1.17 ++mkdir -p $PKG_PREFIX/lib/games/childsplay/lib
    1.18 ++mkdir -p $PKG_PREFIX/share/assetml
    1.19 ++mkdir -p $PKG_PREFIX/share/childsplay/Data/icons
    1.20 ++mkdir -p $PKG_PREFIX/share/childsplay/lib
    1.21 ++
    1.22 ++
    1.23 + #################################################################
    1.24 + # DON'T EDIT BEHIND THIS POINT 
    1.25 + #################################################################
    1.26 +@@ -20,7 +30,7 @@
    1.27 + 
    1.28 + LOCALEDIR=$PREFIX/share/locale
    1.29 + MTDIR=$PREFIX/bin
    1.30 +-ASSETMLDIR=/usr/share/assetml
    1.31 ++ASSETMLDIR=$PREFIX/share/assetml
    1.32 + PYTHON=`which python`
    1.33 + SCOREDIR=/var/games
    1.34 + DOCDIR=$PREFIX/share/doc/childsplay
    1.35 +@@ -31,10 +41,22 @@
    1.36 + SHARELIBDATADIR=$SHAREDIR/lib
    1.37 + SHAREDATADIR=$SHAREDIR/Data
    1.38 + 
    1.39 ++# package directories
    1.40 ++PKG_MTDIR=$PKG_PREFIX/bin
    1.41 ++PKG_LOCALEDIR=$PKG_PREFIX/share/locale
    1.42 ++PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml
    1.43 ++PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay
    1.44 ++PKG_SHAREDIR=$PKG_PREFIX/share/childsplay
    1.45 ++PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib
    1.46 ++PKG_SHAREDATADIR=$PKG_SHAREDIR/Data
    1.47 ++
    1.48 ++# copy the score file to the PKG_SHAREDATADIR
    1.49 ++cp $SHAREDATADIR/childsplay.score $PKG_SHAREDATADIR
    1.50 ++
    1.51 + ##################################################
    1.52 + #  Package text to be displayed as last step
    1.53 + # 0 = no readmes to display, 1 = there are readmes
    1.54 +-README=1
    1.55 ++README=0
    1.56 + # if README=1 then READMES=names of readmes in CWD
    1.57 + # like this READMES="README README2 README3"
    1.58 + READMES="README README-PACKID README.MT_users2csv"
    1.59 +@@ -55,8 +77,8 @@
    1.60 + echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
    1.61 + echo -e "\n This release depends on childsplay version >= $DEPEN"
    1.62 + echo -n " Checking, version = "
    1.63 +-#CP=`which childsplay`
    1.64 +-CP=$BINDIR/childsplay
    1.65 ++CP=`which childsplay`
    1.66 ++#CP=$BINDIR/childsplay
    1.67 + VERSION=$($CP --version)
    1.68 + echo $VERSION
    1.69 + 
    1.70 +@@ -76,22 +98,22 @@
    1.71 + 
    1.72 + set -e
    1.73 + 
    1.74 +-echo -e "\n The path to install the plugins in is $CPDIR."
    1.75 +-echo " If you have installed childsplay in a other place, you can"
    1.76 +-echo " give the full path to childsplay, otherwise just hit enter"
    1.77 +-echo " Hit enter to install in $CPDIR, or give the full path"
    1.78 +-read path
    1.79 +-if [ $path ];then
    1.80 +-    if [ -e $path/install.py ];then
    1.81 +-        CPDIR=path
    1.82 +-    else
    1.83 +-        echo "*********** WARNING *************"
    1.84 +-        echo " $path does not exists or is not the childsplay directory"
    1.85 +-        echo " exit"
    1.86 +-        exit 1
    1.87 +-    fi
    1.88 +-fi
    1.89 +-echo " Installing in $CPDIR"
    1.90 ++# echo -e "\n The path to install the plugins in is $CPDIR."
    1.91 ++# echo " If you have installed childsplay in a other place, you can"
    1.92 ++# echo " give the full path to childsplay, otherwise just hit enter"
    1.93 ++# echo " Hit enter to install in $CPDIR, or give the full path"
    1.94 ++# read path
    1.95 ++# if [ $path ];then
    1.96 ++#     if [ -e $path/install.py ];then
    1.97 ++#         CPDIR=path
    1.98 ++#     else
    1.99 ++#         echo "*********** WARNING *************"
   1.100 ++#         echo " $path does not exists or is not the childsplay directory"
   1.101 ++#         echo " exit"
   1.102 ++#         exit 1
   1.103 ++#     fi
   1.104 ++# fi
   1.105 ++# echo " Installing in $CPDIR"
   1.106 + 
   1.107 + echo "Compiling modules to bytecode..."
   1.108 + $PYTHON $CPDIR/install.py --compile $CWD/lib
   1.109 +@@ -100,33 +122,33 @@
   1.110 + for DIR in `ls $CWD/lib`
   1.111 + do 
   1.112 +     if [ -d $CWD/lib/$DIR ]
   1.113 +-	 then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR
   1.114 +-	 else cp -f $CWD/lib/$DIR $CPDIR/lib
   1.115 ++	 then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR
   1.116 ++	 else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib
   1.117 +     fi
   1.118 + done
   1.119 + 
   1.120 + echo " Copy misc. data files"
   1.121 +-cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/
   1.122 +-cp -rf $CWD/Data/AlphabetSounds $SHAREDATADIR/
   1.123 ++cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/
   1.124 ++cp -rf $CWD/Data/AlphabetSounds $PKG_SHAREDATADIR/
   1.125 + 
   1.126 + echo " Copy assetml files"
   1.127 +-cp -rf $CWD/assetml/* $ASSETMLDIR
   1.128 ++cp -rf $CWD/assetml/* $PKG_ASSETMLDIR
   1.129 + 
   1.130 +-echo " Copy README's to the childsplay doc directory"
   1.131 +-for name in $READMES;do
   1.132 +-    cp -f $CWD/$name $DOCDIR/$name
   1.133 +-done
   1.134 ++# echo " Copy README's to the childsplay doc directory"
   1.135 ++# for name in $READMES;do
   1.136 ++#     cp -f $CWD/$name $DOCDIR/$name
   1.137 ++# done
   1.138 + 
   1.139 + echo -e "\n Trying to add $SCORE to the childsplay score sheet"
   1.140 + echo " Start add-score.py"
   1.141 +-$PYTHON $CWD/add-score.py $SHAREDATADIR $SCORE
   1.142 ++$PYTHON $CWD/add-score.py $PKG_SHAREDATADIR $SCORE
   1.143 + 
   1.144 + echo -e "\n Installing MT_users2cvs.py"
   1.145 + echo " Look at the file called README.MT_users2csv for info on how"
   1.146 + echo " to use it. It usage is intended for teachers who want to an"
   1.147 + echo " users resume of the multiplication tables users."
   1.148 +-cp -f $CWD/MT_users2csv.py $MTDIR/MT_users2csv.py 
   1.149 +-chmod a+x $MTDIR/MT_users2csv.py
   1.150 ++cp -f $CWD/MT_users2csv.py $PKG_MTDIR/MT_users2csv.py 
   1.151 ++chmod a+x $PKG_MTDIR/MT_users2csv.py
   1.152 + 
   1.153 + echo -e "\n Everything installed, enjoy\n"
   1.154 + echo -e "\n***************** IMPORTANT *************************"
   1.155 +@@ -135,20 +157,20 @@
   1.156 + echo "BUG REPORTS ARE THE MOST IMPORTANT THINGS YOU CAN DO"
   1.157 + echo ""
   1.158 + 
   1.159 +-if [ $README == 1 ];then
   1.160 +-    echo " Read the README's (if any) that came with these packages,"
   1.161 +-    echo " they contains directions on how to translate some"
   1.162 +-    echo " text files used by the games in your own language"
   1.163 +-    echo -e "\nHit any key to read the readme(s), enter to quit"
   1.164 +-    read key
   1.165 +-    if [ $key ];then
   1.166 +-        for name in $READMES;do
   1.167 +-            cat $name >> chplREADMEScat
   1.168 +-        done
   1.169 +-        `which more` chplREADMEScat
   1.170 +-        rm chplREADMEScat
   1.171 +-    fi
   1.172 +-fi
   1.173 ++# if [ $README == 1 ];then
   1.174 ++#     echo " Read the README's (if any) that came with these packages,"
   1.175 ++#     echo " they contains directions on how to translate some"
   1.176 ++#     echo " text files used by the games in your own language"
   1.177 ++#     echo -e "\nHit any key to read the readme(s), enter to quit"
   1.178 ++#     read key
   1.179 ++#     if [ $key ];then
   1.180 ++#         for name in $READMES;do
   1.181 ++#             cat $name >> chplREADMEScat
   1.182 ++#         done
   1.183 ++#         `which more` chplREADMEScat
   1.184 ++#         rm chplREADMEScat
   1.185 ++#     fi
   1.186 ++# fi
   1.187 + 
   1.188 + echo ""
   1.189 + echo "***********************************************************************"