ports/104697: [new port] net/uproxy
Alexander Logvinov
ports at logvinov.com
Mon Oct 23 01:00:32 UTC 2006
>Number: 104697
>Category: ports
>Synopsis: [new port] net/uproxy
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 23 01:00:30 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Alexander Logvinov
>Release: FreeBSD 6.1-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
Proxy for UDP protocols initially has been designed
to allow playing Unreal Tournament matches over
Internet on computers connected by a LAN sharing
a dial up connection.
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# uproxy
# uproxy/Makefile
# uproxy/pkg-descr
# uproxy/distinfo
# uproxy/files
# uproxy/files/patch-uproxy.c
# uproxy/files/uproxy.in
#
echo c - uproxy
mkdir -p uproxy > /dev/null 2>&1
echo x - uproxy/Makefile
sed 's/^X//' >uproxy/Makefile << 'END-of-uproxy/Makefile'
X# New ports collection makefile for: uproxy
X# Date created: 19 October 2006
X# Whom: Alexander Logvinov <ports at logvinov.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME= uproxy
XPORTVERSION= 0.91
XCATEGORIES= net
XMASTER_SITES= http://www.geocities.com/SiliconValley/Vista/8155/uproxy/
XDISTNAME= ${PORTNAME}
X
XMAINTAINER= ports at logvinov.com
XCOMMENT= Proxy for UDP protocols
X
XUSE_ZIP= yes
XNO_WRKSUBDIR= yes
XUSE_RC_SUBR= ${PORTNAME}
XPORTDOCS= index.html
XPLIST_FILES= sbin/${PORTNAME}
X
Xdo-build:
X (cd ${WRKSRC} && ${CC} ${CFLAGS} -o t${PORTNAME} ${DISTNAME}.c)
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/t${PORTNAME} ${PREFIX}/sbin/${PORTNAME}
X.if !defined(NOPORTDOCS)
X @${MKDIR} ${DOCSDIR}
X.for i in ${PORTDOCS}
X ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
X.endfor
X.endif
X
X.include <bsd.port.mk>
END-of-uproxy/Makefile
echo x - uproxy/pkg-descr
sed 's/^X//' >uproxy/pkg-descr << 'END-of-uproxy/pkg-descr'
XInitially UProxy has been designed to allow playing
XUnreal Tournament matches over Internet on computers
Xconnected by a LAN sharing a dial up connection, but
Xit could be used to play other games (such as Quake)
Xand by every program using a UDP protocol where clients
Xdon't have to bind a fixed port (not only games!).
X
XWWW: http://www.geocities.com/SiliconValley/Vista/8155/uproxy/
END-of-uproxy/pkg-descr
echo x - uproxy/distinfo
sed 's/^X//' >uproxy/distinfo << 'END-of-uproxy/distinfo'
XMD5 (uproxy.zip) = 9a484a9d328bf8baf79cfdbc99ccb285
XSHA256 (uproxy.zip) = 960f61dbce2d83a856726a223136f6e5ac2dc31d75958e36ac01cdf17a589645
XSIZE (uproxy.zip) = 17541
END-of-uproxy/distinfo
echo c - uproxy/files
mkdir -p uproxy/files > /dev/null 2>&1
echo x - uproxy/files/patch-uproxy.c
sed 's/^X//' >uproxy/files/patch-uproxy.c << 'END-of-uproxy/files/patch-uproxy.c'
X--- uproxy.c.orig Thu Aug 10 11:05:10 2006
X+++ uproxy.c Fri Oct 20 13:17:01 2006
X@@ -25,11 +25,11 @@
X #include <winsock.h>
X #else
X #include <sys/ioctl.h>
X+ #include <sys/types.h>
X #include <sys/socket.h>
X #include <netinet/in.h>
X #include <arpa/inet.h>
X #include <sys/time.h>
X- #include <sys/types.h>
X #include <unistd.h>
X #include <stdlib.h>
X #endif
X@@ -50,7 +50,7 @@
X
X SOCKET ProxySocket;
X struct sockaddr_in ProxySAddr, ClientSAddr, TargetSAddr;
X-struct sockaddr AnySAddr={AF_INET, {INADDR_ANY}};
X+struct sockaddr AnySAddr={AF_INET, INADDR_ANY};
X struct ClientList
X {
X SOCKET sock;
END-of-uproxy/files/patch-uproxy.c
echo x - uproxy/files/uproxy.in
sed 's/^X//' >uproxy/files/uproxy.in << 'END-of-uproxy/files/uproxy.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X#
X# PROVIDE: uproxy
X# REQUIRE: NETWORKING
X#
X# Add the following line to /etc/rc.conf to enable uproxy
X#
X# uproxy_enable (bool): Set to "NO" by default.
X# Set it to "YES" to enable uproxy.
X# uproxy_connections (str): Name for each uproxy connection.
X# uproxy_connectionname_options (str): Commandline for each uproxy connection.
X#
X
X. %%RC_SUBR%%
X
Xname="uproxy"
Xrcvar=${name}_enable
X
Xload_rc_config $name
X
X: ${uproxy_enable="NO"}
X
Xcommand="/usr/local/sbin/${name}"
Xstart_cmd="uproxy_startcmd"
X
Xuproxy_startcmd()
X{
X if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
X echo "${name} already running? (pid=$rc_pid)."
X return 1
X fi
X if [ -z "${uproxy_connections}" ]; then
X err 1 "can't find uproxy_connections in /etc/rc.conf"
X fi
X echo Starting ${name}.
X for connection in ${uproxy_connections}; do
X eval options=\$uproxy_${connection}_options
X if [ -z "${options}" ]; then
X continue
X fi
X command_args="${options}"
X cmd="${command} ${command_args}"
X if [ -n "$uproxy_user" ]; then
X cmd="su -m $uproxy_user -c '$cmd'"
X fi
X eval "$cmd > /dev/null &"
X sleep 1
X done
X}
X
Xrun_rc_command "$1"
END-of-uproxy/files/uproxy.in
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list