wok-current view hatenarunner/receipt @ rev 15650
Up: libcss (0.1.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 10 16:14:37 2013 +0000 (2013-12-10) |
parents | 979bff15a1bc |
children | 8dd8bab3f0ca |
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 LICENSE="MIT"
9 WEB_SITE="http://lodedome.no-ip.com/"
10 TARBALL="JavaScript_Hatena.Runner_Satoshi.Ueyama.zip"
11 #_WGET_URL="http://lodedome.no-ip.com/download.php?rfname=$TARBALL&request_id=Lode_5BBAB6F85D944A4A5CB7AC12B0BFD18D"
12 WGET_URL="http://mirror.slitaz.org/sources/packages/${TARBALL:0:1}/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 unzip -o HatenaRunner_MainGameScript.zip
19 rm -f HatenaRunner_MainGameScript.zip
20 dos2unix js/* *.htm *.css
21 # Add u, i, o, j, k, and l keys
22 sed -i -e 's/104:$/& case 73: case 105:/' \
23 -e 's/98:$/& case 75: case 107:/' \
24 -e 's/100:$/& case 74: case 106:/' \
25 -e 's/102:$/& case 76: case 108:/' \
26 -e 's/88:/& case 79: case 111:/' \
27 -e 's/90:/& case 85: case 117:/' \
28 js/key.js
29 sed -i -e 's/<title>.*</<title>Lode Runner</' \
30 -e 's/preStart()"/preStart(); javascript:init();"/' \
31 -e '/a href=/d' -e '/li>/d' -e '/ul>/d' -e '/Explorer/d' \
32 runner.htm
33 rm -rf images/start.png images/hrlogo.png ScreenS Docs Unknown \
34 users favicon.ico icon.png
35 mv runner.htm index.html
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/var/www/lode $fs/usr/share/applications
42 cp -a $src/* $fs/var/www/lode
43 chown -R 80.80 $fs/var/www/lode
44 cat > $fs/usr/share/applications/lode.desktop <<EOT
45 [Desktop Entry]
46 Type=Application
47 Name=Lode runner
48 Exec=browser file:///var/www/lode/index.html
49 Icon=/var/www/lode/images/o0.gif
50 Terminal=false
51 Categories=Game;
52 Comment=Lode runner clone
53 EOT
54 }