wok view nanochess/receipt @ rev 11097

Up: dialog to 1.1-20110707.
author Christopher Rogers <slaxemulator@gmail.com>
date Mon Oct 17 02:51:05 2011 +0000 (2011-10-17)
parents 9166aeb21102
children 7b70294d9737
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/\&#9823; \&rarr; &/' \
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>\&#98"+p+";</option>";document.write(a);|' \
21 -e 's|<script>|<title>Toledo chess</title>&|' \
22 index.html
23 }
25 # Rules to gen a SliTaz package suitable for Tazpkg.
26 genpkg_rules()
27 {
28 mkdir -p $fs/var/www/chess $fs/usr/share/applications
29 cp $src/* $fs/var/www/chess
30 chown -R 80.80 $fs/var/www/chess
31 cat > $fs/usr/share/applications/chess.desktop <<EOT
32 [Desktop Entry]
33 Type=Application
34 Name=Chess
35 Name[zh_CN]=国际象棋
36 Exec=browser file:///var/www/chess/index.html
37 Icon=other.png
38 Terminal=false
39 Categories=Game;
40 Comment=Chess game
41 EOT
42 }