wok-6.x view nanochess/receipt @ rev 10852
Add dia back in.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Jun 12 17:57:21 2011 +0000 (2011-06-12) |
parents | 5ec8b1a4e241 |
children | 06c778aefe9f |
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 cd $src
15 _TARBALL=toledo_javascript_chess_3.html
16 [ -s ${SOURCE_REPOSITORY:-$SRC}/$_TARBALL ] ||
17 wget -P ${SOURCE_REPOSITORY:-$SRC} \
18 $(dirname $WEB_SITE)/archive/$_TARBALL
19 cp ${SOURCE_REPOSITORY:-$SRC}/$_TARBALL index.html &&
20 sed -i -e 's/<select/\♟ \→ &/' \
21 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
22 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
23 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \
24 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \
25 -e 's|<script>|<title>Toledo chess</title>&|' \
26 index.html
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 mkdir -p $fs/var/www/chess $fs/usr/share/applications
33 cp $src/* $fs/var/www/chess
34 chown -R 80.80 $fs/var/www/chess
35 cat > $fs/usr/share/applications/chess.desktop <<EOT
36 [Desktop Entry]
37 Type=Application
38 Name=Chess
39 Name[zh_CN]=国际象棋
40 Exec=browser file:///var/www/chess/index.html
41 Icon=other.png
42 Terminal=false
43 Categories=Game;
44 Comment=Chess game
45 EOT
46 }