wok view checkers/receipt @ rev 14398

Add: evas_generic_loaders
author Dominique Corbex <domcox@slitaz.org>
date Tue Apr 23 17:25:54 2013 +0200 (2013-04-23)
parents ff54c8e52d6b
children 10baa41a7882
line source
1 # SliTaz package receipt.
3 PACKAGE="checkers"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="Checkers game in javascript"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.lzma"
9 WEB_SITE="http://thierry.franquin.free.fr/jeudame/Dames.htm"
11 # Rules to configure and make the package.
12 compile_rules()
13 {
15 if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
16 unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
17 else
18 mkdir -p $src/$PACKAGE-$VERSION
19 for i in Dames.htm black.gif gray.gif \
20 me1k.gif me2k.gif you1k.gif you2k.gif \
21 me1.gif me2.gif you1.gif you2.gif ; do
22 [ -s $i ] || wget -O $src/$PACKAGE-$VERSION/$i $(dirname $WEB_SITE)/$i
23 done
24 cd $src
25 tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si
26 mv $PACKAGE-$VERSION/* .
27 rm -rf $PACKAGE-$VERSION
28 fi
30 cd $src
31 grep -qs Dames_htm_smartbutton1 Dames.htm || return 0
32 sed -i -e 's|TITLE>.*</TITLE|TITLE>Checkers</TITLE|' \
33 -e 's|background="nth_brown_bg.gif" ||' \
34 -e 's|cellpadding=0|& align=center|' \
35 -e '/Vous devez commencer/d' \
36 -e '/version = 1.0;/,/Checkers Game/d' \
37 -e '/wrap=virtual/d' \
38 -e '/marrer le jeu/d' \
39 -e '/Dames_htm_smartbutton1/d' \
40 -e 's|table><br>"|&);|' \
41 Dames.htm
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/var/www/checkers $fs/usr/share/applications
48 cp $src/* $fs/var/www/checkers
49 mv $fs/var/www/checkers/Dames.htm $fs/var/www/checkers/index.html
50 chown -R 80.80 $fs/var/www/checkers
51 cat > $fs/usr/share/applications/checkers.desktop <<EOT
52 [Desktop Entry]
53 Type=Application
54 Name=Checkers
55 Exec=browser file:///var/www/checkers/index.html
56 Icon=checkers
57 Terminal=false
58 Categories=Game;
59 Comment=Checkers game
60 EOT
61 }