Index: head/multimedia/plexmediaserver/Makefile =================================================================== --- head/multimedia/plexmediaserver/Makefile (revision 404947) +++ head/multimedia/plexmediaserver/Makefile (revision 404948) @@ -1,65 +1,65 @@ # Created by: KalleDK # $FreeBSD$ PORTNAME= plexmediaserver PORTVERSION?= 0.9.14.6.1620 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= multimedia MASTER_SITES= https://downloads.plexapp.com/plex-media-server/${PORTVERSION}-${PLEX_BUILD}/ \ https://nightlies.plexapp.com/directdl/plex-media-server/dist-ninja/${PORTVERSION}-${PLEX_BUILD}/ DISTNAME= PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}-freebsd-${ARCH} MAINTAINER?= feld@FreeBSD.org COMMENT= Plex Media Server component USES= cpe tar:bzip2 PLEX_BUILD?= e0b7243 NO_BUILD= yes WRKSRC= ${WRKDIR}/PlexMediaServer-${PORTVERSION}-${PLEX_BUILD} CPE_VENDOR= plex CPE_PRODUCT= plex_media_server CPE_VERSION= ${PORTVERSION:R} USE_RC_SUBR?= ${PORTNAME} SUB_FILES= pkg-message SUB_LIST?= PORTNAME=${PORTNAME} DATADIR=${DATADIR} USERS=${USERS} GROUPS=${GROUPS} PLIST_SUB+= PLEX_BUILD=${PLEX_BUILD} USERS= plex GROUPS= ${USERS} BUNDLE_LIBS= yes ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= binary-only program, source code not available .include .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000054 RUN_DEPENDS+= ${LOCALBASE}/lib/compat/libstdc++.so.6:${PORTSDIR}/misc/compat9x .endif post-patch: # binaries don't come pre-stripped ${FIND} ${WRKSRC}/Resources -name '*.so' -exec ${STRIP_CMD} {} \; ${STRIP_CMD} ${WRKSRC}/Resources/rsync ${WRKSRC}/Resources/Python/bin/python do-install: @(cd ${WRKSRC} && ${COPYTREE_SHARE} Resources ${STAGEDIR}/${DATADIR}) ${INSTALL_PROGRAM} ${WRKSRC}/Plex\ DLNA\ Server ${STAGEDIR}/${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Scanner ${STAGEDIR}/${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Server ${STAGEDIR}/${DATADIR} ${INSTALL_LIB} ${WRKSRC}/lib* ${STAGEDIR}/${DATADIR} # Fix permissions to programs and db @${CHMOD} a+x ${STAGEDIR}/${DATADIR}/Resources/rsync @${CHMOD} a+x ${STAGEDIR}/${DATADIR}/Resources/Plex\ New\ Transcoder @${CHMOD} a+x ${STAGEDIR}/${DATADIR}/Resources/Plex\ Transcoder @${CHMOD} a+x ${STAGEDIR}/${DATADIR}/Resources/Python/bin/python @${CHMOD} u+w ${STAGEDIR}/${DATADIR}/Resources/com.plexapp.plugins.library.db # Python fix @${LN} -s ${DATADIR}/libpython2.7.so.1 ${STAGEDIR}/${DATADIR}/libpython2.7.so # Workaround for space in binary name @${LN} -s ${DATADIR}/Plex\ Media\ Server ${STAGEDIR}${DATADIR}/Plex_Media_Server .include Index: head/multimedia/plexmediaserver/files/plexmediaserver.in =================================================================== --- head/multimedia/plexmediaserver/files/plexmediaserver.in (revision 404947) +++ head/multimedia/plexmediaserver/files/plexmediaserver.in (revision 404948) @@ -1,86 +1,86 @@ #!/bin/sh # Created by: KalleDK # # $FreeBSD$ # # PROVIDE: %%PORTNAME%% # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable the Plex Media Server: # # %%PORTNAME%%_enable="YES" # # %%PORTNAME%%_support_path="%%PREFIX%%/plexdata" # Plex data: logs, media metadata, settings, etc # # %%PORTNAME%%_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired # # %%PORTNAME%%_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases. # . /etc/rc.subr name=%%PORTNAME%% rcvar=%%PORTNAME%%_enable load_rc_config $name : ${%%PORTNAME%%_enable:=NO} : ${%%PORTNAME%%_support_path="%%PREFIX%%/plexdata"} : ${%%PORTNAME%%_user="%%USERS%%"} : ${%%PORTNAME%%_group="%%GROUPS%%"} : ${%%PORTNAME%%_maxplugins=6} command=/usr/sbin/daemon procname="%%DATADIR%%/Plex_Media_Server" command_args="-f ${procname}" pidfile=/var/run/plex/plex.pid start_precmd=plex_precmd stop_precmd=plex_stop_precmd stop_postcmd=plex_stop_postcmd plex_precmd() { export SUPPORT_PATH="${%%PORTNAME%%_support_path}" export HOME="${%%PORTNAME%%_support_path}/Plex Media Server" export PYTHONHOME="%%DATADIR%%/Resources/Python" export SCRIPTPATH="%%DATADIR%%" export LD_LIBRARY_PATH="%%PREFIX%%/lib/compat:${SCRIPTPATH}" export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}" export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${%%PORTNAME%%_maxplugins} export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${%%PORTNAME%%_support_path} export PLEX_MEDIA_SERVER_PIDFILE=${pidfile} export PATH="${SCRIPTPATH}/Resources/Python/bin:${PATH}" - export LC_ALL="C" - export LANG="C" + export LC_ALL="en_US.UTF-8" + export LANG="en_US.UTF-8" ulimit -s 3000 if [ ! -d ${pidfile%/*} ]; then install -d -o ${%%PORTNAME%%_user} ${pidfile%/*}; fi if [ ! -d "${%%PORTNAME%%_support_path}/Plex Media Server" ]; then install -d -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} "${%%PORTNAME%%_support_path}/Plex Media Server"; fi if [ ${%%PORTNAME%%_tmp} ]; then export TMPDIR=${%%PORTNAME%%_tmp}; install -d -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} "${%%PORTNAME%%_tmp}"; fi } plex_stop_precmd() { if [ -r ${pidfile} ]; then export _PLEXPID=$(check_pidfile ${pidfile} ${procname}) fi } plex_stop_postcmd() { _PLEX_CHILDREN=$(pgrep -g ${_PLEXPID}) echo "Cleaning up leftover child processes." kill $sig_stop ${_PLEX_CHILDREN} wait_for_pids ${_PLEX_CHILDREN} } run_rc_command "$1" Index: head/multimedia/plexmediaserver-plexpass/Makefile =================================================================== --- head/multimedia/plexmediaserver-plexpass/Makefile (revision 404947) +++ head/multimedia/plexmediaserver-plexpass/Makefile (revision 404948) @@ -1,24 +1,24 @@ # Created by: KalleDK # $FreeBSD$ PORTVERSION= 0.9.15.0.1621 -PORTREVISION= 0 +PORTREVISION= 1 PKGNAMESUFFIX= -plexpass MAINTAINER= feld@FreeBSD.org PLEX_BUILD= 344f193 USE_RC_SUBR= ${PORTNAME}_plexpass MASTERDIR=${.CURDIR}/../plexmediaserver DISTINFO_FILE= ${.CURDIR}/distinfo PLIST= ${.CURDIR}/pkg-plist FILESDIR= ${.CURDIR}/files DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX} SUB_LIST= PORTNAME=${PORTNAME}_plexpass DATADIR=${DATADIR} USERS=${USERS} GROUPS=${GROUPS} PLIST_SUB+= PLEX_BUILD=${PLEX_BUILD} .include "${MASTERDIR}/Makefile" Index: head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in =================================================================== --- head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in (revision 404947) +++ head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in (revision 404948) @@ -1,86 +1,86 @@ #!/bin/sh # Created by: KalleDK # # $FreeBSD$ # # PROVIDE: %%PORTNAME%% # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable the Plex Media Server: # # %%PORTNAME%%_enable="YES" # # %%PORTNAME%%_support_path="%%PREFIX%%/plexdata" # Plex data: logs, media metadata, settings, etc # # %%PORTNAME%%_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired # # %%PORTNAME%%_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases. # . /etc/rc.subr name=%%PORTNAME%% rcvar=%%PORTNAME%%_enable load_rc_config $name : ${%%PORTNAME%%_enable:=NO} : ${%%PORTNAME%%_support_path="%%PREFIX%%/plexdata-plexpass"} : ${%%PORTNAME%%_user="%%USERS%%"} : ${%%PORTNAME%%_group="%%GROUPS%%"} : ${%%PORTNAME%%_maxplugins=6} command=/usr/sbin/daemon procname="%%DATADIR%%/Plex_Media_Server" command_args="-f ${procname}" pidfile=/var/run/plex/plex.pid start_precmd=plex_precmd stop_precmd=plex_stop_precmd stop_postcmd=plex_stop_postcmd plex_precmd() { export SUPPORT_PATH="${%%PORTNAME%%_support_path}" export HOME="${%%PORTNAME%%_support_path}/Plex Media Server" export PYTHONHOME="%%DATADIR%%/Resources/Python" export SCRIPTPATH="%%DATADIR%%" export LD_LIBRARY_PATH="%%PREFIX%%/lib/compat:${SCRIPTPATH}" export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}" export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${%%PORTNAME%%_maxplugins} export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${%%PORTNAME%%_support_path} export PLEX_MEDIA_SERVER_PIDFILE=${pidfile} export PATH="${SCRIPTPATH}/Resources/Python/bin:${PATH}" - export LC_ALL="C" - export LANG="C" + export LC_ALL="en_US.UTF-8" + export LANG="en_US.UTF-8" ulimit -s 3000 if [ ! -d ${pidfile%/*} ]; then install -d -o ${%%PORTNAME%%_user} ${pidfile%/*}; fi if [ ! -d "${%%PORTNAME%%_support_path}/Plex Media Server" ]; then install -d -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} "${%%PORTNAME%%_support_path}/Plex Media Server"; fi if [ ${%%PORTNAME%%_tmp} ]; then export TMPDIR=${%%PORTNAME%%_tmp}; install -d -g ${%%PORTNAME%%_group} -o ${%%PORTNAME%%_user} "${%%PORTNAME%%_tmp}"; fi } plex_stop_precmd() { if [ -r ${pidfile} ]; then export _PLEXPID=$(check_pidfile ${pidfile} ${procname}) fi } plex_stop_postcmd() { _PLEX_CHILDREN=$(pgrep -g ${_PLEXPID}) echo "Cleaning up leftover child processes." kill $sig_stop ${_PLEX_CHILDREN} wait_for_pids ${_PLEX_CHILDREN} } run_rc_command "$1"