mirror of
https://abf.rosa.ru/djam/ServiioMediaServer.git
synced 2025-02-23 14:22:53 +00:00
Automatic import for version 2.0-1
This commit is contained in:
commit
4d0b2def10
5 changed files with 231 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
sources:
|
||||||
|
"serviio-2.0-linux.tar.gz": 18a643f10a94a6ca5fc42870b7809a1dd43f3207
|
121
serviio
Normal file
121
serviio
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# Copyright (c) 2009 Zoltan Kukk
|
||||||
|
#
|
||||||
|
# Author: zoltan.kukk@gmail.com
|
||||||
|
#
|
||||||
|
# /etc/init.d/serviio
|
||||||
|
#
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: serviio
|
||||||
|
# Required-Start: $network
|
||||||
|
# Required-Stop: $network
|
||||||
|
# Default-Start: 3 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Description: Start the serviio DLNA server in headless mode
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
SERVIIO_BIN=/usr/bin/serviio.sh
|
||||||
|
test -x $SERVIIO_BIN || { echo "$SERVIIO_BIN not installed";
|
||||||
|
if [ "$1" = "stop" ]; then exit 0;
|
||||||
|
else exit 5; fi; }
|
||||||
|
|
||||||
|
export SERVIIO_HOME=/usr/share/java/serviio
|
||||||
|
|
||||||
|
#Load the rc.status script for this service.
|
||||||
|
. /etc/rc.status
|
||||||
|
|
||||||
|
# Shell functions sourced from /etc/rc.status:
|
||||||
|
# rc_check check and set local and overall rc status
|
||||||
|
# rc_status check and set local and overall rc status
|
||||||
|
# rc_status -v ditto but be verbose in local rc status
|
||||||
|
# rc_status -v -r ditto and clear the local rc status
|
||||||
|
# rc_failed set local and overall rc status to failed
|
||||||
|
# rc_reset clear local rc status (overall remains)
|
||||||
|
# rc_exit exit appropriate to overall rc status
|
||||||
|
|
||||||
|
# First reset status of this service
|
||||||
|
rc_reset
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting Serviio DLNA server"
|
||||||
|
## Start daemon with startproc(8). If this fails
|
||||||
|
## the echo return value is set appropriate.
|
||||||
|
|
||||||
|
startproc -f -u serviio -g serviio -l /var/log/serviio.log $SERVIIO_BIN -headless
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
start-gui)
|
||||||
|
echo -n "Starting Serviio DLNA server"
|
||||||
|
## Start daemon with startproc(8). If this fails
|
||||||
|
## the echo return value is set appropriate.
|
||||||
|
|
||||||
|
startproc -f -u serviio -g serviio -l /var/log/serviio.log $SERVIIO_BIN
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Shutting down Serviio DLNA daemon"
|
||||||
|
## Stop daemon with killproc(8) and if this fails
|
||||||
|
## set echo the echo return value.
|
||||||
|
|
||||||
|
startproc -f -u serviio -g serviio -l /var/log/serviio.log $SERVIIO_BIN -stop
|
||||||
|
|
||||||
|
# Remember status and be verbose
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
try-restart)
|
||||||
|
## Stop the service and if this succeeds (i.e. the
|
||||||
|
## service was running before), start it again.
|
||||||
|
$0 status >/dev/null && $0 restart
|
||||||
|
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
## Stop the service and regardless of whether it was
|
||||||
|
## running or not, start it again.
|
||||||
|
$0 stop
|
||||||
|
$0 start
|
||||||
|
|
||||||
|
# Remember status and be quiet
|
||||||
|
rc_status
|
||||||
|
;;
|
||||||
|
force-reload|reload)
|
||||||
|
## Signal the daemon to reload its config. Most daemons
|
||||||
|
## do this on signal 1 (SIGHUP).
|
||||||
|
|
||||||
|
echo -n "Reload Serviio DLNA server"
|
||||||
|
rc_failed 3
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
echo -n "Checking for service serviio "
|
||||||
|
## Check status with checkproc(8), if process is running
|
||||||
|
## checkproc will return with exit status 0.
|
||||||
|
|
||||||
|
# Status has a slightly different for the status command:
|
||||||
|
# 0 - service running
|
||||||
|
# 1 - service dead, but /var/run/ pid file exists
|
||||||
|
# 2 - service dead, but /var/lock/ lock file exists
|
||||||
|
# 3 - service not running
|
||||||
|
|
||||||
|
# NOTE: checkproc returns LSB compliant status values.
|
||||||
|
checkproc $SERVIIO_BIN
|
||||||
|
# NOTE: rc_status knows that we called this init script with
|
||||||
|
# "status" option and adapts its messages accordingly.
|
||||||
|
rc_status -v
|
||||||
|
;;
|
||||||
|
probe)
|
||||||
|
## Optional: Probe for the necessity of a reload,
|
||||||
|
## give out the argument which is required for a reload.
|
||||||
|
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
rc_exit
|
15
serviio.service
Normal file
15
serviio.service
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Serviio 2.0 Media Server
|
||||||
|
After=syslog.target local-fs.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=serviio
|
||||||
|
Group=serviio
|
||||||
|
ExecStart=/usr/bin/serviio.sh
|
||||||
|
ExecStop=/usr/bin/serviio.sh -stop
|
||||||
|
KillMode=none
|
||||||
|
Restart=on-abort
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
77
serviio.spec
Normal file
77
serviio.spec
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
Summary: A free media server
|
||||||
|
Name: serviio
|
||||||
|
Version: 2.0
|
||||||
|
Release: 1
|
||||||
|
License: Freeware
|
||||||
|
Url: http://www.serviio.org/
|
||||||
|
Group: Video
|
||||||
|
Source0: http://download.serviio.org/releases/%{name}-%{version}-linux.tar.gz
|
||||||
|
Source1: serviio
|
||||||
|
Source2: serviio.service
|
||||||
|
Patch1: serviio_SERVIIO_HOME.patch
|
||||||
|
BuildRequires: tar gzip
|
||||||
|
BuildRequires: systemd
|
||||||
|
BuildRequires: dos2unix
|
||||||
|
Requires: java >= 1.7.0
|
||||||
|
Requires: ffmpeg
|
||||||
|
Requires: libRTMP
|
||||||
|
Requires: libASS
|
||||||
|
Requires: libx264
|
||||||
|
Requires: libmp3lame
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A free media server. It allows you to stream your media files (music, video
|
||||||
|
or images) to renderer devices (e.g. a TV set, Bluray player, games console
|
||||||
|
or mobile phone) on your connected home network.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
cp %{S:1} .
|
||||||
|
cp %{S:2} .
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}/%{_bindir}
|
||||||
|
cp bin/*.sh %{buildroot}/%{_bindir}
|
||||||
|
dos2unix library/derby.properties
|
||||||
|
chmod -x library/derby.properties
|
||||||
|
for dir in config lib library plugins; do
|
||||||
|
install -d %{buildroot}/usr/share/java/serviio/$dir
|
||||||
|
cp $dir/* %{buildroot}/usr/share/java/serviio/$dir
|
||||||
|
done
|
||||||
|
install -d %{buildroot}/usr/share/java/serviio/log
|
||||||
|
install -D -m 755 %{S:1} %{buildroot}/etc/init.d/serviio
|
||||||
|
install -D -m 644 %{S:2} %{buildroot}%{_unitdir}/serviio.service
|
||||||
|
%pre
|
||||||
|
/usr/sbin/groupadd -r %{name} 2> /dev/null || :
|
||||||
|
/usr/sbin/useradd -r -g %{name} -s /bin/false -c "Serviio Daemon" -d /home %{name} 2> /dev/null || :
|
||||||
|
%service_add_pre serviio.service
|
||||||
|
%post
|
||||||
|
%fillup_and_insserv serviio
|
||||||
|
%service_add_post serviio.service
|
||||||
|
%preun
|
||||||
|
%stop_on_removal serviio
|
||||||
|
%service_add_post serviio.service
|
||||||
|
%postun
|
||||||
|
%restart_on_update serviio
|
||||||
|
%insserv_cleanup
|
||||||
|
%service_add_post serviio.service
|
||||||
|
%files
|
||||||
|
%doc legal/Derby-licence.txt legal/FFmpeg-licence.txt legal/FreeMarker-licence.txt legal/Gson-licence.txt legal/HttpCore-licence.txt legal/Jcs-licence.txt legal/JDOM-licence.txt legal/LameMP3Encoder-licence.txt legal/librtmp-licence.txt legal/LICENSE.xerox legal/Log4J-licence.txt legal/Restlet-licence.txt legal/Rome-licence.txt legal/Sanselan-licence.txt legal/slf4j-licence.txt legal/winp-licence.txt legal/XStream-licence.txt LICENCE.txt NOTICE.txt README.txt RELEASE_NOTES.txt
|
||||||
|
%{_bindir}/serviio.sh
|
||||||
|
%{_bindir}/serviio-console.sh
|
||||||
|
%{_unitdir}/serviio.service
|
||||||
|
%dir %{_datadir}/java/serviio
|
||||||
|
%dir %{_datadir}/java/serviio/config
|
||||||
|
%dir %{_datadir}/java/serviio/lib
|
||||||
|
%dir %{_datadir}/java/serviio/plugins
|
||||||
|
%{_datadir}/java/serviio/config/*.xml
|
||||||
|
%{_datadir}/java/serviio/lib/*.jar
|
||||||
|
%{_datadir}/java/serviio/plugins/*.txt
|
||||||
|
%{_datadir}/java/serviio/config/serviio.jks
|
||||||
|
/etc/init.d/serviio
|
||||||
|
%attr(775,%{name},%{name}) %{_datadir}/java/serviio/library
|
||||||
|
%attr(775,%{name},%{name}) %{_datadir}/java/serviio/log
|
16
serviio_SERVIIO_HOME.patch
Normal file
16
serviio_SERVIIO_HOME.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
diff -urN serviio-2.0.1.orig/bin/serviio.sh serviio-2.0.1/bin/serviio.sh
|
||||||
|
--- serviio-2.0.1.orig/bin/serviio.sh 2012-01-31 20:39:39.000000000 +0100
|
||||||
|
+++ serviio-2.0.1/bin/serviio.sh 2012-07-09 18:53:01.282623000 +0200
|
||||||
|
@@ -35,11 +35,7 @@
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup SERVIIO_HOME
|
||||||
|
-if [ "x$SERVIIO_HOME" = "x" ]; then
|
||||||
|
- # get the full path (without any relative bits)
|
||||||
|
- SERVIIO_HOME=`cd $DIRNAME/..; pwd`
|
||||||
|
-fi
|
||||||
|
-export SERVIIO_HOME
|
||||||
|
+export SERVIIO_HOME=/usr/share/java/serviio
|
||||||
|
|
||||||
|
# Setup the JVM
|
||||||
|
if [ "x$JAVA" = "x" ]; then
|
Loading…
Add table
Reference in a new issue