wok-tiny view nanochess/receipt @ rev 173

Fix ctorrent-dnh & tfttest
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 14 09:04:04 2021 +0000 (2021-07-14)
parents a6d2ddc65590
children 1e55ea7da8de
line source
1 # SliTaz package receipt.
3 PACKAGE="nanochess"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="Chess game in javascript (needs an unicode aware browser)"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://www.nanochess.org/"
11 # Rules to configure and make the package.
12 compile_rules()
13 {
14 # define colors
15 white="#f0f0b0" # was #f0f0f0
16 black="#f05030" # was #c0c0f0
17 gray="#843" # was #dde
18 background="$white" # was white
19 red="blue"
21 mkdir -p $src 2> /dev/null
22 cd $src
23 wget -O index.html \
24 $WEB_SITE/archive/toledo_javascript_chess_3.html
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
42 cp $src/index.html $fs/var/www/chess
43 }