# HG changeset patch # User Claudinei Pereira # Date 1249661865 0 # Node ID d9184c7bd1de3e52856d5266a1596cd07ef38e4d # Parent 7d31bed17bd3940d4ef2929760ea6437a8bdde52 Up: childsplay (1.4) and remove old childsplay-* packages diff -r 7d31bed17bd3 -r d9184c7bd1de childsplay-plugins-lfc/receipt --- a/childsplay-plugins-lfc/receipt Fri Aug 07 19:35:09 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="childsplay-plugins-lfc" -SOURCE="childsplay_plugins_lfc" -VERSION="0.90" -CATEGORY="games" -SHORT_DESC="Letter flash cards game for childsplay." -MAINTAINER="claudinei@slitaz.org" -TARBALL="$SOURCE-$VERSION.tgz" -WEB_SITE="http://www.childschool.org" -WGET_URL="$SF_MIRROR/childsplay/$TARBALL" -DEPENDS="python childsplay" -BUILD_DEPENDS="$DEPENDS" - -# Rules to configure and make the package. -compile_rules() -{ - cd $src - patch -p1 -i ../stuff/install.sh.patch - sh install.sh -} - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr $fs/usr/share - cp -a $_pkg/usr/lib $fs/usr - cp -a $_pkg/usr/share/assetml $fs/usr/share - cp -a $_pkg/usr/share/childsplay $fs/usr/share -} diff -r 7d31bed17bd3 -r d9184c7bd1de childsplay-plugins-lfc/stuff/install.sh.patch --- a/childsplay-plugins-lfc/stuff/install.sh.patch Fri Aug 07 19:35:09 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ ---- childsplay_plugins_lfc-0.90/install.sh.orig Sat Aug 25 07:53:57 2007 -+++ childsplay_plugins_lfc-0.90/install.sh Thu Jun 11 21:07:43 2009 -@@ -8,8 +8,15 @@ - # 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 -+PKG_PREFIX=$PWD/_pkg/usr - -+# Create directories to install the package -+mkdir -p $PKG_PREFIX/lib/games/childsplay/lib -+mkdir -p $PKG_PREFIX/share/assetml -+mkdir -p $PKG_PREFIX/share/childsplay/Data/icons -+mkdir -p $PKG_PREFIX/share/childsplay/lib -+ - ################################################################# - # DON'T EDIT BEHIND THIS POINT - ################################################################# -@@ -19,7 +26,7 @@ - fi - - LOCALEDIR=$PREFIX/share/locale --ASSETMLDIR=/usr/share/assetml -+ASSETMLDIR=$PREFIX/share/assetml - PYTHON=`which python` - SCOREDIR=/var/games - DOCDIR=$PREFIX/share/doc/childsplay -@@ -30,10 +37,17 @@ - SHARELIBDATADIR=$SHAREDIR/lib - SHAREDATADIR=$SHAREDIR/Data - -+# package directories -+PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml -+PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay -+PKG_SHAREDIR=$PKG_PREFIX/share/childsplay -+PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib -+PKG_SHAREDATADIR=$PKG_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" -@@ -52,8 +66,8 @@ - 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 -+CP=`which childsplay` -+#CP=$BINDIR/childsplay - VERSION=$($CP --version) - echo $VERSION - -@@ -73,21 +87,21 @@ - - 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 -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..." -@@ -97,16 +111,16 @@ - for DIR in `ls $CWD/lib` - do - if [ -d $CWD/lib/$DIR ] -- then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR -- else cp -f $CWD/lib/$DIR $CPDIR/lib -+ then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR -+ else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib - fi - done - - echo " Copy misc. data files" --cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/ -+cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/ - - echo " Copy assetml files" --cp -rf $CWD/assetml/* $ASSETMLDIR -+cp -rf $CWD/assetml/* $PKG_ASSETMLDIR - - echo -e "\n Everything installed, enjoy\n" - echo -e "\n***************** IMPORTANT *************************" diff -r 7d31bed17bd3 -r d9184c7bd1de childsplay-plugins/receipt --- a/childsplay-plugins/receipt Fri Aug 07 19:35:09 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# SliTaz package receipt. - -PACKAGE="childsplay-plugins" -SOURCE="childsplay_plugins" -VERSION="0.90" -CATEGORY="games" -SHORT_DESC="Extra games for childsplay." -MAINTAINER="claudinei@slitaz.org" -TARBALL="$SOURCE-$VERSION.tgz" -WEB_SITE="http://www.childschool.org" -WGET_URL="$SF_MIRROR/childsplay/$TARBALL" -DEPENDS="python childsplay" -BUILD_DEPENDS="$DEPENDS" - -# Rules to configure and make the package. -compile_rules() -{ - cd $src - patch -p1 -i ../stuff/install.sh.patch - sh install.sh -} - -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ - mkdir -p $fs/usr $fs/usr/share $fs/var/games - cp -a $_pkg/usr/bin $fs/usr - cp -a $_pkg/usr/lib $fs/usr - cp -a $_pkg/usr/share/assetml $fs/usr/share - cp -a $_pkg/usr/share/childsplay $fs/usr/share - cp -a $_pkg/usr/share/childsplay/Data/childsplay.score \ - $fs/var/games -} - -# Remove the original childsplay.score file and write the new one -post_install() -{ - VARDIR="/var/games" - DATADIR="/usr/share/childsplay/Data" - SCOREFILE="childsplay.score" - if [ -f $VARDIR/$SCOREFILE ] - then - rm $DATADIR/$SCOREFILE - ln -s $VARDIR/$SCOREFILE $DATADIR/$SCOREFILE - fi -} diff -r 7d31bed17bd3 -r d9184c7bd1de childsplay-plugins/stuff/install.sh.patch --- a/childsplay-plugins/stuff/install.sh.patch Fri Aug 07 19:35:09 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ ---- childsplay_plugins-0.90/install.sh.orig Sat Aug 25 07:53:40 2007 -+++ childsplay_plugins-0.90/install.sh Thu Jun 11 18:19:32 2009 -@@ -8,8 +8,18 @@ - # 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 - -+PKG_PREFIX=$PWD/_pkg/usr -+PREFIX=/usr -+ -+# Create directories to install the package -+mkdir -p $PKG_PREFIX/bin -+mkdir -p $PKG_PREFIX/lib/games/childsplay/lib -+mkdir -p $PKG_PREFIX/share/assetml -+mkdir -p $PKG_PREFIX/share/childsplay/Data/icons -+mkdir -p $PKG_PREFIX/share/childsplay/lib -+ -+ - ################################################################# - # DON'T EDIT BEHIND THIS POINT - ################################################################# -@@ -20,7 +30,7 @@ - - LOCALEDIR=$PREFIX/share/locale - MTDIR=$PREFIX/bin --ASSETMLDIR=/usr/share/assetml -+ASSETMLDIR=$PREFIX/share/assetml - PYTHON=`which python` - SCOREDIR=/var/games - DOCDIR=$PREFIX/share/doc/childsplay -@@ -31,10 +41,22 @@ - SHARELIBDATADIR=$SHAREDIR/lib - SHAREDATADIR=$SHAREDIR/Data - -+# package directories -+PKG_MTDIR=$PKG_PREFIX/bin -+PKG_LOCALEDIR=$PKG_PREFIX/share/locale -+PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml -+PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay -+PKG_SHAREDIR=$PKG_PREFIX/share/childsplay -+PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib -+PKG_SHAREDATADIR=$PKG_SHAREDIR/Data -+ -+# copy the score file to the PKG_SHAREDATADIR -+cp $SHAREDATADIR/childsplay.score $PKG_SHAREDATADIR -+ - ################################################## - # 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" -@@ -55,8 +77,8 @@ - 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 -+CP=`which childsplay` -+#CP=$BINDIR/childsplay - VERSION=$($CP --version) - echo $VERSION - -@@ -76,22 +98,22 @@ - - 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 -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..." - $PYTHON $CPDIR/install.py --compile $CWD/lib -@@ -100,33 +122,33 @@ - for DIR in `ls $CWD/lib` - do - if [ -d $CWD/lib/$DIR ] -- then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR -- else cp -f $CWD/lib/$DIR $CPDIR/lib -+ then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR -+ else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib - fi - done - - echo " Copy misc. data files" --cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/ --cp -rf $CWD/Data/AlphabetSounds $SHAREDATADIR/ -+cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/ -+cp -rf $CWD/Data/AlphabetSounds $PKG_SHAREDATADIR/ - - echo " Copy assetml files" --cp -rf $CWD/assetml/* $ASSETMLDIR -+cp -rf $CWD/assetml/* $PKG_ASSETMLDIR - --echo " Copy README's to the childsplay doc directory" --for name in $READMES;do -- cp -f $CWD/$name $DOCDIR/$name --done -+# echo " Copy README's to the childsplay doc directory" -+# for name in $READMES;do -+# cp -f $CWD/$name $DOCDIR/$name -+# done - - echo -e "\n Trying to add $SCORE to the childsplay score sheet" - echo " Start add-score.py" --$PYTHON $CWD/add-score.py $SHAREDATADIR $SCORE -+$PYTHON $CWD/add-score.py $PKG_SHAREDATADIR $SCORE - - echo -e "\n Installing MT_users2cvs.py" - echo " Look at the file called README.MT_users2csv for info on how" - echo " to use it. It usage is intended for teachers who want to an" - echo " users resume of the multiplication tables users." --cp -f $CWD/MT_users2csv.py $MTDIR/MT_users2csv.py --chmod a+x $MTDIR/MT_users2csv.py -+cp -f $CWD/MT_users2csv.py $PKG_MTDIR/MT_users2csv.py -+chmod a+x $PKG_MTDIR/MT_users2csv.py - - echo -e "\n Everything installed, enjoy\n" - echo -e "\n***************** IMPORTANT *************************" -@@ -135,20 +157,20 @@ - echo "BUG REPORTS ARE THE MOST IMPORTANT THINGS YOU CAN DO" - echo "" - --if [ $README == 1 ];then -- echo " Read the README's (if any) that came with these packages," -- echo " they contains directions on how to translate some" -- echo " text files used by the games in your own language" -- echo -e "\nHit any key to read the readme(s), enter to quit" -- read key -- if [ $key ];then -- for name in $READMES;do -- cat $name >> chplREADMEScat -- done -- `which more` chplREADMEScat -- rm chplREADMEScat -- fi --fi -+# if [ $README == 1 ];then -+# echo " Read the README's (if any) that came with these packages," -+# echo " they contains directions on how to translate some" -+# echo " text files used by the games in your own language" -+# echo -e "\nHit any key to read the readme(s), enter to quit" -+# read key -+# if [ $key ];then -+# for name in $READMES;do -+# cat $name >> chplREADMEScat -+# done -+# `which more` chplREADMEScat -+# rm chplREADMEScat -+# fi -+# fi - - echo "" - echo "***********************************************************************" diff -r 7d31bed17bd3 -r d9184c7bd1de childsplay/receipt --- a/childsplay/receipt Fri Aug 07 19:35:09 2009 +0000 +++ b/childsplay/receipt Fri Aug 07 16:17:45 2009 +0000 @@ -1,57 +1,48 @@ # SliTaz package receipt. PACKAGE="childsplay" -VERSION="0.90.2" +VERSION="1.4" CATEGORY="games" SHORT_DESC="Python educational game." MAINTAINER="claudinei@slitaz.org" TARBALL="$PACKAGE-$VERSION.tgz" -WEB_SITE="http://www.childschool.org" -WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" -DEPENDS="python python-pygame" -BUILD_DEPENDS="python python-dev python-pygame libsdl libsdl-dev \ -libsdl-image libsdl-image-dev libsdl-mixer libsdl-mixer-dev \ -libsdl-ttf libsdl-ttf-dev libsmpeg libsmpeg-dev" +WEB_SITE="http://www.schoolsplay.org" +WGET_URL="$SF_MIRROR/schoolsplay/$TARBALL" +DEPENDS="python pygtk python-pygame python-pysqlite python-sqlalchemy libogg" +BUILD_DEPENDS="python python-dev" # Rules to configure and make the package. compile_rules() { cd $src - for i in INSTALL.sh.patch ; do - [ -f $i.done ] && continue - patch -p0 -i ../stuff/$i - touch $i.done - done - sh INSTALL.sh - sed -i "s/\/usr\/local/\/usr/" $src/_pkg/usr/bin/childsplay + sed -i "s|PREFIX = '/usr/local'|PREFIX = '_pkg/usr'|" $src/setup.py + sed -i \ +"s|get_python_lib()|'_pkg', 'usr', 'lib', 'python2.5', 'site-packages'|" \ +$src/setup.py + sed -i "/key/s/raw_input/#raw_input/" $src/setup.py + python setup.py install --root=$PWD/_pkg } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr $fs/usr/share $fs/var + BASEPATHS="$_pkg/usr/lib/python2.5/site-packages/childsplay_sp/SPBasePaths.py" + + for file in `find $_pkg | grep 'pyc$'`; do + rm $file + done + + sed -i "s|_pkg/|/|g" $BASEPATHS + + mkdir -p $fs/usr/share cp -a $_pkg/usr/bin $fs/usr cp -a $_pkg/usr/lib $fs/usr - cp -a $_pkg/usr/share/assetml $fs/usr/share - cp -a $_pkg/usr/share/childsplay $fs/usr/share - cp -a $_pkg/var/games $fs/var + cp -a $_pkg/usr/share/childsplay_sp $fs/usr/share + cp -a $_pkg/usr/share/sp_alphabetsounds $fs/usr/share - for lang in de es fr pt; do + for lang in de en es fr pt; do mkdir -p $fs/usr/share/locale/$lang/LC_MESSAGES - cp -a $_pkg/usr/share/locale/$lang/LC_MESSAGES/childsplay.mo \ + cp -a $_pkg/usr/share/locale/$lang/LC_MESSAGES/childsplay_sp.mo \ $fs/usr/share/locale/$lang/LC_MESSAGES done } - -# Remove the score file generated and point it to /var/games -post_install () -{ - VARDIR="/var/games" - DATADIR="/usr/share/childsplay/Data" - SCOREFILE="childsplay.score" - if [ -f $VARDIR/$SCOREFILE ] - then - rm $DATADIR/$SCOREFILE - ln -s $VARDIR/$SCOREFILE $DATADIR/$SCOREFILE - fi -}