wok-current annotate nanochess/receipt @ rev 15615

sudoku-savant: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 08 08:30:57 2013 +0000 (2013-12-08)
parents a0250385f2a5
children d51b2411e55e
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@14781 8 LICENSE="GPL"
pascal@14781 9 WEB_SITE="http://www.nanochess.org/"
pascal@13041 10 TAGS="chess"
pascal@7045 11
pascal@7045 12 # Rules to configure and make the package.
pascal@7045 13 compile_rules()
pascal@7045 14 {
pascal@12091 15 # define colors
pascal@12092 16 white="#f0f0b0" # was #f0f0f0
pascal@12092 17 black="#f05030" # was #c0c0f0
pascal@12091 18 gray="#843" # was #dde
pascal@12102 19 background="$white" # was white
pascal@12091 20 red="blue"
pascal@12091 21
pascal@10761 22 mkdir -p $src 2> /dev/null
slaxemulator@11041 23 cp $stuff/index.html $src
pascal@7045 24 cd $src
pascal@12094 25 sed -i -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
pascal@12100 26 -e 's/><option.*$/>";/' -e "s/ style='font-size:20px'//" \
pascal@7611 27 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
pascal@7075 28 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
pascal@12091 29 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
pascal@12092 30 -e "s/#dde/$gray/" -e "s/red/$red/" -e 's/bgcolor=#/bgcolor=/' \
pascal@12100 31 -e 's|^doc.*|yy=/\\?b/i.test(document.URL)?8:0;for(p=18;++p<23;)a+="<option>\&#9823; \&rarr; \&#98"+p+";</option>";document.write(a);|' \
pascal@12102 32 -e "s|<script>|<style>body {background: $background; overflow: hidden;} input,select {background: transparent; -webkit-appearance: none;}</style>\n<title>Toledo chess</title>&|" \
pascal@12100 33 -e 's|function Y|function Z(){if(y!=yy)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \
pascal@11614 34 -e 's|if(y)set.*|Z();}}Z()|' \
pascal@7045 35 index.html
pascal@7045 36 }
pascal@7045 37
pascal@7045 38 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@7045 39 genpkg_rules()
pascal@7045 40 {
pascal@7045 41 mkdir -p $fs/var/www/chess $fs/usr/share/applications
pascal@7045 42 cp $src/* $fs/var/www/chess
pascal@7045 43 chown -R 80.80 $fs/var/www/chess
pascal@7045 44 cat > $fs/usr/share/applications/chess.desktop <<EOT
pascal@7045 45 [Desktop Entry]
pascal@7045 46 Type=Application
pascal@7045 47 Name=Chess
lufeng369@7530 48 Name[zh_CN]=国际象棋
pascal@12095 49 Exec=sh -c "url=file:///var/www/chess/index.html ; tazweb --notoolbar \$url || browser \$url"
samuel_trassare@12029 50 Icon=other
pascal@7045 51 Terminal=false
pascal@7045 52 Categories=Game;
pascal@7045 53 Comment=Chess game
pascal@7045 54 EOT
pascal@7045 55 }
pascal@7045 56