Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Nov 2014 19:18:27 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r373575 - in head/multimedia: plexmediaserver plexmediaserver-plexpass plexmediaserver-plexpass/files
Message-ID:  <201411281918.sASJIRpI076213@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Fri Nov 28 19:18:26 2014
New Revision: 373575
URL: https://svnweb.freebsd.org/changeset/ports/373575
QAT: https://qat.redports.org/buildarchive/r373575/

Log:
  Make plexmediaserver-plexpass a slave port to reduce duplicated efforts.
  
  While here fix a plist issue.

Added:
  head/multimedia/plexmediaserver-plexpass/files/pkg-message.in   (contents, props changed)
Deleted:
  head/multimedia/plexmediaserver-plexpass/pkg-descr
Modified:
  head/multimedia/plexmediaserver-plexpass/Makefile
  head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in
  head/multimedia/plexmediaserver-plexpass/pkg-plist
  head/multimedia/plexmediaserver/Makefile

Modified: head/multimedia/plexmediaserver-plexpass/Makefile
==============================================================================
--- head/multimedia/plexmediaserver-plexpass/Makefile	Fri Nov 28 18:32:39 2014	(r373574)
+++ head/multimedia/plexmediaserver-plexpass/Makefile	Fri Nov 28 19:18:26 2014	(r373575)
@@ -1,66 +1,21 @@
 # Created by: KalleDK <plexmaintainer@k-moeller.dk>
 # $FreeBSD$
 
-PORTNAME=	plexmediaserver
 PORTVERSION=	0.9.11.4.739
-CATEGORIES=	multimedia
-MASTER_SITES=	http://downloads.plexapp.com/plex-media-server/${PORTVERSION}-${PLEX_BUILD}/
+PORTREVISION=	1
 PKGNAMESUFFIX=	-plexpass
-DISTNAME=	PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}-freebsd-amd64
 
 MAINTAINER=	feld@FreeBSD.org
-COMMENT=	The Plex Media Server component
 
-USES=		tar:bzip2
 PLEX_BUILD=	a4e710f
-NO_BUILD=	yes
-WRKSRC=	${WRKDIR}/PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}
-BUNDLE_LIBS=	yes
 
-DATADIR=	${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
-
-USE_RC_SUBR=	plexmediaserver_plexpass
+USE_RC_SUBR=	${PORTNAME}_plexpass
 
-SUB_FILES=	plexmediaserver_plexpass
-SUB_LIST=	SUPPORT_PATH=${SUPPORT_PATH} SCRIPT_PATH="${SCRIPT_PATH}" USERS=${USERS} GROUPS=${GROUPS}
+MASTERDIR=${.CURDIR}/../plexmediaserver
 
-USERS=	plex
-GROUPS=	plex
-SUPPORT_PATH?=	${PREFIX}/plexdata${PKGNAMESUFFIX}
-SCRIPT_PATH?=	${DATADIR}
-
-ONLY_FOR_ARCHS=	amd64
-
-.include <bsd.port.pre.mk>
-
-.if ${OPSYS} == FreeBSD
-.if ${OSVERSION} < 900000
-IGNORE=	supplied binaries compiled for FreeBSD 9
-.endif
-
-.if ${OSVERSION} >= 1000054
-RUN_DEPENDS+=	${LOCALBASE}/lib/compat/libstdc++.so.6:${PORTSDIR}/misc/compat9x
-.endif
-.endif
-
-post-patch:
-	# binaries don't come pre-stripped
-	${FIND} ${WRKSRC} -name '*.so' -exec ${STRIP_CMD} {} \;
-	${STRIP_CMD} ${WRKSRC}/Resources/rsync ${WRKSRC}/Resources/Python/bin/python
-
-do-install:
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} Resources ${STAGEDIR}/${SCRIPT_PATH})
-	${INSTALL_PROGRAM} ${WRKSRC}/Plex\ DLNA\ Server ${STAGEDIR}/${SCRIPT_PATH}
-	${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Scanner ${STAGEDIR}/${SCRIPT_PATH}
-	${INSTALL_PROGRAM} ${WRKSRC}/Plex\ Media\ Server ${STAGEDIR}/${SCRIPT_PATH}
-	${INSTALL_LIB} ${WRKSRC}/lib* ${STAGEDIR}/${SCRIPT_PATH}
-	# Fix permissions to programs and db
-	@${CHMOD} a+x ${STAGEDIR}/${SCRIPT_PATH}/Resources/rsync
-	@${CHMOD} a+x ${STAGEDIR}/${SCRIPT_PATH}/Resources/Plex\ New\ Transcoder
-	@${CHMOD} a+x ${STAGEDIR}/${SCRIPT_PATH}/Resources/Plex\ Transcoder
-	@${CHMOD} a+x ${STAGEDIR}/${SCRIPT_PATH}/Resources/Python/bin/python
-	@${CHMOD} u+w ${STAGEDIR}/${SCRIPT_PATH}/Resources/com.plexapp.plugins.library.db
-	# Python fix
-	@${LN} -s ${SCRIPT_PATH}/libpython2.7.so.1 ${STAGEDIR}/${SCRIPT_PATH}/libpython2.7.so
+DISTINFO_FILE=	${.CURDIR}/distinfo
+PLIST=	${.CURDIR}/pkg-plist
+FILESDIR=	${.CURDIR}/files
+DATADIR=	${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
 
-.include <bsd.port.post.mk>
+.include "${MASTERDIR}/Makefile"

Added: head/multimedia/plexmediaserver-plexpass/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/plexmediaserver-plexpass/files/pkg-message.in	Fri Nov 28 19:18:26 2014	(r373575)
@@ -0,0 +1,18 @@
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+multimedia/%%PORTNAME%% includes an RC script:
+%%PREFIX%%/etc/rc.d/%%PORTNAME%%
+
+TO START PLEXMEDIASERVER ON BOOT:
+sysrc %%PORTNAME%%_enable=YES
+
+START MANUALLY:
+service %%PORTNAME%% start
+
+Once started, visit the following to configure:
+http://localhost:32400/web
+
+This is the PlexPass release channel of Plex. It is bleeding edge and
+new features may not function without an active PlexPass account.
+
+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Modified: head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in
==============================================================================
--- head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in	Fri Nov 28 18:32:39 2014	(r373574)
+++ head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in	Fri Nov 28 19:18:26 2014	(r373575)
@@ -3,50 +3,49 @@
 #
 # $FreeBSD$
 #
-# PROVIDE: plexmediaserver_plexpass
+# PROVIDE: %%PORTNAME%%
 # REQUIRE: LOGIN
 # KEYWORD: shutdown
 #
 # Add the following lines to /etc/rc.conf to enable the Plex Media Server:
 #
-# plexmediaserver_plexpass_enable="YES"
+# %%PORTNAME%%_enable="YES"
 #
-# plexmediaserver_plexpass_support_path="%%SUPPORT_PATH%%" # Plex data: logs, media metadata, settings, etc
+# %%PORTNAME%%_support_path="%%PREFIX%%/plexdata" # Plex data: logs, media metadata, settings, etc
 #
-# plexmediaserver_plexpass_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired
+# %%PORTNAME%%_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired
 #
-# plexmediaserver_plexpass_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases.
+# %%PORTNAME%%_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases.
 #
 
 . /etc/rc.subr
 
-name=plexmediaserver_plexpass
-rcvar=plexmediaserver_plexpass_enable
+name=%%PORTNAME%%
+rcvar=%%PORTNAME%%_enable
 load_rc_config $name
 
-: ${plexmediaserver_plexpass_enable:=NO}
-: ${plexmediaserver_plexpass_support_path="%%SUPPORT_PATH%%"}
-: ${plexmediaserver_plexpass_user="%%USERS%%"}
-: ${plexmediaserver_plexpass_group="%%GROUPS%%"}
-: ${plexmediaserver_plexpass_maxplugins=6}
-
-extra_commands=status
+: ${%%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}"
 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_plexpass_support_path}"
-	export HOME="${plexmediaserver_plexpass_support_path}/Plex Media Server"
-	export PYTHONHOME="%%SCRIPT_PATH%%/Resources/Python"
-	export SCRIPTPATH="%%SCRIPT_PATH%%"
+	export SUPPORT_PATH="${plexmediaserver_support_path}"
+	export HOME="${plexmediaserver_support_path}/Plex Media Server"
+	export PYTHONHOME="%%DATADIR%%/Resources/Python"
+	export SCRIPTPATH="%%DATADIR%%"
 	export LD_LIBRARY_PATH="${SCRIPTPATH}"
 	export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}"
-	export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${plexmediaserver_plexpass_maxplugins}
-	export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${plexmediaserver_plexpass_support_path}
+	export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${plexmediaserver_maxplugins}
+	export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${plexmediaserver_support_path}
 	export PLEX_MEDIA_SERVER_PIDFILE=${pidfile}
 	export PATH="${SCRIPTPATH}/Resources/Python/bin:${PATH}"
 	export LC_ALL="C"
@@ -54,51 +53,16 @@ plex_precmd()
 	ulimit -s 3000
 
 	if [ ! -d ${pidfile%/*} ]; then
-		install -d -o ${plexmediaserver_plexpass_user} ${pidfile%/*};
+		install -d -o ${plexmediaserver_user} ${pidfile%/*};
 	fi
 	
-	if [ ! -d "${plexmediaserver_plexpass_support_path}/Plex Media Server" ]; then
-		install -d -g ${plexmediaserver_plexpass_group} -o ${plexmediaserver_plexpass_user} "${plexmediaserver_plexpass_support_path}/Plex Media Server";
-	fi
-
-	if [ ${plexmediaserver_plexpass_tmp} ]; then 
-		export TMPDIR=${plexmediaserver_plexpass_tmp};
-		install -d -g ${plexmediaserver_plexpass_group} -o ${plexmediaserver_plexpass_user} "${plexmediaserver_plexpass_tmp}";
-	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_plexpass_user} -f '%%SCRIPT_PATH%%/Plex Media Server'
+	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_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}"
-		kill ${sig_stop} ${all_pids};
-		wait_for_pids ${all_pids};
-		rm ${pidfile}
-	else
-		echo "${name} is not running.";
-		exit 1;
+	
+	if [ ${plexmediaserver_tmp} ]; then 
+		export TMPDIR=${plexmediaserver_tmp};
+		install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_tmp}";
 	fi
 }
 

Modified: head/multimedia/plexmediaserver-plexpass/pkg-plist
==============================================================================
--- head/multimedia/plexmediaserver-plexpass/pkg-plist	Fri Nov 28 18:32:39 2014	(r373574)
+++ head/multimedia/plexmediaserver-plexpass/pkg-plist	Fri Nov 28 19:18:26 2014	(r373575)
@@ -1,6 +1,7 @@
 %%DATADIR%%/Plex DLNA Server
 %%DATADIR%%/Plex Media Scanner
 %%DATADIR%%/Plex Media Server
+%%DATADIR%%/Plex_Media_Server
 %%DATADIR%%/Resources/Graphics/DefaultAlbumCover.png
 %%DATADIR%%/Resources/Graphics/actor-icon.png
 %%DATADIR%%/Resources/Graphics/album-fanart.jpg
@@ -3030,3 +3031,24 @@
 %%DATADIR%%/libxslt.so.2
 %%DATADIR%%/libz.so.1
 %%DATADIR%%/libzen.so.0
+@dir %%DATADIR%%/Resources/English.lproj
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/bsddb
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/distutils
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/email/test
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/idlelib
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/lib-tk
+@dir %%DATADIR%%/Resources/Python/lib/python2.7/test
+@dir %%DATADIR%%/Resources/locale/ar/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/cs-CZ/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/da/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/de/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/en/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/es/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/fr/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/he/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/it/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/lt/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/nl/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/nl-BE/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/no/LC_MESSAGES
+@dir %%DATADIR%%/Resources/locale/pt-BR/LC_MESSAGES

Modified: head/multimedia/plexmediaserver/Makefile
==============================================================================
--- head/multimedia/plexmediaserver/Makefile	Fri Nov 28 18:32:39 2014	(r373574)
+++ head/multimedia/plexmediaserver/Makefile	Fri Nov 28 19:18:26 2014	(r373575)
@@ -3,19 +3,20 @@
 
 PORTNAME=	plexmediaserver
 PORTVERSION?=	0.9.11.4.739
+PORTREVISION?=	0
 CATEGORIES=	multimedia
 MASTER_SITES=	http://downloads.plexapp.com/plex-media-server/${PORTVERSION}-${PLEX_BUILD}/
 DISTNAME=	PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}-freebsd-${ARCH}
 
-MAINTAINER=	feld@FreeBSD.org
-COMMENT=	The Plex Media Server component
+MAINTAINER?=	feld@FreeBSD.org
+COMMENT=	Plex Media Server component
 
 USES=	tar:bzip2
 PLEX_BUILD?=	a4e710f
 NO_BUILD=	yes
 WRKSRC=	${WRKDIR}/PlexMediaServer-${PORTVERSION}-${PLEX_BUILD}
 
-USE_RC_SUBR=	${PORTNAME}
+USE_RC_SUBR?=	${PORTNAME}
 
 SUB_FILES=	pkg-message
 SUB_LIST=	PORTNAME=${PORTNAME} DATADIR=${DATADIR} USERS=${USERS} GROUPS=${GROUPS}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411281918.sASJIRpI076213>