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