wok-current diff nanochess/receipt @ rev 7045

Add nanochess & p4wn
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Nov 01 10:52:35 2010 +0100 (2010-11-01)
parents
children 7485f69c1c89
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nanochess/receipt	Mon Nov 01 10:52:35 2010 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nanochess"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="games"
     1.9 +SHORT_DESC="Chess game in javascript (need an unicode aware browser)"
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://nanochess.110mb.com/chess4.html"
    1.12 +
    1.13 +# Rules to configure and make the package.
    1.14 +compile_rules()
    1.15 +{
    1.16 +	mkdir $src
    1.17 +	cd $src
    1.18 +	wget -O index.html \
    1.19 +		$(dirname $WEB_SITE)/archive/toledo_javascript_chess_3.html
    1.20 +	sed -i -e 's/<select/\&#9823; \&rarr; &/' \
    1.21 +	  -e 's/f0f":"c0c")+"0f0/f0f":"606")+"0c0/' -e 's/e0e0f0/b0b080/' \
    1.22 +	  -e 's/><option.*$/>";/' -e 's|^doc.*|for(p=18;++p<23;)a+="<option>\&#98"+p+";</option>";document.write(a);|' \
    1.23 +		index.html
    1.24 +}
    1.25 +
    1.26 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.27 +genpkg_rules()
    1.28 +{
    1.29 +        mkdir -p $fs/var/www/chess $fs/usr/share/applications
    1.30 +	cp $src/* $fs/var/www/chess
    1.31 +	chown -R 80.80 $fs/var/www/chess
    1.32 +	cat > $fs/usr/share/applications/chess.desktop <<EOT
    1.33 +[Desktop Entry]
    1.34 +Type=Application
    1.35 +Name=Chess
    1.36 +Exec=browser file:///var/www/chess/index.html
    1.37 +Icon=other.png
    1.38 +Terminal=false
    1.39 +Categories=Game;
    1.40 +Comment=Chess game
    1.41 +EOT
    1.42 +}
    1.43 +