wok-tiny rev 59

Add fbvnc
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 07 22:40:17 2011 +0200 (2011-09-07)
parents 5a16a50be476
children 62c5d986fb7c
files fbvnc/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/fbvnc/receipt	Wed Sep 07 22:40:17 2011 +0200
     1.3 @@ -0,0 +1,63 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="fbvnc"
     1.7 +VERSION="20110416"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="VNC client in frame buffer."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://repo.or.cz/w/fbvnc.git"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13 +[ -n "$TARGET" ] || TARGET="i486"
    1.14 +BUILD_DEPENDS="uclibc-cross-compiler-$TARGET"
    1.15 +DEPENDS="base-tiny"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	[ -s $SOURCES_REPOSITORY/$TARBALL ] || 
    1.21 +	  wget -O $SOURCES_REPOSITORY/$TARBALL \
    1.22 +	   $WEB_SITE/snapshot/e42bc02b14b3331e7c7f45c6b42179d0af99ed7b.tar.gz
    1.23 +	tar xzf $SOURCES_REPOSITORY/$TARBALL
    1.24 +	mv $PACKAGE $src
    1.25 +	cd $src
    1.26 +	sed -i "s/^CC.*/CC = uclibc-$TARGET-gcc/" Makefile
    1.27 +	make && uclibc-$TARGET-strip fbvnc
    1.28 +}
    1.29 +
    1.30 +
    1.31 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.32 +genpkg_rules()
    1.33 +{
    1.34 +	mkdir -p $fs/usr/bin
    1.35 +	cp $src/fbvnc $fs/usr/bin
    1.36 +}
    1.37 +
    1.38 +config_form()
    1.39 +{
    1.40 +	CHECKED=" checked=checked"
    1.41 +	[ "$START" == "on" ] || CHECKED=""
    1.42 +	[ -n "$PORT" ] || PORT=5900
    1.43 +	cat <<EOT
    1.44 +<table>
    1.45 +<tr>
    1.46 +<td>Autostart</td>
    1.47 +<td><input type="checkbox"$CHECKED name="START"></td>
    1.48 +</tr>
    1.49 +<tr>
    1.50 +<td>Server</td>
    1.51 +<td><input type="text" name="SERVER"></td>
    1.52 +</tr>
    1.53 +<tr>
    1.54 +<td>Port</td>
    1.55 +<td><input type="text" name="PORT" value="$PORT"></td>
    1.56 +</tr>
    1.57 +</table>
    1.58 +EOT
    1.59 +}
    1.60 +
    1.61 +post_install()
    1.62 +{
    1.63 +	[ "$START" == "on" ] && cat >> $1/etc/init.d/local.sh <<EOT
    1.64 +fbvnc $SERVER $PORT &
    1.65 +EOT
    1.66 +}