diff options
author | 2020-04-13 07:18:57 +1200 | |
---|---|---|
committer | 2020-04-16 11:09:47 +0300 | |
commit | aa9875bc0ccf69e66a41249a507fff33ac84a368 (patch) | |
tree | c18deac92dba0dbc5e5fb07639ec47004e8010e9 /media-tv/plex-media-server/files | |
parent | dev-python/packaging: arm64 stable (bug #716404) (diff) | |
download | gentoo-aa9875bc0ccf69e66a41249a507fff33ac84a368.tar.gz gentoo-aa9875bc0ccf69e66a41249a507fff33ac84a368.tar.bz2 gentoo-aa9875bc0ccf69e66a41249a507fff33ac84a368.zip |
media-tv/plex-media-server: Bump to 1.19.1
This includes major changes, due to the removal of the start_pms script
in the upstream repository.
Changes shamelessly stolen from https://github.com/comio/plex-overlay
where possible.
Closes: https://bugs.gentoo.org/716858
Closes: https://bugs.gentoo.org/710110
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Stephen Shkardoon <ss23@ss23.geek.nz>
Closes: https://github.com/gentoo/gentoo/pull/15325
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-tv/plex-media-server/files')
-rw-r--r-- | media-tv/plex-media-server/files/etc-plexmediaserver | 23 | ||||
-rw-r--r-- | media-tv/plex-media-server/files/plexmediaserver.service.patch | 12 | ||||
-rw-r--r-- | media-tv/plex-media-server/files/start_pms | 50 |
3 files changed, 85 insertions, 0 deletions
diff --git a/media-tv/plex-media-server/files/etc-plexmediaserver b/media-tv/plex-media-server/files/etc-plexmediaserver new file mode 100644 index 000000000000..51709fc84999 --- /dev/null +++ b/media-tv/plex-media-server/files/etc-plexmediaserver @@ -0,0 +1,23 @@ +# default script for Plex Media Server + +# the number of plugins that can run at the same time +export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 + +# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE +export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000 + +# where the mediaserver should store the transcodes +export PLEX_MEDIA_SERVER_TMPDIR=/tmp + +# uncomment to set it to something else +# export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support" + +# the user that PMS should run as, defaults to 'plex' +# note that if you change this you might need to move +# the Application Support directory to not lose your +# media library (match what is in /etc/passwd) +export PLEX_MEDIA_SERVER_USER=plex + +# Uncomment this to use syslog for logging instead of +# sending logs to Plex Media Server.log +#export PLEX_MEDIA_SERVER_USE_SYSLOG=true diff --git a/media-tv/plex-media-server/files/plexmediaserver.service.patch b/media-tv/plex-media-server/files/plexmediaserver.service.patch new file mode 100644 index 000000000000..c45124029811 --- /dev/null +++ b/media-tv/plex-media-server/files/plexmediaserver.service.patch @@ -0,0 +1,12 @@ +--- ./usr/lib/plexmediaserver/lib/plexmediaserver.service.old 2020-01-29 08:50:39.856491924 +0100 ++++ ./usr/lib/plexmediaserver/lib/plexmediaserver.service 2020-01-29 08:51:49.068249688 +0100 +@@ -12,7 +12,8 @@ + export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )"; \ + export PLEX_MEDIA_SERVER_INFO_DEVICE="PC"; \ + export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"; \ +-export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(grep ^VERSION= /etc/os-release | awk -F= "{print \\$2}" | tr -d \\" )"; \ ++export GENTOO_PROFILE="`readlink /etc/portage/make.profile`"; \ ++export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$${GENTOO_PROFILE#.*/profiles/}"; \ + export LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib; \ + exec "/usr/lib/plexmediaserver/Plex Media Server"' + Type=simple diff --git a/media-tv/plex-media-server/files/start_pms b/media-tv/plex-media-server/files/start_pms new file mode 100644 index 000000000000..9735a9e8bd40 --- /dev/null +++ b/media-tv/plex-media-server/files/start_pms @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Plex Media Server - Manual start script. +# + +# Set Crash Reporting identification variables +export PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release|awk -F= '{print $2}'|tr -d \" )" +export PLEX_MEDIA_SERVER_INFO_DEVICE="PC" +export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)" +GENTOO_PROFILE="`readlink /etc/portage/make.profile`" +export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="${GENTOO_PROFILE#.*/profiles/}" + +# Change these parameters in /etc/plex/plexmediaserver +export PLEX_MEDIA_SERVER_USER=plex +export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6 +export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver +export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000 +export PLEX_MEDIA_SERVER_TMPDIR=/tmp +export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support" + +if [ -f /etc/default/locale ]; then + export LANG="$(cat /etc/default/locale|awk -F '=' '/LANG=/{print $2}'|sed 's/"//g')" + export LC_ALL="$LANG" +fi + +test -f /etc/plex/plexmediaserver && . /etc/plex/plexmediaserver + +# Silently support PLEX_USER if provided as override +if [ "$PLEX_USER" != "" ]; then + export PLEX_MEDIA_SERVER_USER="$PLEX_USER" +fi + +# Activate python virtualenv +. "${PLEX_MEDIA_SERVER_HOME}"/Resources/Python/bin/activate + +# Create AppSuppDir if not present +if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ]; then + mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" + if [ ! $? -eq 0 ]; then + echo "ERROR: Couldn't create $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR " + exit 1 + fi +fi + +export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}/lib":"${PLEX_MEDIA_SERVER_HOME}" +export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}" + +ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE + +(cd /usr/lib/plexmediaserver; exec ./Plex\ Media\ Server) |