wok-stable annotate chess3d/receipt @ rev 12061
pcmanfm2: desktop file and icon. Was conflicting with original pcmanfm desktop files
author | Samuel Trassare <samuel_trassare@yahoo.com> |
---|---|
date | Thu Mar 08 06:50:49 2012 -0800 (2012-03-08) |
parents | 2b260f668fef |
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@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 |
slaxemulator@9600 | 70 Exec=browser file:///var/www/chess3d/index.html |
samuel_trassare@12050 | 71 Icon=chess3d |
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 |