wok-tiny view fbvnc/receipt @ rev 59

Add fbvnc
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 07 22:40:17 2011 +0200 (2011-09-07)
parents
children 62c5d986fb7c
line source
1 # SliTaz package receipt.
3 PACKAGE="fbvnc"
4 VERSION="20110416"
5 CATEGORY="network"
6 SHORT_DESC="VNC client in frame buffer."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://repo.or.cz/w/fbvnc.git"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 [ -n "$TARGET" ] || TARGET="i486"
11 BUILD_DEPENDS="uclibc-cross-compiler-$TARGET"
12 DEPENDS="base-tiny"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 [ -s $SOURCES_REPOSITORY/$TARBALL ] ||
18 wget -O $SOURCES_REPOSITORY/$TARBALL \
19 $WEB_SITE/snapshot/e42bc02b14b3331e7c7f45c6b42179d0af99ed7b.tar.gz
20 tar xzf $SOURCES_REPOSITORY/$TARBALL
21 mv $PACKAGE $src
22 cd $src
23 sed -i "s/^CC.*/CC = uclibc-$TARGET-gcc/" Makefile
24 make && uclibc-$TARGET-strip fbvnc
25 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/bin
32 cp $src/fbvnc $fs/usr/bin
33 }
35 config_form()
36 {
37 CHECKED=" checked=checked"
38 [ "$START" == "on" ] || CHECKED=""
39 [ -n "$PORT" ] || PORT=5900
40 cat <<EOT
41 <table>
42 <tr>
43 <td>Autostart</td>
44 <td><input type="checkbox"$CHECKED name="START"></td>
45 </tr>
46 <tr>
47 <td>Server</td>
48 <td><input type="text" name="SERVER"></td>
49 </tr>
50 <tr>
51 <td>Port</td>
52 <td><input type="text" name="PORT" value="$PORT"></td>
53 </tr>
54 </table>
55 EOT
56 }
58 post_install()
59 {
60 [ "$START" == "on" ] && cat >> $1/etc/init.d/local.sh <<EOT
61 fbvnc $SERVER $PORT &
62 EOT
63 }