wok-next rev 699
Add: x11vnc
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 01 15:15:33 2008 +0000 (2008-05-01) |
parents | 1944d35c5a2c |
children | 711153b7d55e |
files | x11vnc/receipt x11vnc/stuff/x11vnc |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/x11vnc/receipt Thu May 01 15:15:33 2008 +0000 1.3 @@ -0,0 +1,43 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="x11vnc" 1.7 +VERSION="0.9.3" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="VNC server using X server" 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.12 +WEB_SITE="http://www.karlrunge.com/x11vnc/" 1.13 +WGET_URL="$SF_MIRROR/libvncserver/$TARBALL" 1.14 +DEPENDS="xorg xorg-libXtst openssl" 1.15 +BUILD_DEPENDS="xorg-dev xorg-libXdamage-dev xorg-libXtst-dev openssl-dev" 1.16 + 1.17 +# Rules to configure and make the package. 1.18 +compile_rules() 1.19 +{ 1.20 + cd $src 1.21 + ./configure --prefix=/usr \ 1.22 + $CONFIGURE_ARGS 1.23 + make 1.24 + make DESTDIR=$src/_pkg install 1.25 +} 1.26 + 1.27 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.28 +genpkg_rules() 1.29 +{ 1.30 + mkdir -p $fs/usr/bin $fs/etc/init.d 1.31 + cp -a $_pkg/usr/bin/x11vnc $fs/usr/bin 1.32 + cp -a stuff/x11vnc $fs/etc/init.d 1.33 +} 1.34 + 1.35 +# Post install/remove commands for Tazpkg. 1.36 +post_install() 1.37 +{ 1.38 + grep -q "^X11VNC" /etc/daemons.conf || cat >> /etc/daemons.conf <<EOT 1.39 +# VNC server options. 1.40 +X11VNC_OPTIONS="-rfbauth /etc/vnc.secret -forever" 1.41 + 1.42 +EOT 1.43 + [ -f /etc/vnc.secret ] || echo -en '\x70\x05\xE3\x8B\x81\xB0\xB2\1B' \ 1.44 + > /etc/vnc.secret # root 1.45 +} 1.46 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/x11vnc/stuff/x11vnc Thu May 01 15:15:33 2008 +0000 2.3 @@ -0,0 +1,52 @@ 2.4 +#!/bin/sh 2.5 +# /etc/init.d/x11vnc: Start, stop and restart web server on SliTaz, 2.6 +# at boot time or with the command line. Daemons options are configured 2.7 +# with /etc/daemons.conf 2.8 +# 2.9 +. /etc/init.d/rc.functions 2.10 +. /etc/daemons.conf 2.11 + 2.12 +NAME=x11vnc 2.13 +DESC="VNC server" 2.14 +DAEMON=/usr/bin/x11vnc 2.15 +OPTIONS=$X11VNC_OPTIONS 2.16 + 2.17 +case "$1" in 2.18 + start) 2.19 + if ps | grep -q $DAEMON; then 2.20 + echo "$NAME already running." 2.21 + exit 1 2.22 + fi 2.23 + echo -n "Starting $DESC: $NAME... " 2.24 + $DAEMON $OPTIONS 2.25 + status 2.26 + ;; 2.27 + stop) 2.28 + if ! ps | grep -q $DAEMON; then 2.29 + echo "$NAME is not running." 2.30 + exit 1 2.31 + fi 2.32 + echo -n "Stopping $DESC: $NAME... " 2.33 + killall $(basename $DAEMON) 2.34 + status 2.35 + ;; 2.36 + restart) 2.37 + if ! ps | grep -q $DAEMON; then 2.38 + echo "$NAME is not running." 2.39 + exit 1 2.40 + fi 2.41 + echo -n "Restarting $DESC: $NAME... " 2.42 + killall $(basename $DAEMON) 2.43 + sleep 2 2.44 + $DAEMON $OPTIONS 2.45 + status 2.46 + ;; 2.47 + *) 2.48 + echo "" 2.49 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 2.50 + echo "" 2.51 + exit 1 2.52 + ;; 2.53 +esac 2.54 + 2.55 +exit 0