aboutsummaryrefslogtreecommitdiffstats
path: root/net/serviio
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2013-10-15 03:50:26 +0800
committernetchild <netchild@FreeBSD.org>2013-10-15 03:50:26 +0800
commit75d824f414c130fc64be6ea559d2c20fc37bed12 (patch)
treee37c911cbd1f5d7ae3fe2c0f17648b58d5931f26 /net/serviio
parentaa7f6ad8bf9113575e91dfc367c5747b98d995a8 (diff)
downloadfreebsd-ports-gnome-75d824f414c130fc64be6ea559d2c20fc37bed12.tar.gz
freebsd-ports-gnome-75d824f414c130fc64be6ea559d2c20fc37bed12.tar.zst
freebsd-ports-gnome-75d824f414c130fc64be6ea559d2c20fc37bed12.zip
- give serviio a home (other than what is specified in the GECOS of the user)
- generate a set of config files from the example ones, if no config file exists (on first install or if the config didn't change from the example one) [1] PR: 182711 [1] Submitted by: Jason Unovitch <jason.unovitch@gmail.com> [1]
Diffstat (limited to 'net/serviio')
-rw-r--r--net/serviio/Makefile2
-rw-r--r--net/serviio/files/serviio.in2
-rw-r--r--net/serviio/files/serviiod.in4
-rw-r--r--net/serviio/pkg-plist4
4 files changed, 9 insertions, 3 deletions
diff --git a/net/serviio/Makefile b/net/serviio/Makefile
index 677cebd7c7f0..d2ced28931ca 100644
--- a/net/serviio/Makefile
+++ b/net/serviio/Makefile
@@ -3,7 +3,7 @@
PORTNAME= serviio
PORTVERSION= 1.3.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net multimedia java www
MASTER_SITES= http://download.serviio.org/releases/
EXTRACT_SUFX= -linux.tar.gz
diff --git a/net/serviio/files/serviio.in b/net/serviio/files/serviio.in
index 4d826dc519a8..f119db364b16 100644
--- a/net/serviio/files/serviio.in
+++ b/net/serviio/files/serviio.in
@@ -24,7 +24,7 @@ if [ -n "${serviio_lang}" ]; then
export LANG=${serviio_lang}
fi
-_dirs="/var/db/serviio /var/log/serviio"
+_dirs="/var/db/serviio /var/db/serviio/home /var/log/serviio"
start_precmd="mkdir -p $_dirs; chown $serviio_user $_dirs"
command_args="$serviio_args &"
diff --git a/net/serviio/files/serviiod.in b/net/serviio/files/serviiod.in
index ecd33dab4e0b..6e851a85de3b 100644
--- a/net/serviio/files/serviiod.in
+++ b/net/serviio/files/serviiod.in
@@ -6,6 +6,7 @@
### ====================================================================== ###
PATH=$PATH:%%PREFIX%%/bin
+HOME=/var/db/serviio/home
SERVIIO_HOME=%%JAVAJARDIR%%/serviio
SERVIIO_CLASS_PATH="$SERVIIO_HOME/serviio.jar"
# Setup the classpath
@@ -16,7 +17,7 @@ done
SERVIIO_CLASS_PATH="$SERVIIO_CLASS_PATH:%%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/ffmpeg1"
+JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=/var/db/serviio -Dserviio.home=$HOME -Dffmpeg.location=%%LOCALBASE%%/bin/ffmpeg1"
JAVA_OPTS="${JAVA_OPTS} -Djcs.auxiliary.DC.attributes.DiskPath=/var/db/serviio"
@@ -31,4 +32,5 @@ do
done
# Execute the JVM in the foreground
+export HOME PATH
exec java -Xmx512M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@" 2>&1 >/dev/null
diff --git a/net/serviio/pkg-plist b/net/serviio/pkg-plist
index 2503a12a6752..8ab17d80f22a 100644
--- a/net/serviio/pkg-plist
+++ b/net/serviio/pkg-plist
@@ -41,6 +41,10 @@ bin/serviio-console
@unexec cmp %D/%%ETCDIR%%/profiles.xml %D/%%ETCDIR%%/profiles.dist.xml && rm -f %D/%%ETCDIR%%/profiles.xml || echo Modified profiles.xml remains in %D/%%ETCDIR%%
@unexec cmp %D/%%ETCDIR%%/log4j.xml %D/%%ETCDIR%%/log4j.dist.xml && rm -f %D/%%ETCDIR%%/log4j.xml || echo Modified log4j.xml remains in %D/%%ETCDIR%%
@unexec cmp %D/%%ETCDIR%%/console-log4j.properties %D/%%ETCDIR%%/console-log4j.dist.properties && rm -f %D/%%ETCDIR%%/console-log4j.properties || echo Modified console-log4j.properties remains in %D/%%ETCDIR%%
+@exec [ -f %D/%%ETCDIR%%/application-profiles.xml ] || cp -v %D/%%ETCDIR%%/application-profiles.dist.xml %D/%%ETCDIR%%/application-profiles.xml
+@exec [ -f %D/%%ETCDIR%%/profiles.xml ] || cp -v %D/%%ETCDIR%%/profiles.dist.xml %D/%%ETCDIR%%/profiles.xml
+@exec [ -f %D/%%ETCDIR%%/log4j.xml ] || cp -v %D/%%ETCDIR%%/log4j.dist.xml %D/%%ETCDIR%%/log4j.xml
+@exec [ -f %D/%%ETCDIR%%/console-log4j.properties ] || cp -v %D/%%ETCDIR%%/console-log4j.dist.properties %D/%%ETCDIR%%/console-log4j.properties
%%ETCDIR%%/profiles.dist.xml
%%ETCDIR%%/log4j.dist.xml
%%ETCDIR%%/application-profiles.dist.xml