mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
- Update to 0.9.1
- Switch to standalone install - Grant maintainership to submitter PR: ports/151578 Submitted by: Joris Dedieu <joris@rmdir.fr>
This commit is contained in:
parent
b642438cde
commit
ab0f16bb36
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264769
@ -6,55 +6,40 @@
|
||||
#
|
||||
|
||||
PORTNAME= red5
|
||||
PORTVERSION= 0.7.0
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 0.9.1
|
||||
CATEGORIES= www java
|
||||
MASTER_SITES= http://www.nielsenaa.com/red5-installers/ \
|
||||
http://www.red5.fr/release/0.7.0/war/
|
||||
DISTNAME= Red5War_${PORTVERSION}-java5
|
||||
MASTER_SITES= http://www.red5.org/downloads/0_9/ \
|
||||
http://red5.rmdir.fr/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Red5 is an Open Source flash server
|
||||
MAINTAINER= joris.dedieu@gmail.com
|
||||
COMMENT= Red5 is an Open Source Flash Server
|
||||
|
||||
OPTIONS= TOMCAT4 "Use Tomcat 4.1" OFF \
|
||||
TOMCAT5 "Use Tomcat 5.5" OFF \
|
||||
TOMCAT6 "Use Tomcat 6.0" ON
|
||||
|
||||
WRKSRC= ${WRKDIR}
|
||||
USE_ZIP= yes
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.5
|
||||
NO_BUILD= yes
|
||||
USE_RC_SUBR= red5
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
RED5_USER?= ${WWWOWN}
|
||||
RED5_GRP?= ${WWWGRP}
|
||||
RED5_HOME?= ${PREFIX}/${PORTNAME}
|
||||
|
||||
.if (defined(WITH_TOMCAT4) && defined(WITH_TOMCAT5)) || \
|
||||
(defined(WITH_TOMCAT4) && defined(WITH_TOMCAT6)) || \
|
||||
(defined(WITH_TOMCAT5) && defined(WITH_TOMCAT6))
|
||||
IGNORE= please select only one version of Tomcat
|
||||
.endif
|
||||
SUB_LIST+= RED5_USER=${RED5_USER} RED5_HOME=${RED5_HOME}
|
||||
|
||||
.if defined(WITH_TOMCAT4)
|
||||
RUN_DEPENDS+= ${LOCALBASE}/apache-tomcat4.1:${PORTSDIR}/www/tomcat41
|
||||
WEBAPPDIR= ${PREFIX}/apache-tomcat4.1/webapps
|
||||
.elif defined(WITH_TOMCAT5)
|
||||
RUN_DEPENDS+= ${LOCALBASE}/tomcat5.5:${PORTSDIR}/www/tomcat55
|
||||
WEBAPPDIR= ${PREFIX}/tomcat5.5/webapps
|
||||
.elif defined(WITH_TOMCAT6)
|
||||
RUN_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0:${PORTSDIR}/www/tomcat6
|
||||
WEBAPPDIR= ${PREFIX}/apache-tomcat-6.0/webapps
|
||||
.else
|
||||
IGNORE= please select one version of Tomcat
|
||||
.endif
|
||||
|
||||
PLIST_FILES= ${WEBAPPDIR:S|^${PREFIX}/||}/red5.war
|
||||
pre-install:
|
||||
@${REINPLACE_CMD} -e 's/0.0.0.0/127.0.0.1/' ${WRKSRC}/conf/red5.properties
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${WEBAPPDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/ROOT.war ${WEBAPPDIR}/red5.war
|
||||
@${CHOWN} ${WWWOWN}:${WWWGRP} ${WEBAPPDIR}/red5.war
|
||||
${MKDIR} ${RED5_HOME}/conf ${RED5_HOME}/lib ${RED5_HOME}/webapps ${RED5_HOME}/log
|
||||
${INSTALL} ${WRKSRC}/boot.jar ${RED5_HOME}
|
||||
${INSTALL} ${WRKSRC}/red5.jar ${RED5_HOME}
|
||||
(cd ${WRKSRC}/conf && ${COPYTREE_SHARE} \* ${RED5_HOME}/conf)
|
||||
(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${RED5_HOME}/lib)
|
||||
(cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} \* ${RED5_HOME}/webapps)
|
||||
${CHOWN} -R ${RED5_USER}:${RED5_GRP} ${RED5_HOME}
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR})
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,2 @@
|
||||
MD5 (Red5War_0.7.0-java5.zip) = 88cd86aff8a50f35e8a4d07cb210bd0d
|
||||
SHA256 (Red5War_0.7.0-java5.zip) = 058d2be8ae20d567cf92be1edd02332532f0ca32b56365b8ae5302f086068946
|
||||
SIZE (Red5War_0.7.0-java5.zip) = 20335816
|
||||
SHA256 (red5-0.9.1.tar.gz) = 71290b8b22db8c267752be432126a89e4105809d16c9bfc84d6d1e7f52438efd
|
||||
SIZE (red5-0.9.1.tar.gz) = 35466436
|
||||
|
196
www/red5/files/red5.in
Normal file
196
www/red5/files/red5.in
Normal file
@ -0,0 +1,196 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: red5
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Configuration settings for red5 in /etc/rc.conf:
|
||||
#
|
||||
# red5_enable (bool):
|
||||
# Set to "NO" by default.
|
||||
# Set it to "YES" to enable red5
|
||||
#
|
||||
# red5_home (str)
|
||||
# Set to "%%RED5_HOME%%" by default.
|
||||
# Set the directory red5 will be executed
|
||||
#
|
||||
# red5_stdout_log (str)
|
||||
# Set to %%RED5_HOME%%/log/red5.log" by default.
|
||||
# Set the location for the Tomcat process log (standard output)
|
||||
#
|
||||
# red5_stderr_log (str)
|
||||
# Set to "%%RED5_HOME%%/log/red5.err" by default.
|
||||
# Set the location for the Tomcat process log (error output)
|
||||
#
|
||||
# red5_java_opts (str):
|
||||
# Set to "" by default.
|
||||
# Java VM args to use.
|
||||
# Eg: red5_java_opts="-Xrs -Xms512M -Xmx1024M -Xss128K -XX:NewSize=256m -XX:SurvivorRatio=16 \
|
||||
# -XX:MinHeapFreeRatio=20 -XX:+AggressiveHeap -XX:+ExplicitGCInvokesConcurrent \
|
||||
# -XX:+UseConcMarkSweepGC -Dsun.rmi.dgc.client.gcInterval=990000 \
|
||||
# -Dsun.rmi.dgc.server.gcInterval=990000
|
||||
# -Djava.net.preferIPv4Stack=true -Xverify:none"
|
||||
#
|
||||
# red5_user (str)
|
||||
# Set to %%RED5_USER%% by default.
|
||||
# Set the user that will execute the server.
|
||||
#
|
||||
# red5_connection_token (str)
|
||||
# Set to "" by default.
|
||||
# Set the "port username pass" which will be used to shutdown the server
|
||||
# Eg: "9999 red5user s3cr3t"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="red5"
|
||||
rcvar=`set_rcvar`
|
||||
pidfile="/var/run/red5.pid"
|
||||
java_command="%%LOCALBASE%%/bin/java"
|
||||
|
||||
#constant options
|
||||
red5_logging_opts="-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector \
|
||||
-Dcatalina.useNaming=true"
|
||||
red5_security_opts="-Djava.security.debug=failure"
|
||||
red5_mainclass="org.red5.server.Bootstrap"
|
||||
red5_stop_mainclass="org.red5.server.Shutdown"
|
||||
red5_jython_opt="-Dpython.home=lib"
|
||||
red5_debug_opts="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
|
||||
|
||||
load_rc_config "${name}"
|
||||
|
||||
#configurable options
|
||||
red5_enable="${red5_enable:-"NO"}"
|
||||
red5_user="${red5_user:-"%%RED5_USER%%"}"
|
||||
red5_home="${red5_home:-"%%RED5_HOME%%"}"
|
||||
red5_stdout_log="${red5_stdout_log:-"%%RED5_HOME%%/log/red5.log"}"
|
||||
red5_stderr_log="${red5_stderr_log:-"%%RED5_HOME%%/log/red5.err"}"
|
||||
red5_stop_timeout="${red5_stop_timeout:-"10"}"
|
||||
|
||||
|
||||
red5_opts="${red5_logging_opts} ${red5_security_opts} ${red5_java_opts}"
|
||||
red5_stop_opts="-Djavax.net.ssl.keyStore=${red5_home}/conf/keystore.jmx \
|
||||
-Djavax.net.ssl.keyStorePassword=password"
|
||||
red5_classpath="${red5_home}/boot.jar:${red5_home}/conf:${CLASSPATH}"
|
||||
|
||||
red5_start_cmd="${java_command} ${red5_jython_opt} -Dred5.root=${red5_home} \
|
||||
${red5_opts} -cp ${red5_classpath} ${red5_mainclass}"
|
||||
|
||||
red5_stop_cmd="${java_command} ${red5_jython_opt} -Dred5.root=${red5_home} \
|
||||
${red5_logging_opts} ${red5_security_opts} ${red5_stop_opts} \
|
||||
-cp ${red5_classpath} ${red5_stop_mainclass}"
|
||||
|
||||
red5_debug_cmd="${java_command} ${red5_jython_opt} -Dred5.root=${red5_home} \
|
||||
${red5_opts} ${red5_debug_opts} -cp ${red5_classpath} ${red5_mainclass}"
|
||||
|
||||
log_args=">> ${red5_stdout_log} \
|
||||
2>> ${red5_stderr_log} "
|
||||
|
||||
|
||||
command="/usr/sbin/daemon"
|
||||
flags="-p ${pidfile} ${red5_start_cmd} ${log_args}"
|
||||
|
||||
start_precmd="red5_pre_start"
|
||||
stop_cmd="red5_stop"
|
||||
status_cmd="red5_status"
|
||||
poll_cmd="red5_poll"
|
||||
extra_commands="debug"
|
||||
debug_cmd="red5_debug"
|
||||
|
||||
red5_pre_start() {
|
||||
export RED5_HOME=${red5_home}
|
||||
touch $pidfile
|
||||
chown $red5_user $pidfile
|
||||
cd ${red5_home} || exit 1
|
||||
}
|
||||
|
||||
red5_debug() {
|
||||
${red5_debug_cmd}
|
||||
}
|
||||
|
||||
red5_stop() {
|
||||
rc_pid=$(red5_check_pidfile $pidfile)
|
||||
|
||||
if [ -z "$rc_pid" ]; then
|
||||
[ -n "$rc_fast" ] && return 0
|
||||
echo "${name} not running? (check $pidfile)."
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Stopping ${name}."
|
||||
if [ ${red5_connection_token} ]; then
|
||||
${red5_stop_cmd}
|
||||
fi
|
||||
red5_wait_max_for_pid ${red5_stop_timeout} ${rc_pid}
|
||||
kill -KILL ${rc_pid} 2> /dev/null && echo "Killed."
|
||||
rm -f ${pidfile}
|
||||
}
|
||||
|
||||
red5_status() {
|
||||
rc_pid=$(red5_check_pidfile $pidfile)
|
||||
|
||||
if [ -z "$rc_pid" ]; then
|
||||
[ -n "$rc_fast" ] && return 0
|
||||
echo "${name} not running? (check $pidfile)."
|
||||
return 1
|
||||
fi
|
||||
echo "${name} is running has pid $rc_pid."
|
||||
}
|
||||
|
||||
red5_poll() {
|
||||
echo -n "Waiting for pid: $(cat $pidfile)"
|
||||
while (true) ; do
|
||||
rc_pid=$(red5_check_pidfile $pidfile)
|
||||
[ -z "$rc_pid" ] && break
|
||||
sleep 2
|
||||
done
|
||||
echo -e "\tdone\n"
|
||||
}
|
||||
|
||||
|
||||
red5_check_pidfile() {
|
||||
_pidfile=$1
|
||||
if [ -z "$_pidfile" ]; then
|
||||
err 3 'USAGE: red5_check_pidfile pidfile'
|
||||
fi
|
||||
if [ ! -f $_pidfile ]; then
|
||||
debug "pid file ($_pidfile): not readable."
|
||||
return
|
||||
fi
|
||||
read _pid _junk < $_pidfile
|
||||
if [ -z "$_pid" ]; then
|
||||
debug "pid file ($_pidfile): no pid in file."
|
||||
return
|
||||
fi
|
||||
if [ -n "`%%LOCALBASE%%/bin/jps -l | grep -e "^$_pid $red5_mainclass\$"`" ]; then
|
||||
echo -n $_pid
|
||||
fi
|
||||
}
|
||||
|
||||
red5_wait_max_for_pid() {
|
||||
_timeout=$1
|
||||
shift
|
||||
_pid=$1
|
||||
_prefix=
|
||||
while [ $_timeout -gt 0 ] ; do
|
||||
echo -n ${_prefix:-"Waiting (max $_timeout secs) for PIDS: "}$_pid
|
||||
_prefix=", "
|
||||
sleep 2
|
||||
kill -0 $_pid 2> /dev/null || break
|
||||
_timeout=$(($_timeout-2))
|
||||
done
|
||||
if [ -n "$_prefix" ]; then
|
||||
echo "."
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
Red5 is an Open Source Flash Server written
|
||||
in Java that supports streaming Audio/Video
|
||||
(FLV and MP3),Recording Client Streams,
|
||||
Live Stream Publishing, etc.
|
||||
Red5 is an Open Source Flash Server written in Java that supports:
|
||||
- Streaming Audio/Video: FLV, MP3, F4V, MP4, AAC, M4A
|
||||
- Recording Client Streams (FLV only)
|
||||
- Shared Objects
|
||||
- Live Stream Publishing: Sorenson, VP6, h.264, Nelly Moser,
|
||||
MP3, Speex, AAC, NSV
|
||||
- Remoting
|
||||
|
||||
WWW: http://www.red5.fr/
|
||||
WWW: http://www.red5.org/
|
||||
|
@ -1,3 +0,0 @@
|
||||
=====================================
|
||||
Now start your Tomcat and browse with:
|
||||
http://your-server-ip:8180/red5/
|
1063
www/red5/pkg-plist
Normal file
1063
www/red5/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user