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