wok-next view nanochess/receipt @ rev 11771
zsh: does not support bb :(
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 23 14:41:48 2012 +0100 (2012-02-23) |
parents | 7b70294d9737 |
children | ff54c8e52d6b |
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 WEB_SITE="http://nanochess.110mb.com/chess4.html"
10 # Rules to configure and make the package.
11 compile_rules()
12 {
13 mkdir -p $src 2> /dev/null
14 cp $stuff/index.html $src
15 cd $src
16 sed -i -e 's/<select/\♟ \→ &/' \
17 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
18 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
19 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \
20 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \
21 -e 's|<script>|<title>Toledo chess</title>&|' \
22 -e 's|function Y|function Z(){if(y!=/\\?b/i.test(document.URL)?8:0)setTimeout("X(0,0,0,21,u,2),X(0,0,0,21,u,1)",250);}\n&|' \
23 -e 's|if(y)set.*|Z();}}Z()|' \
24 index.html
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/var/www/chess $fs/usr/share/applications
31 cp $src/* $fs/var/www/chess
32 chown -R 80.80 $fs/var/www/chess
33 cat > $fs/usr/share/applications/chess.desktop <<EOT
34 [Desktop Entry]
35 Type=Application
36 Name=Chess
37 Name[zh_CN]=国际象棋
38 Exec=browser file:///var/www/chess/index.html
39 Icon=other.png
40 Terminal=false
41 Categories=Game;
42 Comment=Chess game
43 EOT
44 }