wok-6.x view nanochess/receipt @ rev 14781

Add some licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 05 13:51:55 2013 +0200 (2013-07-05)
parents a0250385f2a5
children d51b2411e55e
line source
1 # SliTaz package receipt.
3 PACKAGE="nanochess"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="Chess game in javascript (need an unicode aware browser)"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://www.nanochess.org/"
10 TAGS="chess"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 # define colors
16 white="#f0f0b0" # was #f0f0f0
17 black="#f05030" # was #c0c0f0
18 gray="#843" # was #dde
19 background="$white" # was white
20 red="blue"
22 mkdir -p $src 2> /dev/null
23 cp $stuff/index.html $src
24 cd $src
25 sed -i -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
26 -e 's/><option.*$/>";/' -e "s/ style='font-size:20px'//" \
27 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
28 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
29 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
30 -e "s/#dde/$gray/" -e "s/red/$red/" -e 's/bgcolor=#/bgcolor=/' \
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);|' \
32 -e "s|<script>|<style>body {background: $background; overflow: hidden;} input,select {background: transparent; -webkit-appearance: none;}</style>\n<title>Toledo chess</title>&|" \
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&|' \
34 -e 's|if(y)set.*|Z();}}Z()|' \
35 index.html
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/var/www/chess $fs/usr/share/applications
42 cp $src/* $fs/var/www/chess
43 chown -R 80.80 $fs/var/www/chess
44 cat > $fs/usr/share/applications/chess.desktop <<EOT
45 [Desktop Entry]
46 Type=Application
47 Name=Chess
48 Name[zh_CN]=国际象棋
49 Exec=sh -c "url=file:///var/www/chess/index.html ; tazweb --notoolbar \$url || browser \$url"
50 Icon=other
51 Terminal=false
52 Categories=Game;
53 Comment=Chess game
54 EOT
55 }