wok-next rev 3371
Add: childsplay-plugins (0.90)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Thu Jun 11 19:06:27 2009 +0000 (2009-06-11) |
parents | 5d0039136362 |
children | f4b150e1cc1e |
files | childsplay-plugins/receipt childsplay-plugins/stuff/install.sh.patch |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/childsplay-plugins/receipt Thu Jun 11 19:06:27 2009 +0000 1.3 @@ -0,0 +1,46 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="childsplay-plugins" 1.7 +SOURCE="childsplay_plugins" 1.8 +VERSION="0.90" 1.9 +CATEGORY="games" 1.10 +SHORT_DESC="Extra games for childsplay." 1.11 +MAINTAINER="claudinei@slitaz.org" 1.12 +TARBALL="$SOURCE-$VERSION.tgz" 1.13 +WEB_SITE="http://www.childschool.org" 1.14 +WGET_URL="$SF_MIRROR/childsplay/$TARBALL" 1.15 +DEPENDS="python childsplay" 1.16 +BUILD_DEPENDS="$DEPENDS" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + cd $src 1.22 + patch -p1 -i ../stuff/install.sh.patch 1.23 + sh install.sh 1.24 +} 1.25 + 1.26 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.27 +genpkg_rules() 1.28 +{ 1.29 + mkdir -p $fs/usr $fs/usr/share $fs/var/games 1.30 + cp -a $_pkg/usr/bin $fs/usr 1.31 + cp -a $_pkg/usr/lib $fs/usr 1.32 + cp -a $_pkg/usr/share/assetml $fs/usr/share 1.33 + cp -a $_pkg/usr/share/childsplay $fs/usr/share 1.34 + cp -a $_pkg/usr/share/childsplay/Data/childsplay.score \ 1.35 + $fs/var/games 1.36 +} 1.37 + 1.38 +# Remove the original childsplay.score file and write the new one 1.39 +post_install() 1.40 +{ 1.41 + VARDIR="/var/games" 1.42 + DATADIR="/usr/share/childsplay/Data" 1.43 + SCOREFILE="childsplay.score" 1.44 + if [ -f $VARDIR/$SCOREFILE ] 1.45 + then 1.46 + rm $DATADIR/$SCOREFILE 1.47 + ln -s $VARDIR/$SCOREFILE $DATADIR/$SCOREFILE 1.48 + fi 1.49 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/childsplay-plugins/stuff/install.sh.patch Thu Jun 11 19:06:27 2009 +0000 2.3 @@ -0,0 +1,186 @@ 2.4 +--- childsplay_plugins-0.90/install.sh.orig Sat Aug 25 07:53:40 2007 2.5 ++++ childsplay_plugins-0.90/install.sh Thu Jun 11 18:19:32 2009 2.6 +@@ -8,8 +8,18 @@ 2.7 + # However, you can change the "prefix" to "/usr" and childsplay will still 2.8 + # work. Set it to anything else and your on your own. 2.9 + 2.10 +-PREFIX=/usr/local 2.11 + 2.12 ++PKG_PREFIX=$PWD/_pkg/usr 2.13 ++PREFIX=/usr 2.14 ++ 2.15 ++# Create directories to install the package 2.16 ++mkdir -p $PKG_PREFIX/bin 2.17 ++mkdir -p $PKG_PREFIX/lib/games/childsplay/lib 2.18 ++mkdir -p $PKG_PREFIX/share/assetml 2.19 ++mkdir -p $PKG_PREFIX/share/childsplay/Data/icons 2.20 ++mkdir -p $PKG_PREFIX/share/childsplay/lib 2.21 ++ 2.22 ++ 2.23 + ################################################################# 2.24 + # DON'T EDIT BEHIND THIS POINT 2.25 + ################################################################# 2.26 +@@ -20,7 +30,7 @@ 2.27 + 2.28 + LOCALEDIR=$PREFIX/share/locale 2.29 + MTDIR=$PREFIX/bin 2.30 +-ASSETMLDIR=/usr/share/assetml 2.31 ++ASSETMLDIR=$PREFIX/share/assetml 2.32 + PYTHON=`which python` 2.33 + SCOREDIR=/var/games 2.34 + DOCDIR=$PREFIX/share/doc/childsplay 2.35 +@@ -31,10 +41,22 @@ 2.36 + SHARELIBDATADIR=$SHAREDIR/lib 2.37 + SHAREDATADIR=$SHAREDIR/Data 2.38 + 2.39 ++# package directories 2.40 ++PKG_MTDIR=$PKG_PREFIX/bin 2.41 ++PKG_LOCALEDIR=$PKG_PREFIX/share/locale 2.42 ++PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml 2.43 ++PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay 2.44 ++PKG_SHAREDIR=$PKG_PREFIX/share/childsplay 2.45 ++PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib 2.46 ++PKG_SHAREDATADIR=$PKG_SHAREDIR/Data 2.47 ++ 2.48 ++# copy the score file to the PKG_SHAREDATADIR 2.49 ++cp $SHAREDATADIR/childsplay.score $PKG_SHAREDATADIR 2.50 ++ 2.51 + ################################################## 2.52 + # Package text to be displayed as last step 2.53 + # 0 = no readmes to display, 1 = there are readmes 2.54 +-README=1 2.55 ++README=0 2.56 + # if README=1 then READMES=names of readmes in CWD 2.57 + # like this READMES="README README2 README3" 2.58 + READMES="README README-PACKID README.MT_users2csv" 2.59 +@@ -55,8 +77,8 @@ 2.60 + echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>" 2.61 + echo -e "\n This release depends on childsplay version >= $DEPEN" 2.62 + echo -n " Checking, version = " 2.63 +-#CP=`which childsplay` 2.64 +-CP=$BINDIR/childsplay 2.65 ++CP=`which childsplay` 2.66 ++#CP=$BINDIR/childsplay 2.67 + VERSION=$($CP --version) 2.68 + echo $VERSION 2.69 + 2.70 +@@ -76,22 +98,22 @@ 2.71 + 2.72 + set -e 2.73 + 2.74 +-echo -e "\n The path to install the plugins in is $CPDIR." 2.75 +-echo " If you have installed childsplay in a other place, you can" 2.76 +-echo " give the full path to childsplay, otherwise just hit enter" 2.77 +-echo " Hit enter to install in $CPDIR, or give the full path" 2.78 +-read path 2.79 +-if [ $path ];then 2.80 +- if [ -e $path/install.py ];then 2.81 +- CPDIR=path 2.82 +- else 2.83 +- echo "*********** WARNING *************" 2.84 +- echo " $path does not exists or is not the childsplay directory" 2.85 +- echo " exit" 2.86 +- exit 1 2.87 +- fi 2.88 +-fi 2.89 +-echo " Installing in $CPDIR" 2.90 ++# echo -e "\n The path to install the plugins in is $CPDIR." 2.91 ++# echo " If you have installed childsplay in a other place, you can" 2.92 ++# echo " give the full path to childsplay, otherwise just hit enter" 2.93 ++# echo " Hit enter to install in $CPDIR, or give the full path" 2.94 ++# read path 2.95 ++# if [ $path ];then 2.96 ++# if [ -e $path/install.py ];then 2.97 ++# CPDIR=path 2.98 ++# else 2.99 ++# echo "*********** WARNING *************" 2.100 ++# echo " $path does not exists or is not the childsplay directory" 2.101 ++# echo " exit" 2.102 ++# exit 1 2.103 ++# fi 2.104 ++# fi 2.105 ++# echo " Installing in $CPDIR" 2.106 + 2.107 + echo "Compiling modules to bytecode..." 2.108 + $PYTHON $CPDIR/install.py --compile $CWD/lib 2.109 +@@ -100,33 +122,33 @@ 2.110 + for DIR in `ls $CWD/lib` 2.111 + do 2.112 + if [ -d $CWD/lib/$DIR ] 2.113 +- then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR 2.114 +- else cp -f $CWD/lib/$DIR $CPDIR/lib 2.115 ++ then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR 2.116 ++ else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib 2.117 + fi 2.118 + done 2.119 + 2.120 + echo " Copy misc. data files" 2.121 +-cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/ 2.122 +-cp -rf $CWD/Data/AlphabetSounds $SHAREDATADIR/ 2.123 ++cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/ 2.124 ++cp -rf $CWD/Data/AlphabetSounds $PKG_SHAREDATADIR/ 2.125 + 2.126 + echo " Copy assetml files" 2.127 +-cp -rf $CWD/assetml/* $ASSETMLDIR 2.128 ++cp -rf $CWD/assetml/* $PKG_ASSETMLDIR 2.129 + 2.130 +-echo " Copy README's to the childsplay doc directory" 2.131 +-for name in $READMES;do 2.132 +- cp -f $CWD/$name $DOCDIR/$name 2.133 +-done 2.134 ++# echo " Copy README's to the childsplay doc directory" 2.135 ++# for name in $READMES;do 2.136 ++# cp -f $CWD/$name $DOCDIR/$name 2.137 ++# done 2.138 + 2.139 + echo -e "\n Trying to add $SCORE to the childsplay score sheet" 2.140 + echo " Start add-score.py" 2.141 +-$PYTHON $CWD/add-score.py $SHAREDATADIR $SCORE 2.142 ++$PYTHON $CWD/add-score.py $PKG_SHAREDATADIR $SCORE 2.143 + 2.144 + echo -e "\n Installing MT_users2cvs.py" 2.145 + echo " Look at the file called README.MT_users2csv for info on how" 2.146 + echo " to use it. It usage is intended for teachers who want to an" 2.147 + echo " users resume of the multiplication tables users." 2.148 +-cp -f $CWD/MT_users2csv.py $MTDIR/MT_users2csv.py 2.149 +-chmod a+x $MTDIR/MT_users2csv.py 2.150 ++cp -f $CWD/MT_users2csv.py $PKG_MTDIR/MT_users2csv.py 2.151 ++chmod a+x $PKG_MTDIR/MT_users2csv.py 2.152 + 2.153 + echo -e "\n Everything installed, enjoy\n" 2.154 + echo -e "\n***************** IMPORTANT *************************" 2.155 +@@ -135,20 +157,20 @@ 2.156 + echo "BUG REPORTS ARE THE MOST IMPORTANT THINGS YOU CAN DO" 2.157 + echo "" 2.158 + 2.159 +-if [ $README == 1 ];then 2.160 +- echo " Read the README's (if any) that came with these packages," 2.161 +- echo " they contains directions on how to translate some" 2.162 +- echo " text files used by the games in your own language" 2.163 +- echo -e "\nHit any key to read the readme(s), enter to quit" 2.164 +- read key 2.165 +- if [ $key ];then 2.166 +- for name in $READMES;do 2.167 +- cat $name >> chplREADMEScat 2.168 +- done 2.169 +- `which more` chplREADMEScat 2.170 +- rm chplREADMEScat 2.171 +- fi 2.172 +-fi 2.173 ++# if [ $README == 1 ];then 2.174 ++# echo " Read the README's (if any) that came with these packages," 2.175 ++# echo " they contains directions on how to translate some" 2.176 ++# echo " text files used by the games in your own language" 2.177 ++# echo -e "\nHit any key to read the readme(s), enter to quit" 2.178 ++# read key 2.179 ++# if [ $key ];then 2.180 ++# for name in $READMES;do 2.181 ++# cat $name >> chplREADMEScat 2.182 ++# done 2.183 ++# `which more` chplREADMEScat 2.184 ++# rm chplREADMEScat 2.185 ++# fi 2.186 ++# fi 2.187 + 2.188 + echo "" 2.189 + echo "***********************************************************************"