wok-6.x view chess3d/receipt @ rev 8293
Up: slitaz-tools-boxes to 4.0.3.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Jan 30 23:48:19 2011 +0000 (2011-01-30) |
parents | 5a787e4a31eb |
children | 833db15b2a74 |
line source
1 # SliTaz package receipt.
3 PACKAGE="chess3d"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="3D Chess game in javascript"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://chessforeva.appspot.com/"
10 # Rules to configure and make the package.
11 compile_rules()
12 {
13 mkdir $src
14 cd $src
15 mkdir arts d_img img
16 for i in C0_Toledo.htm c0_pgn.js c0_chess.js ; do
17 [ -s $i ] && continue
18 wget ${WEB_SITE}$i
19 dos2unix $i
20 done
21 for i in arts/a_arrow ; do
22 [ -s $i.gif ] && continue
23 wget -P arts ${WEB_SITE}$i.gif
24 done
25 for i in b_plus1 b_minus1 b_topview oie_arrow_white ; do
26 [ -s img/$i.gif ] && continue
27 wget -P img ${WEB_SITE}img/$i.gif
28 done
29 for i in t oie ; do
30 for j in board letters letters2 ; do
31 f=${i}_$j.gif
32 [ -s img/$f ] && continue
33 wget -P img ${WEB_SITE}img/$f
34 done
35 for j in w b ; do
36 for k in pawn rook knight1 knight2 bishop qeen king ; do
37 f=${i}_${j}$k.gif
38 [ -s img/$f ] && continue
39 wget -P img ${WEB_SITE}img/$f
40 done
41 done
42 done
43 sed -i -e 's/var THide=.*/var THide=1;/' \
44 -e 's/var Tnoback=.*/var Tnoback=1;/' \
45 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
46 -e 's|http://chess.*com/||' \
47 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
48 -e "s|${WEB_SITE}||" \
49 C0_Toledo.htm
50 sed -i -e "s|${WEB_SITE}||" *.js
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p $fs/var/www/chess3d $fs/usr/share/applications
57 cp -a $src/* $fs/var/www/chess3d
58 mv $fs/var/www/chess3d/C0_Toledo.htm $fs/var/www/chess3d/index.html
59 chown -R 80.80 $fs/var/www/chess3d
60 cat > $fs/usr/share/applications/chess3d.desktop <<EOT
61 [Desktop Entry]
62 Type=Application
63 Name=Chess3d
64 Exec=GtkLauncher file:///var/www/chess3d/index.html
65 Icon=/var/www/chess3d/img/oie_wrook.gif
66 Terminal=false
67 Categories=Game;
68 Comment=3d chess game
69 EOT
70 }