pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add coturn



Module Name:	pkgsrc-wip
Committed By:	Keke <kethzer.dr%gmail.com@localhost>
Pushed By:	kethzer.dr
Date:		Tue Aug 29 17:31:40 2017 -0400
Changeset:	839a1d2a56fef3321f8177d404f58d704cb1e4af

Modified Files:
	Makefile
Added Files:
	coturn/DESCR
	coturn/MESSAGE
	coturn/Makefile
	coturn/PLIST
	coturn/distinfo
	coturn/files/turnserver.sh
	coturn/options.mk
	coturn/patches/patch-postinstall.txt

Log Message:
Add coturn

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=839a1d2a56fef3321f8177d404f58d704cb1e4af

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                             |  1 +
 coturn/DESCR                         |  1 +
 coturn/MESSAGE                       | 37 ++++++++++++++
 coturn/Makefile                      | 42 ++++++++++++++++
 coturn/PLIST                         | 97 ++++++++++++++++++++++++++++++++++++
 coturn/distinfo                      |  7 +++
 coturn/files/turnserver.sh           | 31 ++++++++++++
 coturn/options.mk                    | 28 +++++++++++
 coturn/patches/patch-postinstall.txt | 44 ++++++++++++++++
 9 files changed, 288 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 6b7ac0f990..2f39ca319a 100644
--- a/Makefile
+++ b/Makefile
@@ -430,6 +430,7 @@ SUBDIR+=	coreclr-git
 SUBDIR+=	corefx-git
 SUBDIR+=	corert-git
 SUBDIR+=	cortex-var
+SUBDIR+=	coturn
 SUBDIR+=	courierpassd
 SUBDIR+=	coverity-analysis-bin
 SUBDIR+=	cowpatty
diff --git a/coturn/DESCR b/coturn/DESCR
new file mode 100644
index 0000000000..591136d78a
--- /dev/null
+++ b/coturn/DESCR
@@ -0,0 +1 @@
+The TURN Server is a VoIP media traffic NAT traversal server
diff --git a/coturn/MESSAGE b/coturn/MESSAGE
new file mode 100644
index 0000000000..729b85e8b9
--- /dev/null
+++ b/coturn/MESSAGE
@@ -0,0 +1,37 @@
+$NetBSD: MESSAGE $
+===========================================================================
+
+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 ${PREFIX}/etc/turnserver.conf file.
+	Use ${PREFIX}/etc/turnserver.conf.default as an example.
+
+	b) For user accounts settings: set up SQLite or PostgreSQL or
+	MySQL or Redis database for user accounts.
+	Use ${PREFIX}/share/doc/schema.sql as an SQL database schema,
+	or use ${PREFIX}/share/doc/schema*redis as Redis database description.
+
+	If SQLite is used, then @VARBASE@/db/turndb is the default database
+	location.
+
+	d) add line turnserver="YES" to /etc/rc.conf or /etc/rc.conf.local.
+
+	e) 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 ${PREFIX}/share/doc/schema.sql.
+The TURN Server supports (optionally) SQLite, MySQL, PostgreSQL, Redis.
+
+4) For additional information, run:
+
+   $ man turnserver
+   $ man turnadmin
+   $ man turnutils
+
+===========================================================================
diff --git a/coturn/Makefile b/coturn/Makefile
new file mode 100644
index 0000000000..61c411dc4a
--- /dev/null
+++ b/coturn/Makefile
@@ -0,0 +1,42 @@
+# $NetBSD$
+
+DISTNAME=	coturn-4.5.0.6
+CATEGORIES=	net
+GITHUB_PROJECT=	coturn
+MASTER_SITES=   ${MASTER_SITE_GITHUB:=coturn/}
+EXTRACT_SUFX=	.zip
+
+MAINTAINER=	kethzer.dr%gmail.com@localhost
+HOMEPAGE=	https://github.com/coturn/coturn
+COMMENT=	The TURN Server is a VoIP media traffic NAT traversal server
+LICENSE=	citrix_ica-license
+
+USE_LANGUAGES=  c c++
+USE_LIBTOOL=    yes
+
+CONFIGURE_ENV+=		PTHREAD_LIBS=-pthread TURN_DISABLE_RPATH=1
+CONFIGURE_ENV+=		LIBEVENT_OPENSSL_CFLAGS="-I${BUILDLINK_PREFIX.libevent}/include"
+CONFIGURE_ENV+=		LIBEVENT_OPENSSL_LIBS="-L${BUILDLINK_PREFIX.libevent}/lib -levent_openssl -levent"
+CONFIGURE_ENV+=		LOCALSTATEDIR=/var
+CONFIGURE_ENV+=		BINDIR=${PREFIX}/bin
+CONFIGURE_ENV+=		LIBDIR=${PREFIX}/lib
+CONFIGURE_ENV+=		CONFDIR=${PKG_SYSCONFDIR}
+CONFIGURE_ENV+=		MANPREFIX=${PREFIX}
+CONFIGURE_ENV+=		DOCSDIR=${PREFIX}/share/doc
+CONFIGURE_ENV+=		INCLUDEDIR=${PREFIX}/include
+CONFIGURE_ENV+=		EXAMPLESDIR=${PREFIX}/share/examples
+CONFIGURE_ENV+=		TURNDBDIR=${PREFIX}/share/turnserver
+CONFIGURE_ENV+=		TURNINCLUDEDIR=${PREFIX}/include/turn
+
+INSTALLATION_DIRS+=     bin include lib ${PKGMANDIR}/man1 share/doc share/examples/etc share/examples/scripts share/turnserver
+#CONF_FILES+=            ${PREFIX}/etc/turnserver.conf.default
+#RCD_SCRIPTS=                  turnserver
+
+WRKSRC=		${WRKDIR}/${DISTNAME}
+HAS_CONFIGURE=	yes
+
+.include "options.mk"
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/coturn/PLIST b/coturn/PLIST
new file mode 100644
index 0000000000..2ef6e0eb6f
--- /dev/null
+++ b/coturn/PLIST
@@ -0,0 +1,97 @@
+@comment $NetBSD$
+bin/turnadmin
+bin/turnserver
+bin/turnutils_natdiscovery
+bin/turnutils_oauth
+bin/turnutils_peer
+bin/turnutils_stunclient
+bin/turnutils_uclient
+etc/turnserver.conf.default
+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
+include/turn/client/ns_turn_msg_defs_experimental.h
+include/turn/ns_turn_defs.h
+lib/libturnclient.a
+man/man1/coturn.1
+man/man1/turnadmin.1
+man/man1/turnserver.1
+man/man1/turnutils.1
+man/man1/turnutils_natdiscovery.1
+man/man1/turnutils_oauth.1
+man/man1/turnutils_peer.1
+man/man1/turnutils_stunclient.1
+man/man1/turnutils_uclient.1
+share/doc/INSTALL
+share/doc/LICENSE
+share/doc/README.turnadmin
+share/doc/README.turnserver
+share/doc/README.turnutils
+share/doc/postinstall.txt
+share/doc/schema.mongo.sh
+share/doc/schema.sql
+share/doc/schema.stats.redis
+share/doc/schema.userdb.redis
+share/examples/etc/turn_client_cert.pem
+share/examples/etc/turn_client_pkey.pem
+share/examples/etc/turn_server_cert.pem
+share/examples/etc/turn_server_pkey.pem
+share/examples/etc/turnserver.conf
+share/examples/scripts/basic/dos_attack.sh
+share/examples/scripts/basic/relay.sh
+share/examples/scripts/basic/tcp_client.sh
+share/examples/scripts/basic/tcp_client_c2c_tcp_relay.sh
+share/examples/scripts/basic/udp_c2c_client.sh
+share/examples/scripts/basic/udp_client.sh
+share/examples/scripts/loadbalance/master_relay.sh
+share/examples/scripts/loadbalance/slave_relay_1.sh
+share/examples/scripts/loadbalance/slave_relay_2.sh
+share/examples/scripts/loadbalance/tcp_c2c_tcp_relay.sh
+share/examples/scripts/loadbalance/udp_c2c.sh
+share/examples/scripts/longtermsecure/secure_dos_attack.sh
+share/examples/scripts/longtermsecure/secure_dtls_client.sh
+share/examples/scripts/longtermsecure/secure_dtls_client_cert.sh
+share/examples/scripts/longtermsecure/secure_relay.sh
+share/examples/scripts/longtermsecure/secure_relay_cert.sh
+share/examples/scripts/longtermsecure/secure_sctp_client.sh
+share/examples/scripts/longtermsecure/secure_tcp_client.sh
+share/examples/scripts/longtermsecure/secure_tcp_client_c2c_tcp_relay.sh
+share/examples/scripts/longtermsecure/secure_tls_client.sh
+share/examples/scripts/longtermsecure/secure_tls_client_c2c_tcp_relay.sh
+share/examples/scripts/longtermsecure/secure_tls_client_cert.sh
+share/examples/scripts/longtermsecure/secure_udp_c2c.sh
+share/examples/scripts/longtermsecure/secure_udp_client.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_mongo.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_mysql_ssl.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_psql.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_redis.sh
+share/examples/scripts/longtermsecuredb/secure_relay_with_db_sqlite.sh
+share/examples/scripts/mobile/mobile_dtls_client.sh
+share/examples/scripts/mobile/mobile_relay.sh
+share/examples/scripts/mobile/mobile_tcp_client.sh
+share/examples/scripts/mobile/mobile_tls_client_c2c_tcp_relay.sh
+share/examples/scripts/mobile/mobile_udp_client.sh
+share/examples/scripts/oauth.sh
+share/examples/scripts/peer.sh
+share/examples/scripts/readme.txt
+share/examples/scripts/restapi/secure_relay_secret.sh
+share/examples/scripts/restapi/secure_relay_secret_with_db_mongo.sh
+share/examples/scripts/restapi/secure_relay_secret_with_db_mysql.sh
+share/examples/scripts/restapi/secure_relay_secret_with_db_psql.sh
+share/examples/scripts/restapi/secure_relay_secret_with_db_redis.sh
+share/examples/scripts/restapi/secure_relay_secret_with_db_sqlite.sh
+share/examples/scripts/restapi/secure_udp_client_with_secret.sh
+share/examples/scripts/restapi/shared_secret_maintainer.pl
+share/examples/scripts/selfloadbalance/secure_dos_attack.sh
+share/examples/scripts/selfloadbalance/secure_relay.sh
+share/turnserver/schema.mongo.sh
+share/turnserver/schema.sql
+share/turnserver/schema.stats.redis
+share/turnserver/schema.userdb.redis
+share/turnserver/testmongosetup.sh
+share/turnserver/testredisdbsetup.sh
+share/turnserver/testsqldbsetup.sql
+share/turnserver/turndb
diff --git a/coturn/distinfo b/coturn/distinfo
new file mode 100644
index 0000000000..4598729794
--- /dev/null
+++ b/coturn/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (coturn-4.5.0.6.zip) = 97c18ecb5d71aafd8ab311e6266a83b5a6e1635a
+RMD160 (coturn-4.5.0.6.zip) = db2944d57eb0a3ab63fe15575fef5f1396f4a580
+SHA512 (coturn-4.5.0.6.zip) = d24096f06bc1c3c69f73d2a582ae30fe619f5d045b21a156948fc36df2f7fee5f534157d38c4a7f3a3d7be63f2f8b21e8b7d235aca202803d289861ad24f6d8e
+Size (coturn-4.5.0.6.zip) = 533057 bytes
+SHA1 (patch-postinstall.txt) = 0369389fa3436f4da472ac6b00cbe8dffe48da6d
diff --git a/coturn/files/turnserver.sh b/coturn/files/turnserver.sh
new file mode 100644
index 0000000000..0f7188ef81
--- /dev/null
+++ b/coturn/files/turnserver.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $NetBSD: head/net/coturn/files/turnserver.sh
+#
+# PROVIDE: turnserver
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# turnserver (bool):		Set to NO by default.
+#				Set it to YES to enable turnserver.
+# turnserver_config (path):	Set to @PREFIX@/etc/turnserver.conf
+#				by default.
+
+. /etc/rc.subr
+
+name="turnserver"
+rcvar=$name
+
+load_rc_config $name
+
+: ${turnserver:=no}
+: ${turnserver_config=@PREFIX@/etc/turnserver.conf}
+
+command="@PREFIX@/bin/${name}"
+command_args="--daemon -c ${turnserver_config}"
+required_files=${turnserver_config}
+
+run_rc_command "$1"
diff --git a/coturn/options.mk b/coturn/options.mk
new file mode 100644
index 0000000000..fa7169f060
--- /dev/null
+++ b/coturn/options.mk
@@ -0,0 +1,28 @@
+PKG_OPTIONS_VAR=		PKG_OPTIONS.coturn
+PKG_SUPPORTED_OPTIONS=		hiredis mysql pgsql sqlite redis
+
+PKG_SUGGESTED_OPTIONS=	sqlite
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mhiredis)
+.include "../../databases/hiredis/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mmysql)
+.include "../../databases/mysql55-client/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpgsql)
+.include "../../databases/postgresql94-client/buildlink3.mk"
+DBLIBS+=	${BUILDLINK_PREFIX.postgresql-lib}
+CONFIGURE_ENV+=	POSTCFLAGS="-I${PREFIX}/include/postgresql"
+.endif
+
+.if !empty(PKG_OPTIONS:Msqlite)
+.include "../../databases/sqlite3/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mredis)
+DEPENDS+=       redis-[0-9]*:../../databases/redis
+.endif
diff --git a/coturn/patches/patch-postinstall.txt b/coturn/patches/patch-postinstall.txt
new file mode 100644
index 0000000000..f89fb83837
--- /dev/null
+++ b/coturn/patches/patch-postinstall.txt
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- postinstall.txt.orig	2017-03-27 03:11:03.000000000 +0000
++++ postinstall.txt
+@@ -1,39 +1 @@ else
+-==================================================================
+ 
+-1) If you system supports automatic start-up system daemon services, 
+-the, to enable the turnserver as an automatically started system 
+-service, you have to:
+-
+-	a) Create and edit /etc/turnserver.conf or 
+-	/usr/local/etc/turnserver.conf . 
+-	Use /usr/local/etc/turnserver.conf.default as an example.
+-
+-	b) For user accounts settings: set up SQLite or PostgreSQL or 
+-	MySQL or MongoDB or Redis database for user accounts.
+-	Use /usr/local/share/turnserver/schema.sql as SQL database schema,
+-	or use /usr/local/share/turnserver/schema.userdb.redis as Redis
+-	database schema description and/or 
+-	/usr/local/share/turnserver/schema.stats.redis
+-	as Redis status & statistics database schema description.
+-	
+-	If you are using SQLite, the default database location is in 
+-	/var/db/turndb or in /usr/local/var/db/turndb or in /var/lib/turn/turndb.
+-	 
+-	c) add whatever is necessary to enable start-up daemon for the 
+-	/usr/local/bin/turnserver.
+-     
+-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 
+-/usr/local/share/turnserver/schema.sql.
+-   
+-4) For additional information, run:
+- 
+-   $ man turnserver
+-   $ man turnadmin
+-   $ man turnutils
+-	
+-==================================================================
+- 


Home | Main Index | Thread Index | Old Index