wok-stable view nanochess/receipt @ rev 7048

nanochess: resize board
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 01 11:19:57 2010 +0100 (2010-11-01)
parents 181f67b20107
children 708caf752da6
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 $src
14 cd $src
15 wget -O index.html \
16 $(dirname $WEB_SITE)/archive/toledo_javascript_chess_3.html
17 sed -i -e 's/<select/\&#9823; \&rarr; &/' \
18 -e 's/50px/40px/g' -e 's/=60/=48/g' \
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 index.html
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/var/www/chess $fs/usr/share/applications
28 cp $src/* $fs/var/www/chess
29 chown -R 80.80 $fs/var/www/chess
30 cat > $fs/usr/share/applications/chess.desktop <<EOT
31 [Desktop Entry]
32 Type=Application
33 Name=Chess
34 Exec=browser file:///var/www/chess/index.html
35 Icon=other.png
36 Terminal=false
37 Categories=Game;
38 Comment=Chess game
39 EOT
40 }