wok annotate childsplay/receipt @ rev 10684

vidalia: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri May 27 16:47:30 2011 +0200 (2011-05-27)
parents 5921dc28d8c6
children cc669956b01c
rev   line source
claudinei@3340 1 # SliTaz package receipt.
claudinei@3340 2
claudinei@3340 3 PACKAGE="childsplay"
slaxemulator@6583 4 VERSION="1.5.1"
claudinei@3340 5 CATEGORY="games"
claudinei@3340 6 SHORT_DESC="Python educational game."
claudinei@3340 7 MAINTAINER="claudinei@slitaz.org"
claudinei@3340 8 TARBALL="$PACKAGE-$VERSION.tgz"
claudinei@3857 9 WEB_SITE="http://www.schoolsplay.org"
claudinei@3857 10 WGET_URL="$SF_MIRROR/schoolsplay/$TARBALL"
claudinei@3857 11 DEPENDS="python pygtk python-pygame python-pysqlite python-sqlalchemy libogg"
claudinei@3857 12 BUILD_DEPENDS="python python-dev"
claudinei@3340 13
jozee@4933 14
claudinei@3340 15 # Rules to configure and make the package.
claudinei@3340 16 compile_rules()
claudinei@3340 17 {
claudinei@3340 18 cd $src
pascal@6594 19 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
claudinei@3857 20 sed -i "s|PREFIX = '/usr/local'|PREFIX = '_pkg/usr'|" $src/setup.py
claudinei@3857 21 sed -i \
pascal@6592 22 "s|get_python_lib()|'_pkg', 'usr', 'lib', '$PYTHON_LIB', 'site-packages'|" \
claudinei@3857 23 $src/setup.py
claudinei@3857 24 sed -i "/key/s/raw_input/#raw_input/" $src/setup.py
claudinei@3857 25 python setup.py install --root=$PWD/_pkg
claudinei@3340 26 }
claudinei@3340 27
claudinei@3340 28 # Rules to gen a SliTaz package suitable for Tazpkg.
claudinei@3340 29 genpkg_rules()
claudinei@3340 30 {
pascal@6592 31 BASEPATHS="$_pkg/usr/lib/$PYTHON_LIB/site-packages/childsplay_sp/SPBasePaths.py"
claudinei@3857 32
claudinei@3857 33 for file in `find $_pkg | grep 'pyc$'`; do
claudinei@3857 34 rm $file
claudinei@3857 35 done
claudinei@3857 36
claudinei@3857 37 sed -i "s|_pkg/|/|g" $BASEPATHS
claudinei@3857 38
claudinei@3857 39 mkdir -p $fs/usr/share
claudinei@3340 40 cp -a $_pkg/usr/bin $fs/usr
claudinei@3340 41 cp -a $_pkg/usr/lib $fs/usr
claudinei@3857 42 cp -a $_pkg/usr/share/childsplay_sp $fs/usr/share
claudinei@3857 43 cp -a $_pkg/usr/share/sp_alphabetsounds $fs/usr/share
claudinei@3340 44
claudinei@3857 45 for lang in de en es fr pt; do
claudinei@3340 46 mkdir -p $fs/usr/share/locale/$lang/LC_MESSAGES
claudinei@3857 47 cp -a $_pkg/usr/share/locale/$lang/LC_MESSAGES/childsplay_sp.mo \
claudinei@3340 48 $fs/usr/share/locale/$lang/LC_MESSAGES
claudinei@3340 49 done
claudinei@3340 50 }