wok-current view nanochess/receipt @ rev 9715
glibc-base: remove post_install() it not working and not usefull
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 08 23:49:22 2011 +0200 (2011-05-08) |
parents | 73ab298e6796 |
children | 274662686de1 |
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/\♟ \→ &/' \
18 -e 's/50px/"+P+"px/g' -e 's/=60/="+H+"/g' \
19 -e 's|for(a=|H=innerHeight/9;P=H*5/6;|' -e 's/^"<table/for(a=&/' \
20 -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \
21 -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\b"+p+";</option>";document.write(a);|' \
22 -e 's|<script>|<title>Toledo chess</title>&|' \
23 index.html
24 }
26 # Rules to gen a SliTaz package suitable for Tazpkg.
27 genpkg_rules()
28 {
29 mkdir -p $fs/var/www/chess $fs/usr/share/applications
30 cp $src/* $fs/var/www/chess
31 chown -R 80.80 $fs/var/www/chess
32 cat > $fs/usr/share/applications/chess.desktop <<EOT
33 [Desktop Entry]
34 Type=Application
35 Name=Chess
36 Name[zh_CN]=国际象棋
37 Exec=browser file:///var/www/chess/index.html
38 Icon=other.png
39 Terminal=false
40 Categories=Game;
41 Comment=Chess game
42 EOT
43 }