wok-next view chess3d/receipt @ rev 21159
updated diffutils (3.6 -> 3.7)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Feb 20 08:46:59 2019 +0100 (2019-02-20) |
parents | d5aab818505e |
children |
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/"
10 HOST_ARCH="any"
12 compile_rules() {
13 mkdir -p $src
14 cd $src
16 TARBALL="$PACKAGE-$VERSION.tar.gz"
17 if [ -f $SRC/$TARBALL ]; then
18 tar -xf $SRC/$TARBALL
19 else
20 mkdir -p arts d_img img
22 for i in C0_Toledo.htm c0_pgn.js c0_chess.js; do
23 wget $WEB_SITE$i || return 1
24 dos2unix $i
25 done
27 wget -P arts ${WEB_SITE}arts/a_arrow.gif || return 1
29 for i in b_plus1 b_minus1 b_topview oie_arrow_white; do
30 wget -P img ${WEB_SITE}img/$i.gif || return 1
31 done
33 for i in t oie; do
34 for j in board letters letters2; do
35 wget -P img ${WEB_SITE}img/${i}_$j.gif || return 1
36 done
37 for j in w b; do
38 for k in pawn rook knight1 knight2 bishop qeen king; do
39 wget -P img ${WEB_SITE}img/${i}_$j$k.gif || return 1
40 done
41 done
42 done
43 tar -czf $SRC/$TARBALL *
44 fi
46 sed \
47 -e 's/var THide=.*/var THide=1;/' \
48 -e 's/var Tnoback=.*/var Tnoback=1;/' \
49 -e 's/c0_topview=true;/&\nc0_ch_topview();/' \
50 -e 's|http://chess.*com/||' \
51 -e 's|http://www.ltn.lv/~gv/to.*gif|img/b_minus1.gif|' \
52 -e "s|$WEB_SITE||" \
53 -i C0_Toledo.htm
54 sed -i -e "s|$WEB_SITE||" *.js
56 mkdir -p $install/var/www/chess3d/
57 cp -r $src/* $install/var/www/chess3d/
58 mv $install/var/www/chess3d/C0_Toledo.htm $install/var/www/chess3d/index.html
59 }
61 genpkg_rules() {
62 copy @std
63 chown -R 80.80 $fs/var/www/chess3d
64 TAGS="chess"
65 }