wok view chess3d/receipt @ rev 9721

pangomm: Add cairomm-dev and glibmm-dev to build depends.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon May 09 01:41:52 2011 +0000 (2011-05-09)
parents 27286c6c490f
children 4fcc858c8d57
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 TARBALL="$PACKAGE-$VERSION.tar.lzma"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 WEB_SITE="http://chessforeva.appspot.com/"
11 # Rules to configure and make the package.
12 compile_rules()
13 {
14 mkdir $src
15 cd $src
16 if [ ! -s C0_Toledo.htm ] &&
17 wget http://mirror.slitaz.org/sources/packages/c/$TARBALL; then
18 unlzma -c $TARBALL | tar xf -
19 mv $PACKAGE-$VERSION/* .
20 fi
21 mkdir arts d_img img
22 for i in C0_Toledo.htm c0_pgn.js c0_chess.js ; do
23 [ -s $i ] && continue
24 wget ${WEB_SITE}$i || return 1
25 dos2unix $i
26 done
27 for i in arts/a_arrow ; do
28 [ -s $i.gif ] && continue
29 wget -P arts ${WEB_SITE}$i.gif || return 1
30 done
31 for i in b_plus1 b_minus1 b_topview oie_arrow_white ; do
32 [ -s img/$i.gif ] && continue
33 wget -P img ${WEB_SITE}img/$i.gif || return 1
34 done
35 for i in t oie ; do
36 for j in board letters letters2 ; do
37 f=${i}_$j.gif
38 [ -s img/$f ] && continue
39 wget -P img ${WEB_SITE}img/$f || return 1
40 done
41 for j in w b ; do
42 for k in pawn rook knight1 knight2 bishop qeen king ; do
43 f=${i}_${j}$k.gif
44 [ -s img/$f ] && continue
45 wget -P img ${WEB_SITE}img/$f || return 1
46 done
47 done
48 done
49 sed -i -e 's/var THide=.*/var THide=1;/' \
50 -e 's/var Tnoback=.*/var Tnoback=1;/' \
51 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
52 -e 's|http://chess.*com/||' \
53 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
54 -e "s|${WEB_SITE}||" \
55 C0_Toledo.htm
56 sed -i -e "s|${WEB_SITE}||" *.js
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/var/www/chess3d $fs/usr/share/applications
63 cp -a $src/* $fs/var/www/chess3d
64 mv $fs/var/www/chess3d/C0_Toledo.htm $fs/var/www/chess3d/index.html
65 chown -R 80.80 $fs/var/www/chess3d
66 cat > $fs/usr/share/applications/chess3d.desktop <<EOT
67 [Desktop Entry]
68 Type=Application
69 Name=Chess3d
70 Exec=browser file:///var/www/chess3d/index.html
71 Icon=/var/www/chess3d/img/oie_wrook.gif
72 Terminal=false
73 Categories=Game;
74 Comment=3d chess game
75 EOT
76 }