wok-next annotate chess3d/receipt @ rev 15377

python-xlib: typos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 19 10:56:35 2013 +0000 (2013-10-19)
parents 4fcc858c8d57
children c1e059ce9a05
rev   line source
pascal@7054 1 # SliTaz package receipt.
pascal@7054 2
pascal@7054 3 PACKAGE="chess3d"
pascal@7054 4 VERSION="1.0"
pascal@7054 5 CATEGORY="games"
pascal@7054 6 SHORT_DESC="3D Chess game in javascript"
pascal@8911 7 TARBALL="$PACKAGE-$VERSION.tar.lzma"
pascal@7054 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@7054 9 WEB_SITE="http://chessforeva.appspot.com/"
pascal@13041 10 TAGS="chess"
pascal@7054 11
pascal@7054 12 # Rules to configure and make the package.
pascal@7054 13 compile_rules()
pascal@7054 14 {
pascal@7054 15 mkdir $src
pascal@7054 16 cd $src
pascal@8911 17 if [ ! -s C0_Toledo.htm ] &&
pascal@8911 18 wget http://mirror.slitaz.org/sources/packages/c/$TARBALL; then
pascal@8911 19 unlzma -c $TARBALL | tar xf -
pascal@8911 20 mv $PACKAGE-$VERSION/* .
pascal@8911 21 fi
pascal@7570 22 mkdir arts d_img img
pascal@7054 23 for i in C0_Toledo.htm c0_pgn.js c0_chess.js ; do
pascal@7054 24 [ -s $i ] && continue
pascal@8902 25 wget ${WEB_SITE}$i || return 1
pascal@7054 26 dos2unix $i
pascal@7054 27 done
pascal@7054 28 for i in arts/a_arrow ; do
pascal@7054 29 [ -s $i.gif ] && continue
pascal@8902 30 wget -P arts ${WEB_SITE}$i.gif || return 1
pascal@7054 31 done
pascal@7054 32 for i in b_plus1 b_minus1 b_topview oie_arrow_white ; do
pascal@7054 33 [ -s img/$i.gif ] && continue
pascal@8902 34 wget -P img ${WEB_SITE}img/$i.gif || return 1
pascal@7054 35 done
pascal@7054 36 for i in t oie ; do
pascal@7054 37 for j in board letters letters2 ; do
pascal@7054 38 f=${i}_$j.gif
pascal@7054 39 [ -s img/$f ] && continue
pascal@8902 40 wget -P img ${WEB_SITE}img/$f || return 1
pascal@7054 41 done
pascal@7054 42 for j in w b ; do
pascal@7054 43 for k in pawn rook knight1 knight2 bishop qeen king ; do
pascal@7054 44 f=${i}_${j}$k.gif
pascal@7054 45 [ -s img/$f ] && continue
pascal@8902 46 wget -P img ${WEB_SITE}img/$f || return 1
pascal@7054 47 done
pascal@7054 48 done
pascal@7054 49 done
pascal@7054 50 sed -i -e 's/var THide=.*/var THide=1;/' \
pascal@7054 51 -e 's/var Tnoback=.*/var Tnoback=1;/' \
pascal@7570 52 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
pascal@7054 53 -e 's|http://chess.*com/||' \
pascal@7571 54 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
pascal@7054 55 -e "s|${WEB_SITE}||" \
pascal@7054 56 C0_Toledo.htm
pascal@7054 57 sed -i -e "s|${WEB_SITE}||" *.js
pascal@7054 58 }
pascal@7054 59
pascal@7054 60 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7054 61 genpkg_rules()
pascal@7054 62 {
pascal@7054 63 mkdir -p $fs/var/www/chess3d $fs/usr/share/applications
pascal@7054 64 cp -a $src/* $fs/var/www/chess3d
pascal@7054 65 mv $fs/var/www/chess3d/C0_Toledo.htm $fs/var/www/chess3d/index.html
pascal@7054 66 chown -R 80.80 $fs/var/www/chess3d
pascal@7054 67 cat > $fs/usr/share/applications/chess3d.desktop <<EOT
pascal@7054 68 [Desktop Entry]
pascal@7054 69 Type=Application
pascal@7054 70 Name=Chess3d
slaxemulator@9600 71 Exec=browser file:///var/www/chess3d/index.html
samuel_trassare@12050 72 Icon=chess3d
pascal@7054 73 Terminal=false
pascal@7054 74 Categories=Game;
pascal@7054 75 Comment=3d chess game
pascal@7054 76 EOT
pascal@7054 77 }
pascal@7054 78