wok-stable annotate chess3d/receipt @ rev 9487

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