mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Add plexmediaserver 0.9.8.4.125, the Plex Media Server component.
PR: ports/180249 Submitted by: KalleDK <plexmaintainer@k-moeller.dk> Approved by: swills (mentor)
This commit is contained in:
parent
8dad23a925
commit
ebcda92ad8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324374
@ -268,6 +268,7 @@
|
||||
SUBDIR += photofilmstrip
|
||||
SUBDIR += pitivi
|
||||
SUBDIR += playd
|
||||
SUBDIR += plexmediaserver
|
||||
SUBDIR += podcastdl
|
||||
SUBDIR += podcatcher
|
||||
SUBDIR += poe
|
||||
|
52
multimedia/plexmediaserver/Makefile
Normal file
52
multimedia/plexmediaserver/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
# Created by: KalleDK <plexmaintainer@k-moeller.dk>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= plexmediaserver
|
||||
PORTVERSION= 0.9.8.4.125
|
||||
CATEGORIES= multimedia
|
||||
MASTER_SITES= http://plex.r.worldssl.net/plex-media-server/${PORTVERSION}-${PLEX_BUILD}/
|
||||
DISTNAME= PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}-freebsd-amd64
|
||||
|
||||
MAINTAINER= plexmaintainer@k-moeller.dk
|
||||
COMMENT= The Plex Media Server component
|
||||
|
||||
USE_BZIP2= yes
|
||||
PLEX_BUILD= ffe2a5d
|
||||
NO_BUILD= yes
|
||||
WRKSRC= ${WRKDIR}/PlexMediaServer-${PORTVERSION}-ffe2a5d
|
||||
|
||||
USE_RC_SUBR= plexmediaserver
|
||||
|
||||
SUB_FILES= plexmediaserver
|
||||
SUB_LIST= SUPPORT_PATH=${SUPPORT_PATH} SCRIPT_PATH="${SCRIPT_PATH}" USERS=${USERS} GROUPS=${GROUPS}
|
||||
|
||||
USERS= plex
|
||||
GROUPS= plex
|
||||
SUPPORT_PATH?= ${PREFIX}/plexdata
|
||||
SCRIPT_PATH?= ${DATADIR}
|
||||
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 900000
|
||||
IGNORE= supplied binaries compiled for FreeBSD 9
|
||||
.endif
|
||||
|
||||
do-install:
|
||||
@(cd ${WRKSRC} && ${COPYTREE_SHARE} Resources ${SCRIPT_PATH})
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ DLNA\ Server ${SCRIPT_PATH}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Scanner ${SCRIPT_PATH}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Server ${SCRIPT_PATH}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/start.sh ${SCRIPT_PATH}
|
||||
${INSTALL_LIB} ${WRKSRC}/lib* ${SCRIPT_PATH}
|
||||
# Fix permissions to programs and db
|
||||
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/rsync
|
||||
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Plex\ New\ Transcoder
|
||||
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Plex\ Transcoder
|
||||
@${CHMOD} a+x ${SCRIPT_PATH}/Resources/Python/bin/python
|
||||
@${CHMOD} u+w ${SCRIPT_PATH}/Resources/com.plexapp.plugins.library.db
|
||||
# Python fix
|
||||
@${LN} -s ${SCRIPT_PATH}/libpython2.7.so.1 ${SCRIPT_PATH}/libpython2.7.so
|
||||
|
||||
.include <bsd.port.post.mk>
|
2
multimedia/plexmediaserver/distinfo
Normal file
2
multimedia/plexmediaserver/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (PlexMediaServer-0.9.8.4.125-ffe2a5d-freebsd-amd64.tar.bz2) = 68204dbf7ae862beb63df78d9a88900a42d971f661c0f0977f214222a0da1c5b
|
||||
SIZE (PlexMediaServer-0.9.8.4.125-ffe2a5d-freebsd-amd64.tar.bz2) = 61681183
|
99
multimedia/plexmediaserver/files/plexmediaserver.in
Normal file
99
multimedia/plexmediaserver/files/plexmediaserver.in
Normal file
@ -0,0 +1,99 @@
|
||||
#!/bin/sh
|
||||
# Created by: Created by: KalleDK <plexmaintainer@k-moeller.dk>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: plexmediaserver
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable the Plex Media Server:
|
||||
#
|
||||
# plexmediaserver_enable="YES"
|
||||
#
|
||||
# plexmediaserver_support_path="%%SUPPORT_PATH%%" # Plex data: logs, media metadata, settings, etc
|
||||
#
|
||||
# plexmediaserver_tmp="/tmp" # tmp directory used for the transcoding process
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=plexmediaserver
|
||||
rcvar=plexmediaserver_enable
|
||||
load_rc_config $name
|
||||
|
||||
: ${plexmediaserver_enable:=NO}
|
||||
: ${plexmediaserver_support_path="%%SUPPORT_PATH%%"}
|
||||
: ${plexmediaserver_user="%%USERS%%"}
|
||||
: ${plexmediaserver_group="%%GROUPS%%"}
|
||||
|
||||
extra_commands=status
|
||||
start_precmd=plex_precmd
|
||||
start_cmd=plex_startcmd
|
||||
status_cmd=plex_statuscmd
|
||||
stop_cmd=plex_stopcmd
|
||||
pidfile=/var/run/plex/plex.pid
|
||||
|
||||
plex_precmd()
|
||||
{
|
||||
export SUPPORT_PATH="${plexmediaserver_support_path}"
|
||||
export HOME="${plexmediaserver_support_path}/Plex Media Server"
|
||||
export PYTHONHOME="%%SCRIPT_PATH%%/Resources/Python"
|
||||
export SCRIPTPATH="%%SCRIPT_PATH%%"
|
||||
export LD_LIBRARY_PATH="${SCRIPTPATH}"
|
||||
export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}"
|
||||
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
|
||||
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${plexmediaserver_support_path}
|
||||
export PLEX_MEDIA_SERVER_PIDFILE=${pidfile}
|
||||
if ${plexmediaserver_tmp}; then export PLEX_MEDIA_SERVER_TMPDIR=${plexmediaserver_tmp}; fi
|
||||
export PATH="${SCRIPTPATH}/Resources/Python/bin:${PATH}"
|
||||
export LC_ALL="C"
|
||||
export LANG="C"
|
||||
ulimit -s 3000
|
||||
|
||||
if [ ! -d ${pidfile%/*} ]; then
|
||||
install -d -o ${plexmediaserver_user} ${pidfile%/*};
|
||||
fi
|
||||
|
||||
if [ ! -d "${plexmediaserver_support_path}/Plex Media Server" ]; then
|
||||
install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_support_path}/Plex Media Server";
|
||||
fi
|
||||
}
|
||||
|
||||
plex_startcmd()
|
||||
{
|
||||
if [ -f "${pidfile}" ] && (pgrep -F ${pidfile} Plex >/dev/null); then
|
||||
echo "${name} is already running with pid: $(cat ${pidfile})";
|
||||
else
|
||||
echo "Starting ${name}."
|
||||
/usr/sbin/daemon -u ${plexmediaserver_user} -f '%%SCRIPT_PATH%%/Plex Media Server'
|
||||
fi
|
||||
}
|
||||
|
||||
plex_statuscmd()
|
||||
{
|
||||
if [ -f "${pidfile}" ] && (pgrep -F ${pidfile} Plex >/dev/null); then
|
||||
echo "${name} is running with pid: $(cat ${pidfile})";
|
||||
else
|
||||
echo "${name} is not running.";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
plex_stopcmd()
|
||||
{
|
||||
if [ -f "${pidfile}" ] && (pgrep -F ${pidfile} Plex >/dev/null); then
|
||||
main_pid=$(cat ${pidfile});
|
||||
child_pids=$(pgrep -P ${main_pid});
|
||||
all_pids="${main_pid} ${child_pids}"
|
||||
sig_stop=-QUIT;
|
||||
kill ${sig_stop} ${all_pids};
|
||||
wait_for_pids ${all_pids};
|
||||
rm ${pidfile}
|
||||
else
|
||||
echo "${name} is not running.";
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
8
multimedia/plexmediaserver/pkg-descr
Normal file
8
multimedia/plexmediaserver/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
Plex Media Server is used to host the content and plugins that are then
|
||||
streamed to Plex Media Center and Plex mobile app clients, either on the
|
||||
same machine, the same local area network, or over the Internet. Content
|
||||
may be transcoded by the server before it's streamed in order to reduce
|
||||
bandwidth requirements, or for compatibility with the device being
|
||||
streamed to.
|
||||
|
||||
WWW: http://plexapp.com
|
3798
multimedia/plexmediaserver/pkg-plist
Normal file
3798
multimedia/plexmediaserver/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user