wok annotate childsplay-plugins/stuff/install.sh.patch @ rev 3429

Remove all last deps on libiconv
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jun 13 13:32:50 2009 +0200 (2009-06-13)
parents
children
rev   line source
claudinei@3371 1 --- childsplay_plugins-0.90/install.sh.orig Sat Aug 25 07:53:40 2007
claudinei@3371 2 +++ childsplay_plugins-0.90/install.sh Thu Jun 11 18:19:32 2009
claudinei@3371 3 @@ -8,8 +8,18 @@
claudinei@3371 4 # However, you can change the "prefix" to "/usr" and childsplay will still
claudinei@3371 5 # work. Set it to anything else and your on your own.
claudinei@3371 6
claudinei@3371 7 -PREFIX=/usr/local
claudinei@3371 8
claudinei@3371 9 +PKG_PREFIX=$PWD/_pkg/usr
claudinei@3371 10 +PREFIX=/usr
claudinei@3371 11 +
claudinei@3371 12 +# Create directories to install the package
claudinei@3371 13 +mkdir -p $PKG_PREFIX/bin
claudinei@3371 14 +mkdir -p $PKG_PREFIX/lib/games/childsplay/lib
claudinei@3371 15 +mkdir -p $PKG_PREFIX/share/assetml
claudinei@3371 16 +mkdir -p $PKG_PREFIX/share/childsplay/Data/icons
claudinei@3371 17 +mkdir -p $PKG_PREFIX/share/childsplay/lib
claudinei@3371 18 +
claudinei@3371 19 +
claudinei@3371 20 #################################################################
claudinei@3371 21 # DON'T EDIT BEHIND THIS POINT
claudinei@3371 22 #################################################################
claudinei@3371 23 @@ -20,7 +30,7 @@
claudinei@3371 24
claudinei@3371 25 LOCALEDIR=$PREFIX/share/locale
claudinei@3371 26 MTDIR=$PREFIX/bin
claudinei@3371 27 -ASSETMLDIR=/usr/share/assetml
claudinei@3371 28 +ASSETMLDIR=$PREFIX/share/assetml
claudinei@3371 29 PYTHON=`which python`
claudinei@3371 30 SCOREDIR=/var/games
claudinei@3371 31 DOCDIR=$PREFIX/share/doc/childsplay
claudinei@3371 32 @@ -31,10 +41,22 @@
claudinei@3371 33 SHARELIBDATADIR=$SHAREDIR/lib
claudinei@3371 34 SHAREDATADIR=$SHAREDIR/Data
claudinei@3371 35
claudinei@3371 36 +# package directories
claudinei@3371 37 +PKG_MTDIR=$PKG_PREFIX/bin
claudinei@3371 38 +PKG_LOCALEDIR=$PKG_PREFIX/share/locale
claudinei@3371 39 +PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml
claudinei@3371 40 +PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay
claudinei@3371 41 +PKG_SHAREDIR=$PKG_PREFIX/share/childsplay
claudinei@3371 42 +PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib
claudinei@3371 43 +PKG_SHAREDATADIR=$PKG_SHAREDIR/Data
claudinei@3371 44 +
claudinei@3371 45 +# copy the score file to the PKG_SHAREDATADIR
claudinei@3371 46 +cp $SHAREDATADIR/childsplay.score $PKG_SHAREDATADIR
claudinei@3371 47 +
claudinei@3371 48 ##################################################
claudinei@3371 49 # Package text to be displayed as last step
claudinei@3371 50 # 0 = no readmes to display, 1 = there are readmes
claudinei@3371 51 -README=1
claudinei@3371 52 +README=0
claudinei@3371 53 # if README=1 then READMES=names of readmes in CWD
claudinei@3371 54 # like this READMES="README README2 README3"
claudinei@3371 55 READMES="README README-PACKID README.MT_users2csv"
claudinei@3371 56 @@ -55,8 +77,8 @@
claudinei@3371 57 echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
claudinei@3371 58 echo -e "\n This release depends on childsplay version >= $DEPEN"
claudinei@3371 59 echo -n " Checking, version = "
claudinei@3371 60 -#CP=`which childsplay`
claudinei@3371 61 -CP=$BINDIR/childsplay
claudinei@3371 62 +CP=`which childsplay`
claudinei@3371 63 +#CP=$BINDIR/childsplay
claudinei@3371 64 VERSION=$($CP --version)
claudinei@3371 65 echo $VERSION
claudinei@3371 66
claudinei@3371 67 @@ -76,22 +98,22 @@
claudinei@3371 68
claudinei@3371 69 set -e
claudinei@3371 70
claudinei@3371 71 -echo -e "\n The path to install the plugins in is $CPDIR."
claudinei@3371 72 -echo " If you have installed childsplay in a other place, you can"
claudinei@3371 73 -echo " give the full path to childsplay, otherwise just hit enter"
claudinei@3371 74 -echo " Hit enter to install in $CPDIR, or give the full path"
claudinei@3371 75 -read path
claudinei@3371 76 -if [ $path ];then
claudinei@3371 77 - if [ -e $path/install.py ];then
claudinei@3371 78 - CPDIR=path
claudinei@3371 79 - else
claudinei@3371 80 - echo "*********** WARNING *************"
claudinei@3371 81 - echo " $path does not exists or is not the childsplay directory"
claudinei@3371 82 - echo " exit"
claudinei@3371 83 - exit 1
claudinei@3371 84 - fi
claudinei@3371 85 -fi
claudinei@3371 86 -echo " Installing in $CPDIR"
claudinei@3371 87 +# echo -e "\n The path to install the plugins in is $CPDIR."
claudinei@3371 88 +# echo " If you have installed childsplay in a other place, you can"
claudinei@3371 89 +# echo " give the full path to childsplay, otherwise just hit enter"
claudinei@3371 90 +# echo " Hit enter to install in $CPDIR, or give the full path"
claudinei@3371 91 +# read path
claudinei@3371 92 +# if [ $path ];then
claudinei@3371 93 +# if [ -e $path/install.py ];then
claudinei@3371 94 +# CPDIR=path
claudinei@3371 95 +# else
claudinei@3371 96 +# echo "*********** WARNING *************"
claudinei@3371 97 +# echo " $path does not exists or is not the childsplay directory"
claudinei@3371 98 +# echo " exit"
claudinei@3371 99 +# exit 1
claudinei@3371 100 +# fi
claudinei@3371 101 +# fi
claudinei@3371 102 +# echo " Installing in $CPDIR"
claudinei@3371 103
claudinei@3371 104 echo "Compiling modules to bytecode..."
claudinei@3371 105 $PYTHON $CPDIR/install.py --compile $CWD/lib
claudinei@3371 106 @@ -100,33 +122,33 @@
claudinei@3371 107 for DIR in `ls $CWD/lib`
claudinei@3371 108 do
claudinei@3371 109 if [ -d $CWD/lib/$DIR ]
claudinei@3371 110 - then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR
claudinei@3371 111 - else cp -f $CWD/lib/$DIR $CPDIR/lib
claudinei@3371 112 + then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR
claudinei@3371 113 + else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib
claudinei@3371 114 fi
claudinei@3371 115 done
claudinei@3371 116
claudinei@3371 117 echo " Copy misc. data files"
claudinei@3371 118 -cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/
claudinei@3371 119 -cp -rf $CWD/Data/AlphabetSounds $SHAREDATADIR/
claudinei@3371 120 +cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/
claudinei@3371 121 +cp -rf $CWD/Data/AlphabetSounds $PKG_SHAREDATADIR/
claudinei@3371 122
claudinei@3371 123 echo " Copy assetml files"
claudinei@3371 124 -cp -rf $CWD/assetml/* $ASSETMLDIR
claudinei@3371 125 +cp -rf $CWD/assetml/* $PKG_ASSETMLDIR
claudinei@3371 126
claudinei@3371 127 -echo " Copy README's to the childsplay doc directory"
claudinei@3371 128 -for name in $READMES;do
claudinei@3371 129 - cp -f $CWD/$name $DOCDIR/$name
claudinei@3371 130 -done
claudinei@3371 131 +# echo " Copy README's to the childsplay doc directory"
claudinei@3371 132 +# for name in $READMES;do
claudinei@3371 133 +# cp -f $CWD/$name $DOCDIR/$name
claudinei@3371 134 +# done
claudinei@3371 135
claudinei@3371 136 echo -e "\n Trying to add $SCORE to the childsplay score sheet"
claudinei@3371 137 echo " Start add-score.py"
claudinei@3371 138 -$PYTHON $CWD/add-score.py $SHAREDATADIR $SCORE
claudinei@3371 139 +$PYTHON $CWD/add-score.py $PKG_SHAREDATADIR $SCORE
claudinei@3371 140
claudinei@3371 141 echo -e "\n Installing MT_users2cvs.py"
claudinei@3371 142 echo " Look at the file called README.MT_users2csv for info on how"
claudinei@3371 143 echo " to use it. It usage is intended for teachers who want to an"
claudinei@3371 144 echo " users resume of the multiplication tables users."
claudinei@3371 145 -cp -f $CWD/MT_users2csv.py $MTDIR/MT_users2csv.py
claudinei@3371 146 -chmod a+x $MTDIR/MT_users2csv.py
claudinei@3371 147 +cp -f $CWD/MT_users2csv.py $PKG_MTDIR/MT_users2csv.py
claudinei@3371 148 +chmod a+x $PKG_MTDIR/MT_users2csv.py
claudinei@3371 149
claudinei@3371 150 echo -e "\n Everything installed, enjoy\n"
claudinei@3371 151 echo -e "\n***************** IMPORTANT *************************"
claudinei@3371 152 @@ -135,20 +157,20 @@
claudinei@3371 153 echo "BUG REPORTS ARE THE MOST IMPORTANT THINGS YOU CAN DO"
claudinei@3371 154 echo ""
claudinei@3371 155
claudinei@3371 156 -if [ $README == 1 ];then
claudinei@3371 157 - echo " Read the README's (if any) that came with these packages,"
claudinei@3371 158 - echo " they contains directions on how to translate some"
claudinei@3371 159 - echo " text files used by the games in your own language"
claudinei@3371 160 - echo -e "\nHit any key to read the readme(s), enter to quit"
claudinei@3371 161 - read key
claudinei@3371 162 - if [ $key ];then
claudinei@3371 163 - for name in $READMES;do
claudinei@3371 164 - cat $name >> chplREADMEScat
claudinei@3371 165 - done
claudinei@3371 166 - `which more` chplREADMEScat
claudinei@3371 167 - rm chplREADMEScat
claudinei@3371 168 - fi
claudinei@3371 169 -fi
claudinei@3371 170 +# if [ $README == 1 ];then
claudinei@3371 171 +# echo " Read the README's (if any) that came with these packages,"
claudinei@3371 172 +# echo " they contains directions on how to translate some"
claudinei@3371 173 +# echo " text files used by the games in your own language"
claudinei@3371 174 +# echo -e "\nHit any key to read the readme(s), enter to quit"
claudinei@3371 175 +# read key
claudinei@3371 176 +# if [ $key ];then
claudinei@3371 177 +# for name in $READMES;do
claudinei@3371 178 +# cat $name >> chplREADMEScat
claudinei@3371 179 +# done
claudinei@3371 180 +# `which more` chplREADMEScat
claudinei@3371 181 +# rm chplREADMEScat
claudinei@3371 182 +# fi
claudinei@3371 183 +# fi
claudinei@3371 184
claudinei@3371 185 echo ""
claudinei@3371 186 echo "***********************************************************************"