aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/Makefile1
-rw-r--r--net/serviio/files/console-log4j.properties4
-rw-r--r--net/serviio/files/patch-logging31
-rw-r--r--net/serviio/files/pkg-message.in22
-rw-r--r--net/serviio/files/serviio-console.in17
-rw-r--r--net/serviio/files/serviio.in29
-rw-r--r--net/serviio/files/serviiod.in16
7 files changed, 120 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile
index cbe31ec6b171..2ebe14b5562e 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1005,6 +1005,7 @@
SUBDIR += ser
SUBDIR += serveez
SUBDIR += service-discovery-applet
+ SUBDIR += serviio
SUBDIR += sflowtool
SUBDIR += sharity-light
SUBDIR += shelldap
diff --git a/net/serviio/files/console-log4j.properties b/net/serviio/files/console-log4j.properties
new file mode 100644
index 000000000000..baa80214bda5
--- /dev/null
+++ b/net/serviio/files/console-log4j.properties
@@ -0,0 +1,4 @@
+log4j.appender.stderr=org.apache.log4j.ConsoleAppender
+log4j.appender.stderr.layout=org.apache.log4j.SimpleLayout
+log4j.appender.stderr.Target=System.err
+log4j.rootLogger=WARN, stderr
diff --git a/net/serviio/files/patch-logging b/net/serviio/files/patch-logging
new file mode 100644
index 000000000000..01511b7fa229
--- /dev/null
+++ b/net/serviio/files/patch-logging
@@ -0,0 +1,31 @@
+The derby.properties is not currently being installed -- defaults
+seem to work fine...
+
+--- library/derby.properties 2010-08-06 17:18:38.000000000 -0400
++++ library/derby.properties 2011-01-03 01:53:46.000000000 -0500
+@@ -1,3 +1,2 @@
+-derby.stream.error.file=../log/derby.log
+ derby.storage.pageSize=8192
+ derby.storage.pageCacheSize=3000
+
+The port makes sure, the below file is only used to configure logging of
+serviio-daemon process. The console is configured separately -- by
+default it simply logs everything to stderr.
+
+--- config/log4j.xml 2011-01-23 14:24:59.000000000 -0500
++++ config/log4j.xml 2011-02-04 00:13:33.000000000 -0500
+@@ -1,3 +1,3 @@
+-<?xml version="1.0" encoding="UTF-8"?>
++<?xml version="1.0" encoding="US-ASCII"?>
+ <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+@@ -10,8 +10,8 @@
+ <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <param name="Threshold" value="DEBUG"/>
+ <param name="Append" value="true" />
+- <param name="File" value="${serviio.home}/log/serviio.log" />
++ <param name="File" value="/var/log/serviio/serviio.log" />
+ <param name="MaxFileSize" value="500KB" />
+ <param name="MaxBackupIndex" value="5" />
diff --git a/net/serviio/files/pkg-message.in b/net/serviio/files/pkg-message.in
new file mode 100644
index 000000000000..e58924f0e272
--- /dev/null
+++ b/net/serviio/files/pkg-message.in
@@ -0,0 +1,22 @@
+The configuration files are installed in %%PREFIX%%/etc/serviio --
+but only the logging configuration and the player device-profiles
+may be changed there -- the library is set via the GUI program
+serviio-console (see below).
+
+The database will be located under /var/db/serviio/.
+
+Remember to set serviio_enable=YES in /etc/rc.conf for the service to
+start at boot. It will run as user ``%%USER%%''.
+
+When the server is running, run the %%PREFIX%%/bin/serviio-console (a
+GUI program) on the same host -- as yourself -- to configure it.
+
+From http://www.serviio.org/component/content/article/21#q2 :
+If you'd like to manage the service from a remote host, add
+
+ serviio_args=-Dserviio.remoteHost=yo.ur.local.ip
+
+to rc.conf. Note, that there is NO AUTHENTICATION between console and
+the server processes.
+
+For support, visit the lively forum at http://forum.serviio.org/
diff --git a/net/serviio/files/serviio-console.in b/net/serviio/files/serviio-console.in
new file mode 100644
index 000000000000..017669960bbb
--- /dev/null
+++ b/net/serviio/files/serviio-console.in
@@ -0,0 +1,17 @@
+#!/bin/sh
+### ====================================================================== ###
+## ##
+## Serviio Console ript ##
+## ##
+### ====================================================================== ###
+
+SERVIIO_CONSOLE_HOME=%%JAVAJARDIR%%/serviio
+
+# Setup the classpath
+SERVIIO_CONSOLE_CLASS_PATH="$SERVIIO_CONSOLE_HOME/serviio-client.jar:$SERVIIO_CONSOLE_HOME/serviio.jar:$SERVIIO_CONSOLE_HOME/log4j.jar:$SERVIIO_CONSOLE_HOME/slf4j-api.jar:$SERVIIO_CONSOLE_HOME/slf4j-log4j12.jar:$SERVIIO_CONSOLE_HOME/jul-to-slf4j.jar:$SERVIIO_CONSOLE_HOME/org.restlet.jar:$SERVIIO_CONSOLE_HOME/org.restlet.ext.xstream.jar:$SERVIIO_CONSOLE_HOME/xstream.jar"
+
+# Setup Serviio specific properties
+JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true -Dffmpeg.location=%%LOCALBASE%%/bin/ffmpeg -Dlog4j.configuration=file:%%ETCDIR%%/console-log4j.properties"
+
+# Execute the JVM in the foreground
+exec java $JAVA_OPTS "$@" -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.serviio.console.ServiioConsole
diff --git a/net/serviio/files/serviio.in b/net/serviio/files/serviio.in
new file mode 100644
index 000000000000..8418d5d67587
--- /dev/null
+++ b/net/serviio/files/serviio.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: serviio
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following line to /etc/rc.conf[.local] to enable serviio:
+#
+# serviio_enable="YES"
+
+. /etc/rc.subr
+
+name=serviio
+rcvar=`set_rcvar`
+command=%%PREFIX%%/sbin/serviiod
+
+load_rc_config $name
+
+serviio_user=${serviio_user-"dlna"}
+
+_dirs="/var/db/serviio /var/log/serviio"
+start_precmd="mkdir -p $_dirs; chown $serviio_user $_dirs"
+command_args="$serviio_args &"
+
+stop_cmd="$command -stop"
+
+run_rc_command $1
diff --git a/net/serviio/files/serviiod.in b/net/serviio/files/serviiod.in
new file mode 100644
index 000000000000..3118f3203969
--- /dev/null
+++ b/net/serviio/files/serviiod.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+### ====================================================================== ###
+## ##
+## Serviio start Script ##
+## ##
+### ====================================================================== ###
+
+SERVIIO_HOME=%%JAVAJARDIR%%/serviio
+# Setup the classpath
+SERVIIO_CLASS_PATH="$SERVIIO_HOME/serviio.jar:$SERVIIO_HOME/derby.jar:$SERVIIO_HOME/jcs.jar:$SERVIIO_HOME/concurrent.jar:$SERVIIO_HOME/freemarker.jar:$SERVIIO_HOME/httpcore.jar:$SERVIIO_HOME/jaudiotagger.jar:$SERVIIO_HOME/jul-to-slf4j.jar:$SERVIIO_HOME/jcl-over-slf4j.jar:$SERVIIO_HOME/log4j.jar:$SERVIIO_HOME/sanselan.jar:$SERVIIO_HOME/slf4j-api.jar:$SERVIIO_HOME/slf4j-log4j12.jar:$SERVIIO_HOME/org.restlet.jar:$SERVIIO_HOME/org.restlet.ext.xstream.jar:$SERVIIO_HOME/xstream.jar:%%ETCDIR%%"
+
+# Setup Serviio specific properties
+JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=/var/db/serviio -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=%%LOCALBASE%%/bin/ffmpeg"
+
+# Execute the JVM in the foreground
+exec java -Xmx384M $JAVA_OPTS "$@" -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer