diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2020-04-26 00:11:24 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2020-04-26 00:11:24 +0000 |
commit | 5b34f38d8aa628c28ece1eef4ebf01a783ef009b (patch) | |
tree | d081436ce571ed35eca58fef5963f17213352187 /net-im/jitsi-videobridge | |
parent | 3b2aa01b0e6b0ab3456e7c8faaaa9f27402b7929 (diff) | |
download | ports-5b34f38d8aa628c28ece1eef4ebf01a783ef009b.tar.gz ports-5b34f38d8aa628c28ece1eef4ebf01a783ef009b.zip |
Notes
Diffstat (limited to 'net-im/jitsi-videobridge')
-rw-r--r-- | net-im/jitsi-videobridge/Makefile | 68 | ||||
-rw-r--r-- | net-im/jitsi-videobridge/distinfo | 5 | ||||
-rw-r--r-- | net-im/jitsi-videobridge/files/jitsi-videobridge.in | 83 | ||||
-rw-r--r-- | net-im/jitsi-videobridge/files/pkg-message.in | 36 | ||||
-rw-r--r-- | net-im/jitsi-videobridge/pkg-descr | 5 | ||||
-rw-r--r-- | net-im/jitsi-videobridge/pkg-plist | 4 |
6 files changed, 201 insertions, 0 deletions
diff --git a/net-im/jitsi-videobridge/Makefile b/net-im/jitsi-videobridge/Makefile new file mode 100644 index 000000000000..1e768d8a38b2 --- /dev/null +++ b/net-im/jitsi-videobridge/Makefile @@ -0,0 +1,68 @@ +# $FreeBSD$ + +PORTNAME= jitsi +DISTVERSION= 2.1-183 +CATEGORIES= net-im java +PKGNAMESUFFIX= -videobridge +#DISTNAME= ${PORTNAME}-src-${PORTVERSION} + +MAINTAINER= acm@FreeBSD.org +COMMENT= WebRTC compatible video router or SFU + +LICENSE= APACHE20 + +BUILD_DEPENDS= ${LOCALBASE}/share/java/maven/bin/mvn:devel/maven + +ONLY_FOR_ARCHS= i386 amd64 + +USE_GITHUB= yes +GH_PROJECT= ${PORTNAME}${PKGNAMESUFFIX} +GH_TAGNAME= dbddd16 +USE_JAVA= yes + +DATADIR= ${JAVASHAREDIR}/${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} +USE_RC_SUBR= ${PORTNAME}${PKGNAMESUFFIX} + +SUB_FILES+= pkg-message +ETCDIR= ${PREFIX}/etc/jitsi/videobridge + +DEV_UPDATE_MODE= no + +.if (${DEV_UPDATE_MODE} == "yes") +post-build: + @cd ${WRKDIR} && ${TAR} czf ${DISTDIR}/${PORTNAME}${PKGNAMESUFFIX}-${DISTVERSION}-deps${EXTRACT_SUFX} m2 + @${ECHO} "(!!!) Please upload the maven deps archive: ${DISTDIR}/${PORTNAME}${PKGNAMESUFFIX}-${DISTVERSION}-deps${EXTRACT_SUFX}" +.else +MASTER_SITES+= LOCAL/acm/:maven +DISTFILES+= ${PORTNAME}${PKGNAMESUFFIX}-${DISTVERSION}-deps${EXTRACT_SUFX}:maven +MAVEN_ARGS= --offline +.endif + +MAVEN_ARGS+= -PbuildFatJar -DskipTests -Dassembly.skipAssembly=false +MAVEN_REPO= -Dmaven.repo.local=${WRKDIR}/m2 + +post-patch: + @${REINPLACE_CMD} -e 's|1.0-20190319.172750-1|1.0-0-ge979298|g' ${WRKSRC}/pom.xml + +do-build: + cd ${WRKSRC}; \ + ${SETENV} mvn ${MAVEN_REPO} ${MAVEN_ARGS} package + +do-install: + @${MKDIR} ${STAGEDIR}${DATADIR}/lib + @${MKDIR} ${STAGEDIR}${ETCDIR} + cd ${WRKSRC}/lib \ + && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/lib/{} \; + + @(echo "JVB_XMPP_HOST=localhost"; \ + echo "JVB_XMPP_DOMAIN=jitsi.example.com"; \ + echo "JVB_XMPP_PORT=5347"; \ + echo "JVB_XMPP_SECRET=YOURSECRET1"; \ + echo ""; \ + echo "VIDEOBRIDGE_MAX_MEMORY=3072m"; \ + echo "# VIDEOBRIDGE_DEBUG_OPTIONS=\"-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000\" "; \ + ) > ${STAGEDIR}${ETCDIR}/${PORTNAME}${PKGNAMESUFFIX}.conf.sample + + ${INSTALL_DATA} ${WRKSRC}/target/${PORTNAME}${PKGNAMESUFFIX}-2.1-SNAPSHOT-jar-with-dependencies.jar ${STAGEDIR}${JAVAJARDIR}/${PORTNAME}${PKGNAMESUFFIX}.jar + +.include <bsd.port.mk> diff --git a/net-im/jitsi-videobridge/distinfo b/net-im/jitsi-videobridge/distinfo new file mode 100644 index 000000000000..9f91808a5178 --- /dev/null +++ b/net-im/jitsi-videobridge/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1587857041 +SHA256 (jitsi-videobridge-2.1-183-deps.tar.gz) = 20c2c63d4ab3936245b69a9c4400c3855945c512ab86a9bfde3365cfdba89b27 +SIZE (jitsi-videobridge-2.1-183-deps.tar.gz) = 159703250 +SHA256 (jitsi-jitsi-videobridge-2.1-183-dbddd16_GH0.tar.gz) = e8da60e17f4825f06629e66dee8b9236d641fb2b3ba22a9c7da0f12a1e189349 +SIZE (jitsi-jitsi-videobridge-2.1-183-dbddd16_GH0.tar.gz) = 277281 diff --git a/net-im/jitsi-videobridge/files/jitsi-videobridge.in b/net-im/jitsi-videobridge/files/jitsi-videobridge.in new file mode 100644 index 000000000000..0fb9d6cb98a0 --- /dev/null +++ b/net-im/jitsi-videobridge/files/jitsi-videobridge.in @@ -0,0 +1,83 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: jitsi-videobridge +# REQUIRE: NETWORKING SERVERS +# KEYWORD: shutdown +# +# Configuration settings for jitsi-videobridge in /etc/rc.conf: +# +# + +. /etc/rc.subr + +name="jitsi_videobridge" +rcvar=${name}_enable + +jitsi_videobridge_env_file="%%LOCALBASE%%/etc/jitsi/jitsi-videobridge.conf" +jitsi_videobridge_jar="%%JAVAJARDIR%%/jitsi-videobridge.jar" +jitsi_videobridge_logging_config="%%DATADIR%%/lib/logging.properties" + +load_rc_config "${name}" + +: ${jitsi_videobridge_enable="NO"} +: ${jitsi_videobridge_flags=""} + +command="%%LOCALBASE%%/bin/java" + +pidfile="/var/run/jitsi-videobridge.pid" +required_files="${jitsi_videobridge_env_file}" +start_cmd=${name}_start +stop_cmd=${name}_stop +status_cmd=${name}_status +restart_cmd=${name}_restart + +jitsi_videobridge_start() +{ + daemon -p ${pidfile} -o /var/log/jitsi-videobridge.log ${command} -Xmx${VIDEOBRIDGE_MAX_MEMORY} \ + -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError \ + -XX:HeapDumpPath=/tmp \ + -Djava.util.logging.config.file=${jitsi_videobridge_logging_config} \ + -Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=%%LOCALBASE%%/etc/jitsi \ + -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge \ + -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/ \ + -cp ${jitsi_videobridge_jar} \ + org.jitsi.videobridge.Main \ + --host=${JVB_XMPP_HOST} \ + --domain=${JVB_XMPP_DOMAIN} \ + --port=${JVB_XMPP_PORT} \ + --secret=${JVB_XMPP_SECRET} ${jitsi_videobridge_flags} + echo "Started" +} + +jitsi_videobridge_stop() +{ + if [ -f ${pidfile} ] + then + kill `cat ${pidfile}` + rm ${pidfile} + echo "Stopped" + fi +} + +jitsi_videobridge_status() +{ + # If running, show pid + if [ -f ${pidfile} ] + then + echo "${name} is running as pid" `cat ${pidfile}` + else + echo "${name} is not running" + fi +} + +jitsi_videobridge_restart() +{ + echo "Performing restart" + jitsi_videobridge_stop + sleep 5 + jitsi_videobridge_start +} + +run_rc_command "$1" diff --git a/net-im/jitsi-videobridge/files/pkg-message.in b/net-im/jitsi-videobridge/files/pkg-message.in new file mode 100644 index 000000000000..4999bc5361a1 --- /dev/null +++ b/net-im/jitsi-videobridge/files/pkg-message.in @@ -0,0 +1,36 @@ +[ +{ type: install + message: <<EOM +Jitsi Video Bridge was installed + +1) Jitsi VideoBridge global configuration file is located at: + + %%ETCDIR%%/jitsi-videobridge.conf + + Values defined there are used by startup script file + +2) Add jitsi_videobridge_enable="YES" to /etc/rc.conf. + +3) Additional jitsi-videobridge properties to control the TCP-related + functionality can be defined at: + + %%ETCDIR%%/sip-communicator.properties + + This file not exists by default + +4) More about jitsi-videobridge properties at: + + https://github.com/jitsi/jitsi-videobridge/blob/master/doc/tcp.md + +5) If you want use jitsi-videobridge on FreeBSD 11.x, please look for apply the + following patch file: + + https://reviews.freebsd.org/D14453 + + jitsi-videobridge rc script use ${name}_env_file funcitonality. It is + available on FreeBSD >= 12.x + +6) Enjoy it +EOM +} +] diff --git a/net-im/jitsi-videobridge/pkg-descr b/net-im/jitsi-videobridge/pkg-descr new file mode 100644 index 000000000000..414cf97d55dc --- /dev/null +++ b/net-im/jitsi-videobridge/pkg-descr @@ -0,0 +1,5 @@ +Jitsi Videobridge is a WebRTC compatible video router or SFU that lets build +highly scalable video conferencing infrastructure (i.e., up to hundreds of +conferences per server). + +WWW: https://jitsi.org/jitsi-videobridge diff --git a/net-im/jitsi-videobridge/pkg-plist b/net-im/jitsi-videobridge/pkg-plist new file mode 100644 index 000000000000..6c6d41a5db76 --- /dev/null +++ b/net-im/jitsi-videobridge/pkg-plist @@ -0,0 +1,4 @@ +@sample %%ETCDIR%%/jitsi-videobridge.conf.sample +%%JAVAJARDIR%%/jitsi-videobridge.jar +%%DATADIR%%/lib/logging.properties +%%DATADIR%%/lib/videobridge.rc |