wok view chess3d/receipt @ rev 7305

dropbear, openssh: typo
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 17 17:35:10 2010 +0100 (2010-11-17)
parents fd2c8977236f
children 5a787e4a31eb
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 toledoJS
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|http://chess.*com/||' \
46 -e 's|http://www.ltn.lv/~gv/toledoJS/"+|toledoJS/"|' \
47 -e "s|${WEB_SITE}||" \
48 C0_Toledo.htm
49 sed -i -e "s|${WEB_SITE}||" *.js
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/var/www/chess3d $fs/usr/share/applications
56 cp -a $src/* $fs/var/www/chess3d
57 mv $fs/var/www/chess3d/C0_Toledo.htm $fs/var/www/chess3d/index.html
58 chown -R 80.80 $fs/var/www/chess3d
59 cat > $fs/usr/share/applications/chess3d.desktop <<EOT
60 [Desktop Entry]
61 Type=Application
62 Name=Chess3d
63 Exec=GtkLauncher file:///var/www/chess3d/index.html
64 Icon=/var/www/chess3d/img/oie_wrook.gif
65 Terminal=false
66 Categories=Game;
67 Comment=3d chess game
68 EOT
69 }