wok-next view chess3d/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 86b5d202495a |
children | 0cbe4b1f2230 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="chess3d"
4 VERSION="1.0"
5 CATEGORY="games"
6 SHORT_DESC="3D Chess game in javascript"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL"
9 WEB_SITE="http://chessforeva.appspot.com/"
11 compile_rules() {
12 mkdir -p $src
13 cd $src
15 TARBALL="$PACKAGE-$VERSION.tar.gz"
16 if [ -f $SRC/$TARBALL ]; then
17 tar -xf $SRC/$TARBALL
18 else
19 mkdir -p arts d_img img
21 for i in C0_Toledo.htm c0_pgn.js c0_chess.js; do
22 wget $WEB_SITE$i || return 1
23 dos2unix $i
24 done
26 wget -P arts ${WEB_SITE}arts/a_arrow.gif || return 1
28 for i in b_plus1 b_minus1 b_topview oie_arrow_white; do
29 wget -P img ${WEB_SITE}img/$i.gif || return 1
30 done
32 for i in t oie; do
33 for j in board letters letters2; do
34 wget -P img ${WEB_SITE}img/${i}_$j.gif || return 1
35 done
36 for j in w b; do
37 for k in pawn rook knight1 knight2 bishop qeen king; do
38 wget -P img ${WEB_SITE}img/${i}_$j$k.gif || return 1
39 done
40 done
41 done
42 tar -czf $SRC/$TARBALL *
43 fi
45 sed \
46 -e 's/var THide=.*/var THide=1;/' \
47 -e 's/var Tnoback=.*/var Tnoback=1;/' \
48 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
49 -e 's|http://chess.*com/||' \
50 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
51 -e "s|$WEB_SITE||" \
52 -i C0_Toledo.htm
53 sed -i -e "s|$WEB_SITE||" *.js
55 mkdir -p $install/var/www/chess3d/
56 cp -r $src/* $install/var/www/chess3d/
57 mv $install/var/www/chess3d/C0_Toledo.htm $install/var/www/chess3d/index.html
58 }
60 genpkg_rules() {
61 copy @std
62 chown -R 80.80 $fs/var/www/chess3d
63 TAGS="chess"
64 }