wok annotate nanochess/receipt @ rev 10836
Add idesk (may be used for a kids flavor)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Jun 08 23:19:22 2011 +0200 (2011-06-08) |
parents | 5ec8b1a4e241 |
children | 06c778aefe9f |
rev | line source |
---|---|
pascal@7045 | 1 # SliTaz package receipt. |
pascal@7045 | 2 |
pascal@7045 | 3 PACKAGE="nanochess" |
pascal@7045 | 4 VERSION="1.0" |
pascal@7045 | 5 CATEGORY="games" |
pascal@7045 | 6 SHORT_DESC="Chess game in javascript (need an unicode aware browser)" |
pascal@7045 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@7045 | 8 WEB_SITE="http://nanochess.110mb.com/chess4.html" |
pascal@7045 | 9 |
pascal@7045 | 10 # Rules to configure and make the package. |
pascal@7045 | 11 compile_rules() |
pascal@7045 | 12 { |
pascal@10761 | 13 mkdir -p $src 2> /dev/null |
pascal@7045 | 14 cd $src |
pascal@10757 | 15 _TARBALL=toledo_javascript_chess_3.html |
pascal@10758 | 16 [ -s ${SOURCE_REPOSITORY:-$SRC}/$_TARBALL ] || |
pascal@10758 | 17 wget -P ${SOURCE_REPOSITORY:-$SRC} \ |
pascal@10758 | 18 $(dirname $WEB_SITE)/archive/$_TARBALL |
pascal@10758 | 19 cp ${SOURCE_REPOSITORY:-$SRC}/$_TARBALL index.html && |
pascal@7045 | 20 sed -i -e 's/<select/\♟ \→ &/' \ |
pascal@7611 | 21 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \ |
pascal@7075 | 22 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \ |
pascal@7045 | 23 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \ |
pascal@7045 | 24 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \ |
pascal@9606 | 25 -e 's|<script>|<title>Toledo chess</title>&|' \ |
pascal@7045 | 26 index.html |
pascal@7045 | 27 } |
pascal@7045 | 28 |
pascal@7045 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@7045 | 30 genpkg_rules() |
pascal@7045 | 31 { |
pascal@7045 | 32 mkdir -p $fs/var/www/chess $fs/usr/share/applications |
pascal@7045 | 33 cp $src/* $fs/var/www/chess |
pascal@7045 | 34 chown -R 80.80 $fs/var/www/chess |
pascal@7045 | 35 cat > $fs/usr/share/applications/chess.desktop <<EOT |
pascal@7045 | 36 [Desktop Entry] |
pascal@7045 | 37 Type=Application |
pascal@7045 | 38 Name=Chess |
lufeng369@7530 | 39 Name[zh_CN]=国际象棋 |
lufeng369@7530 | 40 Exec=browser file:///var/www/chess/index.html |
pascal@7045 | 41 Icon=other.png |
pascal@7045 | 42 Terminal=false |
pascal@7045 | 43 Categories=Game; |
pascal@7045 | 44 Comment=Chess game |
pascal@7045 | 45 EOT |
pascal@7045 | 46 } |
pascal@7045 | 47 |