From 8b2a995ee41eae12349e80fe428e7a5f48d11e27 Mon Sep 17 00:00:00 2001 From: lesebas Date: Tue, 23 Jun 2015 23:37:14 +0200 Subject: move from AUR3 to AUR4 --- .SRCINFO | 28 ++++++++++++++++++++++ PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ serviio-console.sh | 8 +++++++ serviio.desktop | 12 ++++++++++ serviio.install | 15 ++++++++++++ serviio.png | Bin 0 -> 1779 bytes serviio.service | 9 +++++++ serviio.sh | 18 ++++++++++++++ 8 files changed, 158 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 serviio-console.sh create mode 100644 serviio.desktop create mode 100644 serviio.install create mode 100644 serviio.png create mode 100644 serviio.service create mode 100644 serviio.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..9f68100 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +# Generated by makepkg 4.2.1 +# Tue Apr 14 20:06:25 UTC 2015 +pkgbase = serviio + pkgdesc = Free DLNA media server + pkgver = 1.5.2 + pkgrel = 2 + url = http://www.serviio.org/ + arch = any + license = custom + depends = java-runtime-headless=8 + depends = ffmpeg + source = http://download.serviio.org/releases/serviio-1.5.2-linux.tar.gz + source = serviio.sh + source = serviio-console.sh + source = serviio.service + source = serviio.desktop + source = serviio.png + source = serviio.install + md5sums = 70cfa7d9f54b1c921194b6c0d6530ed6 + md5sums = 227a75de2dea1db93c1fba3d004e01ad + md5sums = 7f38b2f294ce990958dcc63b583807b4 + md5sums = e958d9812448f97fe325dfffe8b44620 + md5sums = fbfcac4ad5dffd909e51ea1a7a6335aa + md5sums = d41e3e757e412dfcd3036d9e19b81450 + md5sums = 0b89d6c683305ef4473fab4c6688c7ab + +pkgname = serviio + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..57163d1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +pkgname=serviio +pkgver=1.5.2 +pkgrel=2 +pkgdesc="Free DLNA media server" +arch=('any') +url="http://www.serviio.org/" +license=('custom') +depends=('java-runtime-headless=8' 'ffmpeg') +source=(http://download.serviio.org/releases/serviio-${pkgver}-linux.tar.gz + $pkgname.sh + $pkgname-console.sh + $pkgname.service + $pkgname.desktop + $pkgname.png + $pkgname.install) +md5sums=('70cfa7d9f54b1c921194b6c0d6530ed6' + '227a75de2dea1db93c1fba3d004e01ad' + '7f38b2f294ce990958dcc63b583807b4' + 'e958d9812448f97fe325dfffe8b44620' + 'fbfcac4ad5dffd909e51ea1a7a6335aa' + 'd41e3e757e412dfcd3036d9e19b81450' + '0b89d6c683305ef4473fab4c6688c7ab') + +package() { + cd "$pkgname-$pkgver" + + # define variable for Serviio home directory + SERVIIO_HOME=$pkgdir/usr/share/java/$pkgname + + # create the folders needed in the main directory + install -dm755 ${SERVIIO_HOME}/{config,lib,library,plugins} + + # place the serviio scripts in the /usr/bin folder + install -Dm755 ${srcdir}/$pkgname.sh $pkgdir/usr/bin/$pkgname + install -Dm755 ${srcdir}/$pkgname-console.sh $pkgdir/usr/bin/$pkgname-console + + # copy xml config files to the config folder + install -m644 config/*.xml ${SERVIIO_HOME}/config + + # copy all jar files to the lib folder + install -m644 lib/*.jar ${SERVIIO_HOME}/lib + + # copy derby.properties to library folder + install -m644 library/derby.properties ${SERVIIO_HOME}/library + + # copy plugins-readme.txt to plugins folder + install -m644 plugins/plugins-readme.txt ${SERVIIO_HOME}/plugins + + # create the log folder in /var/log + install -dm755 $pkgdir/var/log/$pkgname + + # create a symlink that puts all log files in /var/log + ln -s /var/log/$pkgname ${SERVIIO_HOME}/log + + # supply the license file + install -Dm644 LICENCE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE + + # install systemd-service + install -Dm644 "${srcdir}/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" + + #install the .desktop file + install -Dm644 "${srcdir}/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" + + #install the icon file + install -Dm644 "${srcdir}/$pkgname.png" "$pkgdir/usr/share/icons/hicolor/48x48/apps/$pkgname.png" + + +} \ No newline at end of file diff --git a/serviio-console.sh b/serviio-console.sh new file mode 100644 index 0000000..976d59b --- /dev/null +++ b/serviio-console.sh @@ -0,0 +1,8 @@ +#!/bin/sh + + export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH + SERVIIO_CONSOLE_HOME="/usr/share/java/serviio" + SERVIIO_CLASS_PATH="$SERVIIO_CONSOLE_HOME/lib/*:$SERVIIO_CONSOLE_HOME/config" + JAVA_OPTS="-Dserviio.home=$SERVIIO_CONSOLE_HOME -Djava.net.preferIPv4Stack=true" + + java -Xmx512M $JAVA_OPTS -classpath $SERVIIO_CLASS_PATH org.serviio.console.ServiioConsole "$@" diff --git a/serviio.desktop b/serviio.desktop new file mode 100644 index 0000000..1a62ec6 --- /dev/null +++ b/serviio.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Serviio +Comment[fr]=Console d'administration du serveur DLNA +Comment[en]=Administration console of DLNA server +Exec= serviio-console +Categories=AudioVideo +Icon=serviio +Path= +Terminal=false +StartupNotify=false diff --git a/serviio.install b/serviio.install new file mode 100644 index 0000000..043ea27 --- /dev/null +++ b/serviio.install @@ -0,0 +1,15 @@ + +post_install() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + + +post_upgrade() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_remove() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} \ No newline at end of file diff --git a/serviio.png b/serviio.png new file mode 100644 index 0000000..f2eefad Binary files /dev/null and b/serviio.png differ diff --git a/serviio.service b/serviio.service new file mode 100644 index 0000000..54e2855 --- /dev/null +++ b/serviio.service @@ -0,0 +1,9 @@ +[Unit] +Description=Serviio +After=network.target + +[Service] +ExecStart=/usr/bin/serviio + +[Install] +WantedBy=multi-user.target diff --git a/serviio.sh b/serviio.sh new file mode 100644 index 0000000..451a645 --- /dev/null +++ b/serviio.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ $UID -eq 0 ] +then + if [[ -f /etc/profile.d/jdk.sh ]]; then + . /etc/profile.d/jdk.sh + elif [[ -f /etc/profile.d/jre.sh ]]; then + . /etc/profile.d/jre.sh + fi + export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH + SERVIIO_HOME="/usr/share/java/serviio" + SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config" + JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.home=$SERVIIO_HOME -Dffmpeg.location=ffmpeg" + + java -Xmx384M $JAVA_OPTS -classpath $SERVIIO_CLASS_PATH org.serviio.MediaServer "$@" +else + echo "Must be run as root." +fi -- cgit v1.2.3-70-g09d2