Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jun 2013 09:39:20 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r319644 - in head/net: . turnserver turnserver/files
Message-ID:  <201306020939.r529dKYg002031@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Sun Jun  2 09:39:19 2013
New Revision: 319644
URL: http://svnweb.freebsd.org/changeset/ports/319644

Log:
  This a BSD-licensed version of the RFC5766 TURN Server implementation,
  with IPv6 and DTLS extensions.
  
  WWW: http://code.google.com/p/rfc5766-turn-server/
  
  Submitted by:	Oleg Moskalenko <mom040267@gmail.com> (via private mail)

Added:
  head/net/turnserver/
  head/net/turnserver/Makefile   (contents, props changed)
  head/net/turnserver/distinfo   (contents, props changed)
  head/net/turnserver/files/
  head/net/turnserver/files/pkg-message.in   (contents, props changed)
  head/net/turnserver/files/turnserver.in   (contents, props changed)
  head/net/turnserver/pkg-descr   (contents, props changed)
  head/net/turnserver/pkg-plist   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Sun Jun  2 08:03:12 2013	(r319643)
+++ head/net/Makefile	Sun Jun  2 09:39:19 2013	(r319644)
@@ -1191,6 +1191,7 @@
     SUBDIR += ttbudget
     SUBDIR += ttlscan
     SUBDIR += tucan
+    SUBDIR += turnserver
     SUBDIR += twinkle
     SUBDIR += twitux
     SUBDIR += u6rd

Added: head/net/turnserver/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/Makefile	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,138 @@
+# $FreeBSD$
+
+PORTNAME=	turnserver
+PORTVERSION=	1.8.5.3
+CATEGORIES=	net
+MASTER_SITES=	http://rfc5766-turn-server.googlecode.com/files/
+PKGNAMEPREFIX=
+
+MAINTAINER=	mom040267@gmail.com
+COMMENT=	STUN/TURN Server; IPv6, DTLS support; RFCs 5389, 5766, 6062, 6156
+
+LICENSE=	BSD
+
+LIB_DEPENDS=	ssl:${PORTSDIR}/security/openssl \
+		event-2:${PORTSDIR}/devel/libevent2
+
+SUB_FILES=	pkg-message
+
+MAN1=	turnserver.1 turnadmin.1 turnutils.1 turnutils_peer.1 turnutils_rfc5769check.1 turnutils_stunclient.1 turnutils_uclient.1
+MANCOMPRESSED=	no
+
+USE_OPENSSL=	YES
+
+USE_RC_SUBR=	turnserver
+
+HAS_CONFIGURE=	YES
+
+OPTIONS_DEFINE=	MYSQL PGSQL REDIS
+
+MYSQL_DESC=	MySQL support for users database
+PGSQL_DESC=	PostgreSQL support for users database
+REDIS_DESC=	Redis support for user database and for status and statistics reporting
+
+OPTIONS_DEFAULT=	MYSQL PGSQL REDIS
+
+.include <bsd.port.options.mk>
+
+PORTDOCS=
+PORTREADMEDOCS=	README.turnserver README.turnadmin README.turnutils INSTALL
+
+_BIN_UTILS=	peer stunclient rfc5769check uclient
+
+_ETC_EXAMPLES=	turnserver.conf turnuserdb.conf turn_client_cert.pem \
+		turn_client_pkey.pem turn_server_cert.pem turn_server_pkey.pem
+_SCRIPT_EXAMPLES=	peer.sh	rfc5769.sh \
+basic/relay.sh basic/tcp_client_c2c_tcp_relay.sh basic/udp_c2c_client.sh \
+basic/udp_client.sh basic/tcp_client.sh \
+loadbalance/master_relay.sh loadbalance/slave_relay_1.sh loadbalance/slave_relay_2.sh \
+loadbalance/udp_c2c.sh loadbalance/tcp_c2c_tcp_relay.sh \
+longtermsecure/secure_dtls_client.sh longtermsecure/secure_relay.sh \
+longtermsecure/secure_tcp_client_c2c_tcp_relay.sh longtermsecure/secure_tcp_client.sh \
+longtermsecure/secure_tls_client_c2c_tcp_relay.sh longtermsecure/secure_tls_client.sh \
+longtermsecure/secure_udp_c2c.sh longtermsecure/secure_udp_client.sh \
+longtermsecuredb/secure_relay_with_db_psql.sh longtermsecuredb/secure_relay_with_db_mysql.sh \
+longtermsecuredb/secure_relay_with_db_redis.sh \
+restapi/secure_relay_secret.sh restapi/secure_relay_secret_with_db_mysql.sh \
+restapi/secure_relay_secret.sh restapi/secure_relay_secret_with_db_redis.sh \
+restapi/secure_udp_client_with_secret.sh \
+restapi/shared_secret_maintainer.pl \
+shorttermsecure/secure_tcp_client_c2c_tcp_relay_short_term.sh shorttermsecure/secure_udp_client_short_term.sh shorttermsecure/secure_relay_short_term_mech.sh
+
+CONFIGURE_ENV+=	PTHREAD_LIBS=-pthread
+
+.if ${PORT_OPTIONS:MPGSQL}
+USE_PGSQL=	yes
+LIB_DEPENDS+=	pq:${PORTSDIR}/databases/postgresql90-client
+.else
+CONFIGURE_ENV+=	TURN_NO_PQ=1
+.endif
+
+.if ${PORT_OPTIONS:MMYSQL}
+USE_MYSQL=	yes
+LIB_DEPENDS+=	mysqlclient:${PORTSDIR}/databases/mysql55-client
+.else
+CONFIGURE_ENV+=	TURN_NO_MYSQL=1
+.endif
+
+.if ${PORT_OPTIONS:MREDIS}
+LIB_DEPENDS+=	hiredis:${PORTSDIR}/databases/hiredis/
+.else
+CONFIGURE_ENV+=	TURN_NO_HIREDIS=1
+.endif
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/turnserver ${PREFIX}/bin/turnserver
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/turnadmin ${PREFIX}/bin/turnadmin
+.for f in ${_BIN_UTILS}
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/turnutils_${f} ${PREFIX}/bin/
+.endfor
+.for f in ${MAN1}
+	${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${PREFIX}/man/man1/${f}
+.endfor
+	${MKDIR} ${DATADIR}/
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.sql ${DATADIR}/schema.sql
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.userdb.redis ${DATADIR}/schema.userdb.redis
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.stats.redis ${DATADIR}/schema.stats.redis
+	${INSTALL_DATA} ${WRKSRC}/lib/libturnclient.a ${PREFIX}/lib/libturnclient.a
+	${INSTALL_DATA} ${WRKSRC}/examples/etc/turnserver.conf ${PREFIX}/etc/turnserver.conf.default
+	${INSTALL_DATA} ${WRKSRC}/examples/etc/turnuserdb.conf ${PREFIX}/etc/turnuserdb.conf.default
+	${MKDIR} ${PREFIX}/include/turn
+	(cd ${WRKSRC}/include/turn/ && ${COPYTREE_SHARE} client ${PREFIX}/include/turn/)
+	(cd ${WRKSRC}/include/turn/ && ${COPYTREE_SHARE} ns_turn_defs.h ${PREFIX}/include/turn/)
+.if ${PORT_OPTIONS:MEXAMPLES}
+	${MKDIR} ${EXAMPLESDIR}/scripts
+	${MKDIR} ${EXAMPLESDIR}/scripts/basic
+	${MKDIR} ${EXAMPLESDIR}/scripts/loadbalance
+	${MKDIR} ${EXAMPLESDIR}/scripts/longtermsecure
+	${MKDIR} ${EXAMPLESDIR}/scripts/longtermsecuredb
+	${MKDIR} ${EXAMPLESDIR}/scripts/restapi
+	${MKDIR} ${EXAMPLESDIR}/scripts/shorttermsecure
+	${MKDIR} ${EXAMPLESDIR}/etc
+	${INSTALL_MAN} ${WRKSRC}/examples/scripts/readme.txt ${EXAMPLESDIR}/scripts
+.for f in ${_ETC_EXAMPLES}
+	${INSTALL_DATA} ${WRKSRC}/examples/etc/${f} ${EXAMPLESDIR}/etc/
+.endfor
+.for f in ${_SCRIPT_EXAMPLES}
+	${INSTALL_SCRIPT} ${WRKSRC}/examples/scripts/${f} ${EXAMPLESDIR}/scripts/${f}
+.endfor
+.endif
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+	(cd ${WRKSRC}/docs/ && ${COPYTREE_SHARE} ${f} ${DOCSDIR})
+.endfor
+.for f in ${PORTREADMEDOCS}
+	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+	${INSTALL_DATA} ${PKGMESSAGE} ${DOCSDIR}/postinstall.txt
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.sql ${DOCSDIR}/schema.sql
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.userdb.redis ${DOCSDIR}/schema.userdb.redis
+	${INSTALL_DATA} ${WRKSRC}/turndb/schema.stats.redis ${DOCSDIR}/schema.stats.redis
+PORTDOCS+=	postinstall.txt ${PORTREADMEDOCS} schema.sql schema.userdb.redis schema.stats.redis
+.endif
+
+post-install:
+	${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>

Added: head/net/turnserver/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/distinfo	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,2 @@
+SHA256 (turnserver-1.8.5.3.tar.gz) = c4a2481ed17d1f59ce58fe2dca1850d54527778b39d966186e681fedaf864872
+SIZE (turnserver-1.8.5.3.tar.gz) = 204682

Added: head/net/turnserver/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/files/pkg-message.in	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,40 @@
+==================================================================
+
+1) You can start and stop the turnserver manually. But, if you want
+to enable turnserver as an automatically started system service, 
+you have to:
+
+	a) Create and edit /etc/turnserver.conf file.
+	Use %%PREFIX%%/etc/turnserver.conf.default as an example.
+
+	b) For user accounts settings, if using the turnserver 
+	with authentication: create and edit /etc/turnuserdb.conf 
+	file, or set up PostgreSQL or MySQL or Redis database for user accounts.
+	Use %%PREFIX%%/etc/turnuserdb.conf.default as example for flat file DB,
+	or use %%DATADIR%%/schema.sql as database schema,
+	or use %%DATADIR%%/schema*redis as Redis
+	database description.
+
+	d) add line turnserver_enable="YES" to /etc/rc.conf.
+	 
+	e) If you are using a non-default PREFIX (other than /usr/local),
+	then edit /usr/local/etc/rc.d/turnserver file, according to
+	your system settings.
+	
+	f) Restart the system or run the command:
+	$ %%PREFIX%%/etc/rc.d/turnserver start
+     
+2) If you do not want the turnserver to be a system service, 
+   then you can start/stop it "manually", using the "turnserver" 
+   executable with appropriate options (see the documentation).
+   
+3) To create database schema, use schema in file %%DATADIR%%/schema.sql.
+   
+4) For additional information, run:
+ 
+   $ man turnserver
+   $ man turnadmin
+   $ man turnutils
+	
+==================================================================
+ 

Added: head/net/turnserver/files/turnserver.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/files/turnserver.in	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: turnserver
+# REQUIRE: LOGIN
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# turnserver_enable (bool):	Set to NO by default.
+#				Set it to YES to enable doormand.
+# turnserver_config (path):	Set to %%PREFIX%%/etc/turnserver.conf
+#				by default.
+
+. /etc/rc.subr
+
+: ${turnserver_enable:="NO"}
+: ${turnserver_config="%%PREFIX%%/etc/turnserver.conf"}
+
+name="turnserver"
+rcvar="`set_rcvar`"
+
+load_rc_config $name
+
+command="%%PREFIX%%/bin/${name}"
+command_args="--daemon -c ${turnserver_config}"
+
+run_rc_command "$1"

Added: head/net/turnserver/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/pkg-descr	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,4 @@
+This a BSD-licensed version of the RFC5766 TURN Server implementation, 
+with IPv6 and DTLS extensions.
+
+WWW: http://code.google.com/p/rfc5766-turn-server/

Added: head/net/turnserver/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/turnserver/pkg-plist	Sun Jun  2 09:39:19 2013	(r319644)
@@ -0,0 +1,69 @@
+bin/turnserver
+bin/turnadmin
+bin/turnutils_peer
+bin/turnutils_rfc5769check
+bin/turnutils_stunclient
+bin/turnutils_uclient
+lib/libturnclient.a
+etc/turnserver.conf.default
+etc/turnuserdb.conf.default
+%%DATADIR%%/schema.sql
+%%DATADIR%%/schema.userdb.redis
+%%DATADIR%%/schema.stats.redis
+@dirrmtry %%DATADIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turnserver.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turnuserdb.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turn_client_cert.pem
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turn_client_pkey.pem
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turn_server_cert.pem
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/etc/turn_server_pkey.pem
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/etc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/readme.txt
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/peer.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/rfc5769.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/basic/relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/basic/tcp_client_c2c_tcp_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/basic/udp_c2c_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/basic/udp_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/basic/tcp_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/loadbalance/master_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/loadbalance/slave_relay_1.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/loadbalance/slave_relay_2.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/loadbalance/udp_c2c.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/loadbalance/tcp_c2c_tcp_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_dtls_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_tcp_client_c2c_tcp_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_tcp_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_tls_client_c2c_tcp_relay.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_tls_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_udp_c2c.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecure/secure_udp_client.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecuredb/secure_relay_with_db_psql.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecuredb/secure_relay_with_db_mysql.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/longtermsecuredb/secure_relay_with_db_redis.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/restapi/secure_relay_secret.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/restapi/secure_relay_secret_with_db_mysql.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/restapi/secure_relay_secret_with_db_redis.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/restapi/secure_udp_client_with_secret.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/restapi/shared_secret_maintainer.pl
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/shorttermsecure/secure_tcp_client_c2c_tcp_relay_short_term.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/shorttermsecure/secure_udp_client_short_term.sh
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scripts/shorttermsecure/secure_relay_short_term_mech.sh
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/basic
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/loadbalance
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/longtermsecure
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/longtermsecuredb
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/restapi
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts/shorttermsecure
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%/scripts
+%%PORTEXAMPLES%%@dirrmtry %%EXAMPLESDIR%%
+include/turn/ns_turn_defs.h
+include/turn/client/TurnMsgLib.h
+include/turn/client/ns_turn_ioaddr.h
+include/turn/client/ns_turn_msg.h
+include/turn/client/ns_turn_msg_addr.h
+include/turn/client/ns_turn_msg_defs.h
+@dirrmtry include/turn/client/
+@dirrmtry include/turn
+@stopdaemon turnserver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306020939.r529dKYg002031>