wok-6.x rev 7054
Add chess3d
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 01 15:18:33 2010 +0100 (2010-11-01) |
parents | 5ec0cb881299 |
children | 5a5147505edf |
files | chess3d/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/chess3d/receipt Mon Nov 01 15:18:33 2010 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="chess3d" 1.7 +VERSION="1.0" 1.8 +CATEGORY="games" 1.9 +SHORT_DESC="3D Chess game in javascript" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://chessforeva.appspot.com/" 1.12 + 1.13 +# Rules to configure and make the package. 1.14 +compile_rules() 1.15 +{ 1.16 + mkdir $src 1.17 + cd $src 1.18 + mkdir arts d_img img toledoJS 1.19 + for i in C0_Toledo.htm c0_pgn.js c0_chess.js ; do 1.20 + [ -s $i ] && continue 1.21 + wget ${WEB_SITE}$i 1.22 + dos2unix $i 1.23 + done 1.24 + for i in arts/a_arrow ; do 1.25 + [ -s $i.gif ] && continue 1.26 + wget -P arts ${WEB_SITE}$i.gif 1.27 + done 1.28 + for i in b_plus1 b_minus1 b_topview oie_arrow_white ; do 1.29 + [ -s img/$i.gif ] && continue 1.30 + wget -P img ${WEB_SITE}img/$i.gif 1.31 + done 1.32 + for i in t oie ; do 1.33 + for j in board letters letters2 ; do 1.34 + f=${i}_$j.gif 1.35 + [ -s img/$f ] && continue 1.36 + wget -P img ${WEB_SITE}img/$f 1.37 + done 1.38 + for j in w b ; do 1.39 + for k in pawn rook knight1 knight2 bishop qeen king ; do 1.40 + f=${i}_${j}$k.gif 1.41 + [ -s img/$f ] && continue 1.42 + wget -P img ${WEB_SITE}img/$f 1.43 + done 1.44 + done 1.45 + done 1.46 + sed -i -e 's/var THide=.*/var THide=1;/' \ 1.47 + -e 's/var Tnoback=.*/var Tnoback=1;/' \ 1.48 + -e 's|http://chess.*com/||' \ 1.49 + -e 's|http://www.ltn.lv/~gv/toledoJS/"+|toledoJS/"|' \ 1.50 + -e "s|${WEB_SITE}||" \ 1.51 + C0_Toledo.htm 1.52 + sed -i -e "s|${WEB_SITE}||" *.js 1.53 +} 1.54 + 1.55 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.56 +genpkg_rules() 1.57 +{ 1.58 + mkdir -p $fs/var/www/chess3d $fs/usr/share/applications 1.59 + cp -a $src/* $fs/var/www/chess3d 1.60 + mv $fs/var/www/chess3d/C0_Toledo.htm $fs/var/www/chess3d/index.html 1.61 + chown -R 80.80 $fs/var/www/chess3d 1.62 + cat > $fs/usr/share/applications/chess3d.desktop <<EOT 1.63 +[Desktop Entry] 1.64 +Type=Application 1.65 +Name=Chess3d 1.66 +Exec=browser file:///var/www/chess3d/index.html 1.67 +Icon=/var/www/chess3d/img/oie_wrook.gif 1.68 +Terminal=false 1.69 +Categories=Game; 1.70 +Comment=3d chess game 1.71 +EOT 1.72 +} 1.73 +