wok-stable
annotate nanochess/receipt @ rev 11938
libwebkit: fixed wget filename
author |
Samuel Trassare <samuel_trassare@yahoo.com> |
date |
Wed Feb 29 21:27:14 2012 -0800 (2012-02-29) |
parents |
7b70294d9737 |
children |
ff54c8e52d6b |
rev |
line source |
pascal@7045
|
1 # SliTaz package receipt.
|
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@7045
|
8 WEB_SITE="http://nanochess.110mb.com/chess4.html"
|
pascal@7045
|
9
|
pascal@7045
|
10 # Rules to configure and make the package.
|
pascal@7045
|
11 compile_rules()
|
pascal@7045
|
12 {
|
pascal@10761
|
13 mkdir -p $src 2> /dev/null
|
slaxemulator@11041
|
14 cp $stuff/index.html $src
|
pascal@7045
|
15 cd $src
|
pascal@7045
|
16 sed -i -e 's/<select/\♟ \→ &/' \
|
pascal@7611
|
17 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
|
pascal@7075
|
18 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
|
pascal@7045
|
19 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \
|
pascal@7045
|
20 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \
|
pascal@11615
|
21 -e 's|<script>|<title>Toledo chess</title>&|' \
|
pascal@11615
|
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&|' \
|
pascal@11614
|
23 -e 's|if(y)set.*|Z();}}Z()|' \
|
pascal@7045
|
24 index.html
|
pascal@7045
|
25 }
|
pascal@7045
|
26
|
pascal@7045
|
27 # Rules to gen a SliTaz package suitable for Tazpkg.
|
pascal@7045
|
28 genpkg_rules()
|
pascal@7045
|
29 {
|
pascal@7045
|
30 mkdir -p $fs/var/www/chess $fs/usr/share/applications
|
pascal@7045
|
31 cp $src/* $fs/var/www/chess
|
pascal@7045
|
32 chown -R 80.80 $fs/var/www/chess
|
pascal@7045
|
33 cat > $fs/usr/share/applications/chess.desktop <<EOT
|
pascal@7045
|
34 [Desktop Entry]
|
pascal@7045
|
35 Type=Application
|
pascal@7045
|
36 Name=Chess
|
lufeng369@7530
|
37 Name[zh_CN]=国际象棋
|
lufeng369@7530
|
38 Exec=browser file:///var/www/chess/index.html
|
pascal@7045
|
39 Icon=other.png
|
pascal@7045
|
40 Terminal=false
|
pascal@7045
|
41 Categories=Game;
|
pascal@7045
|
42 Comment=Chess game
|
pascal@7045
|
43 EOT
|
pascal@7045
|
44 }
|
pascal@7045
|
45
|