wok annotate chess3d/receipt @ rev 24170

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