wok-6.x view checkers/receipt @ rev 17297

.hgignore: fix ignore rules
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Oct 30 10:25:56 2014 +0200 (2014-10-30)
parents 4fcc858c8d57
children
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 LICENSE="unknown"
9 TARBALL="$PACKAGE-$VERSION.tar.lzma"
10 WEB_SITE="http://thierry.franquin.free.fr/jeudame/Dames.htm"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
16 if [ -f $SOURCES_REPOSITORY/$TARBALL ]; then
17 unlzma -c $SOURCES_REPOSITORY/$TARBALL | tar xf -
18 else
19 mkdir -p $src/$PACKAGE-$VERSION
20 for i in Dames.htm black.gif gray.gif \
21 me1k.gif me2k.gif you1k.gif you2k.gif \
22 me1.gif me2.gif you1.gif you2.gif ; do
23 [ -s $i ] || wget -O $src/$PACKAGE-$VERSION/$i $(dirname $WEB_SITE)/$i
24 done
25 cd $src
26 tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si
27 mv $PACKAGE-$VERSION/* .
28 rm -rf $PACKAGE-$VERSION
29 fi
31 cd $src
32 grep -qs Dames_htm_smartbutton1 Dames.htm || return 0
33 sed -i -e 's|TITLE>.*</TITLE|TITLE>Checkers</TITLE|' \
34 -e 's|background="nth_brown_bg.gif" ||' \
35 -e 's|cellpadding=0|& align=center|' \
36 -e '/Vous devez commencer/d' \
37 -e '/version = 1.0;/,/Checkers Game/d' \
38 -e '/wrap=virtual/d' \
39 -e '/marrer le jeu/d' \
40 -e '/Dames_htm_smartbutton1/d' \
41 -e 's|table><br>"|&);|' \
42 Dames.htm
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs/var/www/checkers $fs/usr/share/applications
49 cp $src/* $fs/var/www/checkers
50 mv $fs/var/www/checkers/Dames.htm $fs/var/www/checkers/index.html
51 chown -R 80.80 $fs/var/www/checkers
52 cat > $fs/usr/share/applications/checkers.desktop <<EOT
53 [Desktop Entry]
54 Type=Application
55 Name=Checkers
56 Exec=browser file:///var/www/checkers/index.html
57 Icon=checkers
58 Terminal=false
59 Categories=Game;
60 Comment=Checkers game
61 EOT
62 }