wok-current view hatenarunner/receipt @ rev 7100

Add grep
author Paul Issott <paul@slitaz.org>
date Wed Nov 03 10:07:25 2010 +0000 (2010-11-03)
parents
children 717afcb65646
line source
1 # SliTaz package receipt.
3 PACKAGE="hatenarunner"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="Loderunner game in javascript"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://lodedome.no-ip.com/"
9 TARBALL="JavaScript_Hatena.Runner_Satoshi.Ueyama.zip"
10 _WGET_URL="http://lodedome.no-ip.com/download.php?rfname=$TARBALL&request_id=Lode_5BBAB6F85D944A4A5CB7AC12B0BFD18D"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 mkdir $src
16 cd $src
17 if [ ! -s $SOURCES_REPOSITORY/$TARBALL ]; then
18 wget $_WGET_URL -O $TARBALL
19 mv $TARBALL $SOURCES_REPOSITORY
20 fi
21 unzip $SOURCES_REPOSITORY/$TARBALL
22 unzip HatenaRunner_MainGameScript.zip
23 rm -f HatenaRunner_MainGameScript.zip
24 dos2unix js/* *.htm *.css
25 # Add u, i, o, j, k, and l keys
26 sed -i -e 's/104:$/& case 73: case 105:/' \
27 -e 's/98:$/& case 75: case 107:/' \
28 -e 's/100:$/& case 74: case 106:/' \
29 -e 's/102:$/& case 76: case 108:/' \
30 -e 's/88:/& case 79: case 111:/' \
31 -e 's/90:/& case 85: case 117:/' \
32 js/key.js
33 sed -i -e 's/<title>.*</<title>Lode Runner</' \
34 -e 's/preStart()"/preStart(); javascript:init();"/' \
35 -e '/a href=/d' -e '/li>/d' -e '/ul>/d' -e '/Explorer/d' \
36 runner.htm
37 rm -rf images/start.png images/hrlogo.png ScreenS Docs Unknown \
38 users favicon.ico icon.png
39 mv runner.htm index.html
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/var/www/lode $fs/usr/share/applications
46 cp -a $src/* $fs/var/www/lode
47 chown -R 80.80 $fs/var/www/lode
48 cat > $fs/usr/share/applications/lode.desktop <<EOT
49 [Desktop Entry]
50 Type=Application
51 Name=Lode runner
52 Exec=browser file:///var/www/lode/index.html
53 Icon=/var/www/lode/images/o0.gif
54 Terminal=false
55 Categories=Game;
56 Comment=Lode runner clone
57 EOT
58 }