wok-next annotate nanochess/receipt @ rev 20907

slitaz-base-files: set correct SLITAZ_ARCH in slitaz.conf (affected x86_64) - thanks shann
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Aug 10 15:39:58 2018 +0300 (2018-08-10)
parents d43bf7aae921
children
rev   line source
al@20513 1 # SliTaz package receipt v2.
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@7045 10
al@20513 11 compile_rules() {
pascal@12091 12 # define colors
al@20513 13 white="#f0f0b0" # was #f0f0f0
al@20513 14 black="#f05030" # was #c0c0f0
al@20513 15 gray="#843" # was #dde
al@20513 16 background="$white" # was white
al@20513 17 red="blue"
al@20513 18
al@20513 19 mkdir -p $src 2>/dev/null
slaxemulator@11041 20 cp $stuff/index.html $src
pascal@7045 21 cd $src
al@20513 22 sed -i \
al@20513 23 -e 's/<select/<input type=\\"button\\" value=\\"\&#9818; \&hArr; \&#9812;\\" onclick=\\"yy^=8;Z()\\">&/' \
al@20513 24 -e 's/><option.*$/>";/' \
al@20513 25 -e "s/ style='font-size:20px'//" \
al@20513 26 -e 's/50px/"+P+"px/g' \
al@20513 27 -e 's/=60/="+H+"/g' \
al@20513 28 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' \
al@20513 29 -e 's/^"<table/for(a=&/' \
al@20513 30 -e "s/c0c\":\"f0f\")+\"0f0/$white\":\"$black\")+\"/" \
al@20513 31 -e "s/#dde/$gray/" \
al@20513 32 -e "s/red/$red/" \
al@20513 33 -e 's/bgcolor=#/bgcolor=/' \
al@20513 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);|' \
al@20513 35 -e "s|<script>|<style>body {background: $background; overflow: hidden;} input,select {background: transparent; -webkit-appearance: none;}</style>\n<title>Toledo chess</title>&|" \
al@20513 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&|' \
al@20513 37 -e 's|if(y)set.*|Z();}}Z()|' \
pascal@7045 38 index.html
al@20513 39
al@20513 40 mkdir -p \
al@20513 41 $install/var/www/chess/ \
al@20513 42 $install/usr/share/applications/
al@20513 43 cp $src/* $install/var/www/chess/
pascal@20517 44 chown -R 80.80 $install/var/www/chess/
pascal@7045 45 }
pascal@7045 46
al@20513 47 genpkg_rules() {
al@20513 48 copy @std
al@20513 49 TAGS="chess"
pascal@7045 50 }