wok-next view nanochess/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents d43bf7aae921
children
line source
1 # SliTaz package receipt v2.
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/"
11 compile_rules() {
12 # define colors
13 white="#f0f0b0" # was #f0f0f0
14 black="#f05030" # was #c0c0f0
15 gray="#843" # was #dde
16 background="$white" # was white
17 red="blue"
19 mkdir -p $src 2>/dev/null
20 cp $stuff/index.html $src
21 cd $src
22 sed -i \
23 -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
24 -e 's/><option.*$/>";/' \
25 -e "s/ style='font-size:20px'//" \
26 -e 's/50px/"+P+"px/g' \
27 -e 's/=60/="+H+"/g' \
28 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' \
29 -e 's/^"<table/for(a=&/' \
30 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
31 -e "s/#dde/$gray/" \
32 -e "s/red/$red/" \
33 -e 's/bgcolor=#/bgcolor=/' \
34 -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);|' \
35 -e "s|<script>|<style>body {background: $background; overflow: hidden;} input,select {background: transparent; -webkit-appearance: none;}</style>\n<title>Toledo chess</title>&|" \
36 -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&|' \
37 -e 's|if(y)set.*|Z();}}Z()|' \
38 index.html
40 mkdir -p \
41 $install/var/www/chess/ \
42 $install/usr/share/applications/
43 cp $src/* $install/var/www/chess/
44 chown -R 80.80 $install/var/www/chess/
45 }
47 genpkg_rules() {
48 copy @std
49 TAGS="chess"
50 }