# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	serviio
#	serviio/Makefile
#	serviio/distinfo
#	serviio/files
#	serviio/files/serviiod.in
#	serviio/files/serviio.in
#	serviio/files/serviio-console.in
#	serviio/files/pkg-message.in
#	serviio/files/patch-logging
#	serviio/pkg-descr
#	serviio/pkg-plist
#
echo c - serviio
mkdir -p serviio > /dev/null 2>&1
echo x - serviio/Makefile
sed 's/^X//' >serviio/Makefile << '40970baa10d89db8230f21189fac873c'
X# New ports collection makefile for:	serviio
X# Date created:		2011-01-03
X# Whom:			Mikhail Teterin <mi@aldan.algebra.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	serviio
XPORTVERSION=	0.4.2
XCATEGORIES=	net multimedia java www
XMASTER_SITES=	http://www.serviio.org/files/releases/
XEXTRACT_SUFX=	-linux.tar.gz
X
XMAINTAINER=	mi@aldan.algebra.com
XCOMMENT=	Transcoding DLNA-server implemented in Java
X
XRUN_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg
X
XNO_BUILD=	yes
XUSE_JAVA=	yes
XUSE_DOS2UNIX=	derby.properties
X
XPKGMESSAGE=	${WRKSRC}/pkg-message
XSUB_FILES+=	pkg-message serviiod serviio-console
XUSE_RC_SUBR=	serviio
XSUB_LIST+=	USER=${USERS}
X
XUSERS=	dlna
XGROUPS=	dlna
X
Xdo-install:
X	${MKDIR} ${JAVAJARDIR}/${PORTNAME}
X	${INSTALL_DATA} ${WRKSRC}/lib/*.jar ${JAVAJARDIR}/${PORTNAME}/
X	${MKDIR} ${PREFIX}/etc/${PORTNAME}
X.for f in profiles log4j
X	${INSTALL_DATA} ${WRKSRC}/config/$f.xml ${ETCDIR}/$f.dist.xml
X	${TEST} -e ${ETCDIR}/$f.xml || ${INSTALL_DATA} ${WRKSRC}/config/$f.xml ${ETCDIR}/
X.endfor
X	${INSTALL_DATA} ${WRKSRC}/config/log4j.xml ${PREFIX}/etc/${PORTNAME}/log4j.dist.xml
X	${MKDIR} /var/db/${PORTNAME}
X	${CHOWN} ${USERS}:${GROUPS} /var/db/${PORTNAME}
X	${INSTALL_DATA} ${WRKSRC}/library/derby.properties /var/db/${PORTNAME}
X	${INSTALL_SCRIPT} ${WRKDIR}/serviiod ${PREFIX}/sbin
X	${INSTALL_SCRIPT} ${WRKDIR}/serviio-console ${PREFIX}/bin
X
Xpost-install:
X	@${FMT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
40970baa10d89db8230f21189fac873c
echo x - serviio/distinfo
sed 's/^X//' >serviio/distinfo << '1a6a4832a4cbfcfecdd45b9edf08fe3a'
XSHA256 (serviio-0.4.2-linux.tar.gz) = ebdb0b0b23e45a504f2d32be65c49feebbdcb4d0dc02576012d03a59146b14ad
XSIZE (serviio-0.4.2-linux.tar.gz) = 7295389
1a6a4832a4cbfcfecdd45b9edf08fe3a
echo c - serviio/files
mkdir -p serviio/files > /dev/null 2>&1
echo x - serviio/files/serviiod.in
sed 's/^X//' >serviio/files/serviiod.in << '37ec3ce7fde9316a124cd833bb87dfa4'
X#!/bin/sh
X### ====================================================================== ###
X##                                                                          ##
X##  Serviio start Script                                                    ##
X##                                                                          ##
X### ====================================================================== ###
X
XSERVIIO_HOME=%%JAVAJARDIR%%/serviio
X# Setup the classpath
XSERVIIO_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%%"
X
X# Setup Serviio specific properties
XJAVA_OPTS="-Djava.net.preferIPv4Stack=true -Dderby.system.home=/var/db/serviio -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=%%LOCALBASE%%/bin/ffmpeg"
X
X# Execute the JVM in the foreground
Xexec java -Xmx384M $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
37ec3ce7fde9316a124cd833bb87dfa4
echo x - serviio/files/serviio.in
sed 's/^X//' >serviio/files/serviio.in << 'd4a5a86e5ddcbc9a3b1f07333c66c047'
X#!/bin/sh
X
X# $FreeBSD: ports/net/minidlna/files/minidlna.sh.in,v 1.2 2010/12/18 19:57:07 mi Exp $
X#
X# PROVIDE: serviio
X# REQUIRE: LOGIN
X# KEYWORD: shutdown
X#
X# Add the following line to /etc/rc.conf[.local] to enable minidlna:
X#
X# minidlna_enable="YES"
X
X. /etc/rc.subr
X
Xname=serviio
Xrcvar=`set_rcvar`
Xcommand=%%PREFIX%%/sbin/serviiod
X
Xload_rc_config $name
X
Xserviio_user=${serviio_user-"%%USER%%"}
X
Xrequired_dirs="/var/db/serviio"
Xcommand_args="&"
X
Xstop_cmd="$command -stop"
X
Xrun_rc_command $1
d4a5a86e5ddcbc9a3b1f07333c66c047
echo x - serviio/files/serviio-console.in
sed 's/^X//' >serviio/files/serviio-console.in << '1348b4021619ab659a399fbba48ddc39'
X#!/bin/sh
X### ====================================================================== ###
X##                                                                          ##
X##  Serviio Console ript                                                    ##
X##                                                                          ##
X### ====================================================================== ###
X
XSERVIIO_CONSOLE_HOME=%%JAVAJARDIR%%/serviio
X
X# Setup the classpath
XSERVIIO_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:%%ETCDIR%%"
X
X# Setup Serviio specific properties
XJAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true -Dffmpeg.location=%%LOCALBASE%%/bin/ffmpeg"
X
X# Execute the JVM in the foreground
Xexec java $JAVA_OPTS -classpath "$SERVIIO_CONSOLE_CLASS_PATH" org.serviio.console.ServiioConsole "$@"
1348b4021619ab659a399fbba48ddc39
echo x - serviio/files/pkg-message.in
sed 's/^X//' >serviio/files/pkg-message.in << '58c9fbe52d0852921990a2b5122c53f1'
X
XThe configuration files are installed in %%PREFIX%%/etc/serviio.
X
XThe database is located under /var/db/serviio/.
X
XThe logging configuration is set to use syslog@localhost by default --
Xedit %%PREFIX%%/etc/serviio/log4j.xml to alter logging settings.
X
XThe syslogd needs to run with something like ``-a 127.0.0.1'' for it
Xto listen to messages from localhost.
58c9fbe52d0852921990a2b5122c53f1
echo x - serviio/files/patch-logging
sed 's/^X//' >serviio/files/patch-logging << '0e6c7c8f1b83b45a58aba96134813d83'
X--- config/log4j.xml	2010-09-14 16:24:30.000000000 -0400
X+++ config/log4j.xml	2011-01-03 01:46:13.000000000 -0500
X@@ -1,3 +1,3 @@
X-<?xml version="1.0" encoding="UTF-8"?>
X+<?xml version="1.0" encoding="US-ASCII"?>
X <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
X 
X@@ -10,4 +10,12 @@
X <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
X 
X+	<appender name="syslog" class="org.apache.log4j.net.SyslogAppender">
X+		<param name="Facility" value="local3"/>
X+		<param name="SyslogHost" value="localhost"/>
X+		<layout class="org.apache.log4j.PatternLayout">
X+			<param name="ConversionPattern" value="%-5p %m%n"/>
X+		</layout>
X+	</appender>
X+
X 	 <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
X 	 	<param name="Threshold" value="DEBUG"/>
X--- library/derby.properties	2010-08-06 17:18:38.000000000 -0400
X+++ library/derby.properties	2011-01-03 01:53:46.000000000 -0500
X@@ -1,3 +1,2 @@
X-derby.stream.error.file=../log/derby.log
X derby.storage.pageSize=8192
X derby.storage.pageCacheSize=3000
0e6c7c8f1b83b45a58aba96134813d83
echo x - serviio/pkg-descr
sed 's/^X//' >serviio/pkg-descr << '31336c06cdbf8d57dbba7f8c77962cb2'
XServiio is a free DLNA media server. It allows you to stream your
Xmedia files (music, video or images) to any DLNA-certified renderer
Xdevice (e.g. a TV set, Bluray player, games console) on your home
Xnetwork.
X
XServiio uses a priority-based metadata extraction so that you can
Xchoose what metadata should describe your media files (e.g. audio
Xtrack name, DVD cover, TV series and episodes names, etc.). These
Xinclude metadata embedded into the media files themselves, locally
Xstored metadata files and metadata that can be obtained online.
XWith this powerful tool you will be able to build your Serviio media
Xlibrary easily and effectively.
X
XServiio works with any DLNA compliant device (TV, Playstation 3,
Xetc.) and some other (XBox 360). It supports profiles for particular
Xdevices so that it can be tuned to maximise the device's potential
Xand/or minimize lack of media format playback support (via transcoding).
X
XWWW:	http://www.serviio.org/
31336c06cdbf8d57dbba7f8c77962cb2
echo x - serviio/pkg-plist
sed 's/^X//' >serviio/pkg-plist << '9edb6987653afd6aaebc508edc822ac0'
Xsbin/serviiod
Xbin/serviio-console
X%%JAVAJARDIR%%/serviio/serviio-client.jar
X%%JAVAJARDIR%%/serviio/serviio.jar
X%%JAVAJARDIR%%/serviio/log4j.jar
X%%JAVAJARDIR%%/serviio/freemarker.jar
X%%JAVAJARDIR%%/serviio/derby.jar
X%%JAVAJARDIR%%/serviio/jaudiotagger.jar
X%%JAVAJARDIR%%/serviio/sanselan.jar
X%%JAVAJARDIR%%/serviio/slf4j-api.jar
X%%JAVAJARDIR%%/serviio/jul-to-slf4j.jar
X%%JAVAJARDIR%%/serviio/slf4j-log4j12.jar
X%%JAVAJARDIR%%/serviio/jcl-over-slf4j.jar
X%%JAVAJARDIR%%/serviio/jcs.jar
X%%JAVAJARDIR%%/serviio/concurrent.jar
X%%JAVAJARDIR%%/serviio/xstream.jar
X%%JAVAJARDIR%%/serviio/org.restlet.jar
X%%JAVAJARDIR%%/serviio/org.restlet.ext.xstream.jar
X%%JAVAJARDIR%%/serviio/httpcore.jar
X@dirrm %%JAVAJARDIR%%/serviio
X@unexec rm -R /var/db/serviio
X@unexec cmp %D/%%ETCDIR%%/profiles.xml %D/%%ETCDIR%%/profiles.dist.xml && rm -f %D/%%ETCDIR%%/profiles.xml
X@unexec cmp %D/%%ETCDIR%%/log4j.xml %D/%%ETCDIR%%/log4j.dist.xml && rm -f %D/%%ETCDIR%%/log4j.xml
X%%ETCDIR%%/profiles.dist.xml
X%%ETCDIR%%/log4j.dist.xml
X@dirrmtry %%ETCDIR%%
9edb6987653afd6aaebc508edc822ac0
exit

