wok-tiny view nanochess/receipt @ rev 183

linux: fix bundle.S
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 26 17:09:38 2023 +0000 (7 months ago)
parents a592b36892ba
children
line source
1 # SliTaz package receipt.
3 PACKAGE="nanochess"
4 VERSION="1.0"
5 CATEGORY="games"
6 GROUP="games"
7 SHORT_DESC="Chess game in javascript (needs an unicode aware browser)"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL"
10 WEB_SITE="http://www.nanochess.org/"
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 cd $src
24 wget -O index.html \
25 $WEB_SITE/archive/toledo_javascript_chess_3.html
26 sed -i -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
27 -e 's/><option.*$/>";/' -e "s/ style='font-size:20px'//" \
28 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
29 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
30 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
31 -e "s/#dde/$gray/" -e "s/red/$red/" -e 's/bgcolor=#/bgcolor=/' \
32 -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);|' \
33 -e "s|<script>|<style>body {background: $background; overflow: hidden;} input,select {background: transparent; -webkit-appearance: none;}</style>\n<title>Toledo chess</title>&|" \
34 -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&|' \
35 -e 's|if(y)set.*|Z();}}Z()|' \
36 index.html
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/var/www/chess
43 cp $src/index.html $fs/var/www/chess
44 }