diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2005-01-20 10:35:48 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2005-01-20 10:35:48 +0000 |
commit | 9eae09a7d5ca594403d1727deebfa2bb0e043b91 (patch) | |
tree | d32cc4a461edc0d95be5cb0c0f76ae8257306ac3 /net | |
parent | - Update to version 1.73, which features many bugfixes and UFS2 support (diff) |
Add vncreflector 1.2.4.
From the website:
VNC Reflector is a specialized VNC server which acts as a proxy
sitting between real VNC server (a host) and a number of VNC
clients. It was designed to work efficiently with large number
of clients.
Notes
Notes:
svn path=/head/; revision=126928
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/vncreflector/Makefile | 38 | ||||
-rw-r--r-- | net/vncreflector/distinfo | 2 | ||||
-rw-r--r-- | net/vncreflector/files/patch-Makefile | 14 | ||||
-rw-r--r-- | net/vncreflector/files/patch-main.c | 14 | ||||
-rw-r--r-- | net/vncreflector/files/patch-region.c | 13 | ||||
-rw-r--r-- | net/vncreflector/files/vncreflector.sh.in | 152 | ||||
-rw-r--r-- | net/vncreflector/pkg-descr | 5 | ||||
-rw-r--r-- | net/vncreflector/pkg-plist | 5 |
9 files changed, 244 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 2c27e1323ccb..b535b203ebd1 100644 --- a/net/Makefile +++ b/net/Makefile @@ -790,6 +790,7 @@ SUBDIR += vls SUBDIR += vnc SUBDIR += vnc2swf + SUBDIR += vncreflector SUBDIR += vomit SUBDIR += vtun SUBDIR += wais diff --git a/net/vncreflector/Makefile b/net/vncreflector/Makefile new file mode 100644 index 000000000000..6f7b07290900 --- /dev/null +++ b/net/vncreflector/Makefile @@ -0,0 +1,38 @@ +# Ports collection makefile for: vncreflector +# Date created: Wed, Jan 19 2005 +# Whom: Brooks Davis <brooks@freebsd.org> +# +# $FreeBSD$ +# + +PORTNAME= vncreflector +PORTVERSION= 1.2.4 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR=vnc-reflector +DISTNAME= vnc_reflector-${PORTVERSION} + +MAINTAINER= brooks@FreeBSD.org +COMMENT= Multi-client VNC proxy server + +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg + +USE_RC_SUBR= YES + +ALL_TARGET= default +WRKSRC= ${WRKDIR}/vnc_reflector + +SUB_FILES= vncreflector.sh +SUB_LIST= RC_SUBR=${RC_SUBR} + +do-install: + @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin + @${MKDIR} -m0750 ${PREFIX}/etc/${PORTNAME} + @${CHOWN} root:wheel ${PREFIX}/etc/${PORTNAME} + @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif + +.include <bsd.port.mk> diff --git a/net/vncreflector/distinfo b/net/vncreflector/distinfo new file mode 100644 index 000000000000..352256ff4ce1 --- /dev/null +++ b/net/vncreflector/distinfo @@ -0,0 +1,2 @@ +MD5 (vnc_reflector-1.2.4.tar.gz) = c3f88bc62f228b335c25c07f9744ab0c +SIZE (vnc_reflector-1.2.4.tar.gz) = 85600 diff --git a/net/vncreflector/files/patch-Makefile b/net/vncreflector/files/patch-Makefile new file mode 100644 index 000000000000..afe153239c62 --- /dev/null +++ b/net/vncreflector/files/patch-Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- Makefile.orig ++++ Makefile +@@ -14,7 +14,7 @@ + # + # Variables you might want to edit: CFLAGS, CONFFLAGS + +-IFLAGS = -I. ++IFLAGS = -I/usr/local/include + + # Production + CFLAGS = -O2 $(IFLAGS) diff --git a/net/vncreflector/files/patch-main.c b/net/vncreflector/files/patch-main.c new file mode 100644 index 000000000000..1ef26f414318 --- /dev/null +++ b/net/vncreflector/files/patch-main.c @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- main.c.orig ++++ main.c +@@ -464,7 +464,7 @@ + + static int init_screen_info(void) + { +- union _LITTLE_ENDIAN { ++ union { + CARD32 value32; + CARD8 test; + } little_endian; diff --git a/net/vncreflector/files/patch-region.c b/net/vncreflector/files/patch-region.c new file mode 100644 index 000000000000..ceb0f2729161 --- /dev/null +++ b/net/vncreflector/files/patch-region.c @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- region.c.orig ++++ region.c +@@ -70,6 +70,7 @@ + * * + *****************************************************************/ + ++#include <sys/types.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> diff --git a/net/vncreflector/files/vncreflector.sh.in b/net/vncreflector/files/vncreflector.sh.in new file mode 100644 index 000000000000..e6e69aa7d128 --- /dev/null +++ b/net/vncreflector/files/vncreflector.sh.in @@ -0,0 +1,152 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: vncreflector +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +_prefix="%%PREFIX%%" +_etcdir="${_prefix}/etc/vncreflector" + +# Define these vncreflector_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/vncreflector +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +vncreflector_enable=${vncreflector_enable-"NO"} +vncreflector_hostinfofile=${vncreflector_hostinfofile-"${_etcdir}/hostinfo"} +vncreflector_passwdfile=${vncreflector_passwdfile-"${_etcdir}/passwd"} +vncreflector_ports=${vncreflector_ports-"5999"} +vncreflector_requirepasswdfile=${vncreflector_requirepasswdfile-"YES"} +vncreflector_flags=${vncreflector_flags-"-q"} +vncreflector_pidfile=${vncreflector_pidfile-"/var/run/vncreflector.pid"} +vncreflector_logfile=${vncreflector_logfile-"/var/log/vncreflector.log"} +vncreflector_activefile=${vncreflector_logfile-"/var/log/vncreflector.log"} +vncreflector_addr=${vncreflector_addr-""} +#vncreflector_addr_5999= + +. /etc/rc.subr + +name="vncreflector" +rcvar=`set_rcvar` +start_cmd="vncreflector_start" +stop_cmd="vncreflector_stop" +command=${_prefix}/bin/${name} +# Disconnect from host, reread host file, reconnect. +sig_reload=USR2 + +vncreflector_start() +{ + _started=0 + + echo -n "starting ${name}:" + + rc_flags=${vncreflector_flags} + + for _port in ${vncreflector_ports}; do + echo -n " ${_port}" + pidfile="${vncreflector_pidfile}.${_port}" + rc_pid=$(check_pidfile $pidfile $command) + if [ -z "$rc_fast" -a -n "$rc_pid" ]; then + echo -n "!" + continue + fi + + _hostinfofile="" + _passwdfile="" + # if we only have one port, try the bare hostinfo + # before appending the port number. + if [ "${vncreflector_ports}" = "${_port}" -a \ + -r "${vncreflector_hostinfofile}" ]; then + _hostinfofile=${vncreflector_hostinfofile} + # if we found a bare hostinfo file, we'll also + # look for a bare passwd file + if [ -r "${vncreflector_passwdfile}" ]; then + _passwdfile=${vncreflector_passwdfile} + fi + fi + if [ -z "${_hostinfofile}" ]; then + _hostinfofile="${vncreflector_hostinfofile}.${_port}" + fi + if [ ! -r "${_hostinfofile}" ]; then + echo -n "!hostfile" + continue + fi + # if we don't have a passwdfile yet, try to use a + # port-specific one and fall back to trying a global one + if [ -z "${_passwdfile}" ]; then + _passwdfile=${vncreflector_passwdfile} + if [ -r ${_passwdfile}.${_port} ]; then + _passwdfile="${_passwdfile}.${_port}" + fi + fi + if [ -r "${_passwdfile}" ]; then + _passwdarg="-p${_passwdfile}" + else + if checkyesno vncreflector_requirepasswdfile; then + if [ -z "$rc_force" ]; then + warn "missing passwd file for ${_port}." + return 1 + else + echo -n "!passwdfile" + continue + fi + fi + _passwdarg="" + fi + if [ -z "${vncreflector_logfile}" ]; then + _logfile="/dev/null" + else + _logfile="${vncreflector_logfile}.${_port}" + fi + eval _addr=\$vncreflector_addr_${port} + if [ -z "${_addr}" ]; then + _addr=${vncreflector_addr} + fi + if [ -z "${_addr}" ]; then + unset _addr + fi + + _doit="\ +${command} ${rc_flags} \ +-i ${vncreflector_pidfile} \ +-l ${_port} \ +-g ${_logfile} \ +${_addr+-l $_addr }${_passwdfile+-p $_passwdfile } \ +${_hostinfofile}" + debug "vncreflector_start: _doit: $_doit" + eval $_doit + _started=`expr 1 + ${_started}` + done + if [ $_started -lt 1 ]; then + return 1 + fi + echo "." +} + +vncreflector_stop() +{ + echo -n "stopping ${name}: " + + _pids="" + + for _port in ${vncreflector_ports}; do + echo -n " ${_port}" + pidfile="${vncreflector_pidfile}.${_port}" + rc_pid=$(check_pidfile $pidfile $command) + if [ -n "$rc_pid" ]; then + kill $sig_stop $rc_pid + _pids="${_pids} ${rc_pid}" + else + warn "no server for port ${_port}" + fi + done + echo "." + wait_for_pids $_pids +} + +load_rc_config $name +run_rc_command $* diff --git a/net/vncreflector/pkg-descr b/net/vncreflector/pkg-descr new file mode 100644 index 000000000000..610695c4ea2f --- /dev/null +++ b/net/vncreflector/pkg-descr @@ -0,0 +1,5 @@ +VNC Reflector is a specialized VNC server which acts as a proxy sitting +between real VNC server (a host) and a number of VNC clients. It was +designed to work efficiently with large number of clients. + +WWW: http://sourceforge.net/projects/vnc-reflector/ diff --git a/net/vncreflector/pkg-plist b/net/vncreflector/pkg-plist new file mode 100644 index 000000000000..5b7b66bf6756 --- /dev/null +++ b/net/vncreflector/pkg-plist @@ -0,0 +1,5 @@ +bin/vncreflector +etc/rc.d/vncreflector.sh +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec rmdir %D/etc/vncreflector 2>/dev/null || ( echo "Configuration information saved. If you will *NOT* use this package anymore," && echo "please remove %D/etc/vncreflector and its contents manually.") |