-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-tv/plex-media-server new ebuild version 1.23.1.4571
This package does bundle all deps, and it's not ported to py3 it can run standalone. Bug: https://bugs.gentoo.org/735396 Signed-off-by: Scott Martin <om@organizedmagnetism.com>
- Loading branch information
Showing
9 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DIST plexmediaserver_1.23.1.4571-6119e8eed_amd64.deb 81587156 BLAKE2B 009cb6c849ff13b7f4d5a1d079fc5761a1c16727133782d203b760db653d3e843abaf556e1829721db0c2caf78ba4321a83548d0d9a83e869688e54d585410af SHA512 7f59327fb091df4a45c401acb477344128c4330fde2bd7c45fd2d07078fc1f1f3d432055756c3bc354e35cfa47b42e0d01e7233cd8ddf67dd5e4f461934bee6c | ||
DIST plexmediaserver_1.23.1.4571-6119e8eed_i386.deb 74605040 BLAKE2B 8c0d6565fe5b4a1d0c7641a4ede7564d7e6b9d8a74ae40d8caba967156ab0d1a50e9bb80475cb270b23e656f22f15533c41da8e8a7c87c638b5e81ee29a8ba9d SHA512 69e5330f487d1d500380ded607ddaf9d5a586984839d87e9922e7355f307c5704eba0a3ed5308d627b64d7dee55f5d89869b7bc1080c32b841358b5ef312eabe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SEARCH_DIRS_MASK="/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Resources/Python/lib/python2.7/lib-dynload /usr/lib/plexmediaserver/Resources/Python/lib/python2.7/site-packages/lxml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Plex Media Server is now installed. Please check the configuration file. | ||
It can be found in /etc/plex/plexmediaserver to verify the default settings. | ||
To start the Plex Server, run 'rc-config start plex-media-server' | ||
You will then be able to access your library at http://localhost:32400/manage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Config file for /etc/init.d/plex-media-server | ||
|
||
PLEX_PIDFILE="/var/run/plex-media-server.pid" | ||
PLEX_OUTLOG="/var/log/pms/out.log" | ||
PLEX_ERRLOG="/var/log/pms/err.log" | ||
PLEX_USER="plex" | ||
PLEX_SCRIPT="/usr/sbin/start_pms" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/sbin/openrc-run | ||
|
||
start() { | ||
ebegin "Starting Plex Media Server" | ||
start-stop-daemon -S -m -p ${PLEX_PIDFILE} -1 ${PLEX_OUTLOG} -2 ${PLEX_ERRLOG} --quiet -u ${PLEX_USER} -N -5 -b --exec ${PLEX_SCRIPT} | ||
eend $? | ||
} | ||
|
||
stop() { | ||
ebegin "Stopping Plex Media Server" | ||
kill -- -`cat ${PLEX_PIDFILE}` | ||
|
||
# Remove stale pid file since this is a dirty solution | ||
rm ${PLEX_PIDFILE} | ||
eend $? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/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/default/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 LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}" | ||
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/default/plexmediaserver && . /etc/default/plexmediaserver | ||
|
||
# Silently support PLEX_USER if provided as override | ||
if [ "$PLEX_USER" != "" ]; then | ||
export PLEX_MEDIA_SERVER_USER="$PLEX_USER" | ||
fi | ||
|
||
# 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 | ||
|
||
# Add sleep - for those who launch with this script | ||
sleep 3 | ||
|
||
(cd /usr/lib/plexmediaserver; ./Plex\ Media\ Server) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person" proxied="yes"> | ||
<email>om@organizedmagnetism.com</email> | ||
<name>Scott Martin</name> | ||
</maintainer> | ||
<maintainer type="project" proxied="proxy"> | ||
<email>proxy-maint@gentoo.org</email> | ||
<name>Proxy Maintainers</name> | ||
</maintainer> | ||
<upstream> | ||
<changelog>http://forums.plex.tv/discussion/62832/plex-media-server#latest</changelog> | ||
<doc>https://support.plex.tv/hc/en-us/categories/200007268-Getting-Started</doc> | ||
</upstream> | ||
<use> | ||
<flag name="system-openssl">Use system copy of <pkg>dev-libs/openssl</pkg> instead of the bundled one. Unsupported upstream.</flag> | ||
</use> | ||
</pkgmetadata> |
76 changes: 76 additions & 0 deletions
76
media-tv/plex-media-server/plex-media-server-1.23.1.4571.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit readme.gentoo-r1 systemd unpacker | ||
|
||
MY_PV="${PV}-6119e8eed" | ||
MY_URI="https://downloads.plex.tv/plex-media-server-new" | ||
|
||
DESCRIPTION="Free media library that is intended for use with a plex client" | ||
HOMEPAGE="https://www.plex.tv/" | ||
SRC_URI=" | ||
amd64? ( ${MY_URI}/${MY_PV}/debian/plexmediaserver_${MY_PV}_amd64.deb ) | ||
x86? ( ${MY_URI}/${MY_PV}/debian/plexmediaserver_${MY_PV}_i386.deb )" | ||
S="${WORKDIR}" | ||
|
||
LICENSE="Plex" | ||
SLOT="0" | ||
KEYWORDS="-* ~amd64 ~x86" | ||
IUSE="system-openssl" | ||
RESTRICT="mirror bindist" | ||
|
||
DEPEND=" | ||
acct-group/plex | ||
acct-user/plex" | ||
RDEPEND=" | ||
${DEPEND} | ||
system-openssl? ( dev-libs/openssl:0/1.1 )" | ||
|
||
QA_PREBUILT="*" | ||
QA_MULTILIB_PATHS=( | ||
"usr/lib/plexmediaserver/lib/.*" | ||
"usr/lib/plexmediaserver/Resources/Python/lib/python2.7/.*" | ||
"usr/lib/plexmediaserver/Resources/Python/lib/python2.7/lib-dynload/_hashlib.so" | ||
) | ||
|
||
src_install() { | ||
# Remove Debian specific files | ||
rm -r "usr/share/doc" || die | ||
|
||
# Remove shipped openssl library | ||
if use system-openssl; then | ||
rm usr/lib/plexmediaserver/lib/libssl.so.1.1 || die | ||
fi | ||
|
||
# Add startup wrapper | ||
dosbin "${FILESDIR}/start_pms" | ||
|
||
# Copy main files over to image and preserve permissions so it is portable | ||
cp -rp usr/ "${ED}" || die | ||
|
||
# Make sure the logging directory is created | ||
keepdir /var/log/pms | ||
fowners plex:plex /var/log/pms | ||
|
||
keepdir /var/lib/plexmediaserver | ||
fowners plex:plex /var/lib/plexmediaserver | ||
|
||
newinitd "${FILESDIR}/${PN}.init.d" ${PN} | ||
newconfd "${FILESDIR}/${PN}.conf.d" ${PN} | ||
|
||
systemd_dounit "${ED}"/usr/lib/plexmediaserver/lib/plexmediaserver.service | ||
keepdir /var/lib/plexmediaserver | ||
|
||
# Adds the precompiled plex libraries to the revdep-rebuild's mask list | ||
# so it doesn't try to rebuild libraries that can't be rebuilt. | ||
insinto /etc/revdep-rebuild | ||
doins "${FILESDIR}"/80plexmediaserver | ||
|
||
readme.gentoo_create_doc | ||
} | ||
|
||
pkg_postinst() { | ||
readme.gentoo_print_elog | ||
} |