From f45d4b5a872fa4d01c92a0909df19de63625b303 Mon Sep 17 00:00:00 2001 From: Stu Miller Date: Fri, 10 Apr 2020 10:29:11 +0700 Subject: multimedia/plexmediaserver: Updated for v 1.19.1.2630_72c16a276. Signed-off-by: Willy Sudiarto Raharjo --- multimedia/plexmediaserver/doinst.sh | 2 +- .../plexmediaserver/plexmediaserver.SlackBuild | 52 ++++------ multimedia/plexmediaserver/plexmediaserver.info | 14 +-- multimedia/plexmediaserver/rc.plexmediaserver | 113 --------------------- 4 files changed, 28 insertions(+), 153 deletions(-) delete mode 100644 multimedia/plexmediaserver/rc.plexmediaserver (limited to 'multimedia/plexmediaserver') diff --git a/multimedia/plexmediaserver/doinst.sh b/multimedia/plexmediaserver/doinst.sh index 0908c4e6c4..aea0ab5aa9 100644 --- a/multimedia/plexmediaserver/doinst.sh +++ b/multimedia/plexmediaserver/doinst.sh @@ -19,7 +19,7 @@ if [ -e etc/rc.d/rc.plexmediaserver ]; then fi config etc/rc.d/rc.plexmediaserver.new -config etc/default/plexmediaserver +config etc/default/plexmediaserver.new if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 diff --git a/multimedia/plexmediaserver/plexmediaserver.SlackBuild b/multimedia/plexmediaserver/plexmediaserver.SlackBuild index a5a71d2c2d..d5f180c065 100644 --- a/multimedia/plexmediaserver/plexmediaserver.SlackBuild +++ b/multimedia/plexmediaserver/plexmediaserver.SlackBuild @@ -5,6 +5,7 @@ # Copyright 2014-2015 Lionel Young # Copyright 2015-2017 Marcel Saegebarth # Copyright 2017-2020 Kevin Matthew +# Copyright 2020 Stu Miller # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,7 +28,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=plexmediaserver -VERSION=${VERSION:-1.18.9.2578_513b381af} +VERSION=${VERSION:-1.19.1.2630_72c16a276} PKG_VERSION=$(echo $VERSION | tr _ -) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -91,12 +92,13 @@ fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $PKG -rm -rf $PRGNAM-$PKG_VERSION -ar xv $CWD/${PRGNAM}_${PKG_VERSION}_${DEBARCH}.deb -tar xvf data.tar.?z -rm -f debian-binary control.tar.?z data.tar.?z -rm -rf $PKG/etc/apt/ $PKG/etc/init $PKG/etc/init.d +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +ar xv $CWD/${PRGNAM}_${PKG_VERSION}_${DEBARCH}.deb data.tar.xz +tar xvf data.tar.xz -C $PRGNAM-$VERSION +rm -f data.tar.xz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -104,24 +106,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/opt/$PRGNAM/bin/ -mv $PKG/usr/lib/plexmediaserver $PKG/opt/$PRGNAM/lib +mkdir -p $PKG/usr/lib/ +mv usr/lib/plexmediaserver $PKG/usr/lib -mv usr/sbin/start_pms $PKG/opt/$PRGNAM/bin/ -sed -i -e "s#/usr/lib/plexmediaserver#/opt/$PRGNAM/lib#" \ - $PKG/opt/$PRGNAM/bin/start_pms -mkdir -p $PKG/usr/bin/ -ln -s /opt/$PRGNAM/bin/start_pms \ - $PKG/usr/bin/start_pms +mkdir -p $PKG/usr/share/applications/ +mv usr/share/applications/plexmediaserver.desktop $PKG/usr/share/applications +sed -i -e "s/x-www-browser/xdg-open/" $PKG/usr/share/applications/plexmediaserver.desktop -mv usr/share/applications/plexmediaserver.desktop $PKG/opt/$PRGNAM/ -sed -i -e "s/x-www-browser/xdg-open/" \ - $PKG/opt/$PRGNAM/plexmediaserver.desktop -mkdir -p $PKG/usr/share/applications -ln -s /opt/$PRGNAM/plexmediaserver.desktop \ - $PKG/usr/share/applications/plexmediaserver.desktop +mkdir -p $PKG/etc/rc.d +cat $PKG/usr/lib/$PRGNAM/lib/$PRGNAM.init > $PKG/etc/rc.d/rc.$PRGNAM.new +chmod 0644 $PKG/etc/rc.d/rc.$PRGNAM.new -rm -rf $PKG/etc/systemd $PKG/usr/share/doc $PKG/usr/sbin $PKG/usr/lib +mkdir -p $PKG/etc/default +cat $PKG/usr/lib/plexmediaserver/lib/plexmediaserver.default > $PKG/etc/default/$PRGNAM.new +chmod 0644 $PKG/etc/default/$PRGNAM.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -129,16 +127,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/var/lib/$PRGNAM chown -R $PLEX_USER:$PLEX_GROUP $PKG/var/lib/$PRGNAM -mkdir -p $PKG/etc/rc.d/ -cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new -chmod 0644 $PKG/etc/rc.d/rc.$PRGNAM.new - -# cleanup -( - cd $PKG - rm -rf _gpgplex lib -) - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/multimedia/plexmediaserver/plexmediaserver.info b/multimedia/plexmediaserver/plexmediaserver.info index 1c68aad23a..b577f76e32 100644 --- a/multimedia/plexmediaserver/plexmediaserver.info +++ b/multimedia/plexmediaserver/plexmediaserver.info @@ -1,10 +1,10 @@ PRGNAM="plexmediaserver" -VERSION="1.18.9.2578_513b381af" +VERSION="1.19.1.2630_72c16a276" HOMEPAGE="https://plex.tv/" -DOWNLOAD="https://downloads.plex.tv/plex-media-server-new/1.18.9.2578-513b381af/debian/plexmediaserver_1.18.9.2578-513b381af_i386.deb" -MD5SUM="a134d7398e8cb43cb0ba5bd01317338b" -DOWNLOAD_x86_64="https://downloads.plex.tv/plex-media-server-new/1.18.9.2578-513b381af/debian/plexmediaserver_1.18.9.2578-513b381af_amd64.deb" -MD5SUM_x86_64="9cfed19fbff2c71b45bece6bc15ba679" +DOWNLOAD="https://downloads.plex.tv/plex-media-server-new/1.19.1.2630-72c16a276/debian/plexmediaserver_1.19.1.2630-72c16a276_i386.deb" +MD5SUM="84476c2a5a6fe27dd81eb864e9cca415" +DOWNLOAD_x86_64="https://downloads.plex.tv/plex-media-server-new/1.19.1.2630-72c16a276/debian/plexmediaserver_1.19.1.2630-72c16a276_amd64.deb" +MD5SUM_x86_64="3c171d5cf8fbc98e988e435141228c8d" REQUIRES="" -MAINTAINER="Kevin Matthew" -EMAIL="kevin@kevinmatthew.com" +MAINTAINER="Stu Miller" +EMAIL="slackbuilds@go4it2day.com" diff --git a/multimedia/plexmediaserver/rc.plexmediaserver b/multimedia/plexmediaserver/rc.plexmediaserver deleted file mode 100644 index 0ca0d327e4..0000000000 --- a/multimedia/plexmediaserver/rc.plexmediaserver +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh - -# Copyright 2016 Marcel Saegebarth -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -RUN_USER=plex - -plexmediaserver_start() { - PIDOF=$(pidof "Plex Media Server") - - if [ -z "$PIDOF" ]; then - echo "Starting plexmediaserver..." - /bin/su -s /bin/sh -l $RUN_USER -c '/usr/bin/start_pms &> /dev/null &' - else - echo "plexmediaserver is already active (PID: $PIDOF)." - exit 1 - fi -} - -plexmediaserver_stop() { - PIDOF=$(pidof "Plex Media Server") - # plugins may still running when stopping plexmediaserver on its startup - # process - PGREP_PLUGINS=$(pgrep -f "Plex Plug-in") - PGREP_DLNA=$(pgrep -f "Plex DLNA Server") - PGREP_TUNER=$(pgrep -f "Plex Tuner Service") - PGREP_EGP=$(pgrep -f "Plex EAE Service") - PGREP_TRANSCODER=$(pgrep -f "Plex Transcoder") - PGREP_PLEXRELAY=$(pgrep -f "Plex Relay") - - - if [ -z "$PIDOF" ] && [ -z "$PGREP_PLUGINS" ]; then - echo "plexmediaserver is not running..." - exit 1 - else - echo -n "Stopping plexmediaserver..." - - if [ -n "$PIDOF" ]; then - kill -9 $PIDOF - fi - - if [ -n "$PGREP_PLUGINS" ]; then - for i in "$PGREP_PLUGINS"; do - kill -9 $i - done - fi - - if [ -n "$PGREP_DLNA" ]; then - for i in "$PGREP_DLNA"; do - kill -9 $i - done - fi - - if [ -n "$PGREP_TUNER" ]; then - for i in "$PGREP_TUNER"; do - kill -9 $i - done - fi - - if [ -n "$PGREP_EGP" ]; then - for i in "$PGREP_EGP"; do - kill -9 $i - done - fi - - if [ -n "$PGREP_TRANSCODER" ]; then - for i in "$PGREP_TRANSCODER"; do - kill -9 $i - done - fi - - if [ -n "$PGREP_PLEXRELAY" ]; then - for i in "$PGREP_PLEXRELAY"; do - kill -9 $i - done - fi - - - - echo "done" - fi -} - -plexmediaserver_restart() { - plexmediaserver_stop - sleep 3 - plexmediaserver_start -} - -case "$1" in - start) plexmediaserver_start ;; - stop) plexmediaserver_stop ;; - restart) plexmediaserver_restart ;; - *) echo "USAGE: $0 start|stop|restart" - exit 1 ;; -esac -- cgit v1.2.3