summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Elsner <open@mindrunner.de>2013-01-21 19:56:52 +0100
committerLukas Elsner <open@mindrunner.de>2013-01-21 19:56:52 +0100
commit32f1e774cb037a5f18fbbe0c31399b22de130118 (patch)
treed9155ed1a65cdc3be16beeadcf79686e03f389a0 /media-tv
parentdebian style renaming (diff)
downloadluman-32f1e774cb037a5f18fbbe0c31399b22de130118.tar.gz
luman-32f1e774cb037a5f18fbbe0c31399b22de130118.tar.bz2
luman-32f1e774cb037a5f18fbbe0c31399b22de130118.zip
plex media server (no manifest)
Diffstat (limited to 'media-tv')
-rw-r--r--media-tv/plex-media-server/PMS-EULA/PMS-EULA45
-rw-r--r--media-tv/plex-media-server/files/pms_initd_124
-rw-r--r--media-tv/plex-media-server/files/start_pms_1.patch19
-rw-r--r--media-tv/plex-media-server/plex-media-server-0.9.7.11.ebuild81
4 files changed, 169 insertions, 0 deletions
diff --git a/media-tv/plex-media-server/PMS-EULA/PMS-EULA b/media-tv/plex-media-server/PMS-EULA/PMS-EULA
new file mode 100644
index 0000000..dbcc2e7
--- /dev/null
+++ b/media-tv/plex-media-server/PMS-EULA/PMS-EULA
@@ -0,0 +1,45 @@
+End User License Agreement—Plex Media Server
+
+BY ACCEPTING THE TERMS OF THIS END USER LICENSE AGREEMENT BY CLICKING THE “AGREE” BUTTON, YOU ("YOU") ARE UNCONDITIONALLY CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO THIS END USER LICENSE AGREEMENT ("AGREEMENT"). YOUR USE OF PLEX MEDIA SERVER (THE “SOFTWARE”) ALSO SHALL CONSTITUTE ASSENT TO THE TERMS OF THIS AGREEMENT. IF YOU DO NOT UNCONDITIONALLY AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, SELECT THE "DISAGREE" BUTTON AND YOU WILL NOT HAVE ANY RIGHT TO USE THE SOFTWARE. Acceptance by and the formation of this Agreement with Plex, Inc. ("Plex") is expressly conditioned upon Your assent to all of the terms and conditions of this Agreement, to the exclusion of all other terms; if these terms are considered an offer, acceptance is expressly limited to these terms.
+
+The Software includes certain executable modules that Plex has licensed from third party providers (“Third Party Components”) that may be subject to different end user license terms as specified in the license agreement(s) provided with such Third Party Components.
+
+1. License. Subject to your full compliance with all of the terms and conditions of this Agreement, Plex grants You a personal, nontransferable, nonsublicensable, nonexclusive license to use the software that accompanies this Agreement (the "Application"), the accompanying documentation, and any additional software that may be made available by Plex from time to time for use with the Application (collectively "Software") for Your personal use only, as supplied to You by Plex. Except as may be expressly permitted in a separate written agreement executed by You and an authorized representative of Plex, this Agreement only allows You to: (i) run the Software as received at the time of delivery; (ii) install the Software on a single machine or only for the number of users or core(s) as may be specified in a separate order form and paid for by You or Your company, employer, or principal; and (iii) use the Software in accordance with the accompanying documentation solely for legal purposes, but not for nuclear or aviation purposes, for controlling any apparatus, for any hazardous activity, or for treating the human body.
+
+2. Restrictions.
+
+A. You shall not, nor permit anyone else to, directly or indirectly: (i) copy, modify, or distribute the Software; (ii) reverse engineer, disassemble, decompile, or otherwise attempt to discover the source code or structure, sequence, and/or organization of all or any part of the Software (except that this restriction shall not apply to the limited extent restrictions on reverse engineering are prohibited by applicable local law); (iii) rent, lease, or use the Software for timesharing or service bureau purposes; (iv) develop any improvement, modification, or derivative works of the Software, or include any portion thereof in any other product, software, work, equipment, or item (except that You may customize and/or modify the Software only as set forth in the documentation or as authorized in any license agreement of Plex’s third party licensors and applicable to Third Party Components); or (v) allow the transfer, transmission, export, or re-export of the Software or any portion thereof or any technical data associated with any Software. For additional information about restrictions, see Section 8.
+
+B. You shall not incorporate the Software or any part thereof into any other product(s) or use the Software in any manner that would cause the Software to become subject to any “open source license” that would impose obligations on Plex’s use of the Software or impair any rights of Plex or third parties thereto. You shall maintain and shall not remove nor obscure any proprietary notices on the Software, and shall reproduce such notices exactly on all permitted copies of the Software. As between the parties and except as otherwise provided in any license agreement for Third Party Components, Plex shall own all title, ownership rights, and intellectual property rights in and to the Software, and any copies or derivative works thereof. You understand that Plex or its licensors may modify or discontinue offering the Software at any time. This Agreement does not give You any rights not expressly and unambiguously granted herein.
+
+C. You shall not make any use of data adapters or similar technologies used by or with the Software that are designed to receive and use data from Plex, its third party data providers, and its and their affiliates and third parties other than to receive and use such data in accordance with Your then-effective agreements with Plex, such third party data providers, and its and their affiliates and third parties including without limitation any data passing through the Software or otherwise effectively made available by any Software through an API, a download, a database, or the like. Data is provided by Plex or other third party data providers and may be delayed or unavailable as specified by Plex or such third party data providers. Plex does not verify any data and disclaims any obligation to do so. Plex, its third party data providers, and each of their affiliates and business partners: (i) expressly disclaim the availability, accuracy, adequacy, or completeness of any data or third party data provider, and (ii) shall not be liable for any errors, omissions, or other defects in, unavailability of, delays or interruptions in such data or third party data provider.
+
+3. Intellectual Property; Content. As a condition to Your use of the Software, You represent and warrant that You will not use the Software: (i) to infringe the intellectual property or proprietary rights, or rights of publicity or privacy, of any third party; (ii) to violate any applicable law, statute, ordinance, or regulation; (iii) to disseminate, transfer or store information or materials in any form or format ("Content") that are harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, or otherwise objectionable, or that otherwise violate any law or right of any third party; or (iv) to disseminate any software viruses or any other computer code, files, programs, or the like that may without limitation interrupt, destroy, or limit the functionality of any computer software or hardware or telecommunications equipment, violate the security of any computer network, or the like. You, not Plex, remain solely responsible for all Content that You import, publish, or otherwise disseminate using, or in connection with, the Software. You acknowledge that all Content that You access through use of the Software is accessed at Your own risk, and You will be solely responsible for any damage or liability to any party resulting from such access.
+
+4. Support. This Agreement does not entitle You to any support, upgrades, patches, enhancements, or fixes (collectively, "Support") for the Software. Any such Support for the Software that may be made available by Plex, in its sole discretion, shall be offered solely subject to a separate written agreement.
+
+5. Warranty Disclaimer.
+
+A. THE SOFTWARE IS PROVIDED "AS IS". PLEX MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND PLEX EXPRESSLY DISCLAIMS ALL WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. FURTHER, PLEX DOES NOT WARRANT AGAINST ERRORS, OMISSIONS, RESULTS OF USE, OR THAT THE SOFTWARE IS BUG FREE OR ERROR FREE OR THAT ITS USE WILL BE UNINTERRUPTED. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS AGREEMENT. ALL THE FOREGOING DISCLAIMERS ALSO APPLY IN FULL WITH RESPECT TO PLEX'S LICENSORS, SUPPLIERS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU.
+
+B. “Malware” means any known, discovered, envisioned, or invented, or any yet to be known, discovered, envisioned, or invented: (i) virus, Trojan horse, or any other harmful, harassing, or malicious software; or (ii) method, use, or means by which any software, firmware, equipment, device, communications medium, person, entity, or the like directly or indirectly engages in or is used for: (a) any unauthorized access; (b) any unauthorized communication; or (c) any cracks, hacks, exploits, or other activity, method, use, or means, that may cause harassment, harm, data loss, data theft, loss of communication, loss of privacy, or the like. You acknowledge that the Internet, dedicated lines, other forms of communication, or other means that You use to connect to the Software may not be secure and may be vulnerable to attack by third parties, and that it is possible to receive Malware by using the Internet, dedicated lines, other forms of communication, or other means.  In order to protect the Software, You shall regularly obtain, use, and update appropriate third party software or other means to protect Yourself from Malware and to detect and remove Malware that may be downloaded using the Internet, dedicated lines, other forms of communication, or other means.  Plex does not warrant that the Software will be free of Malware that is introduced by third parties, the Internet, dedicated lines, other forms of communication, or other means.
+
+C. Plex and its licensors, suppliers, distributors, contractors, agents, and third party contributors do not warrant: (i) results of the use of any of the Software; (ii) that the Software is bug free or error free; (iii) or that use of the Software will be uninterrupted. You agree that Plex and its Affiliates are not responsible for any fault, inaccuracy, error, omission, delay or any other failure of Your equipment and/or services caused by Plex’s hardware, software, cabling, network services, or the like, or arising from Plex’s use of such equipment and/or services.
+
+6. Limitation of Remedies and Damages. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHERWISE, SHALL PLEX BE LIABLE TO YOU OR ANY OTHER PERSON OR ENTITY: (I) FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, ACCURACY OF RESULTS, COMPUTER FAILURE OR MALFUNCTION, LOSS OF DATA, OR OTHER DAMAGES RESULTING FROM YOUR USE OF THE SOFTWARE; OR (II) FOR ANY MATTER BEYOND ITS REASONABLE CONTROL. PLEX'S AGGREGATE LIABILITY FOR DAMAGES OF ANY KIND WHATSOEVER ARISING OUT OF THIS AGREEMENT SHALL BE LIMITED TO THE LESSER OF THE TOTAL FEES PAID BY YOU TO PLEX (IF ANY) FOR THE PORTION OF THE SOFTWARE THAT GAVE RISE TO SUCH DAMAGES OR $100 (U.S.), EXCEPT WHERE NOT PERMITTED BY APPLICABLE LAW, IN WHICH CASE PLEX'S LIABILITY SHALL BE LIMITED TO THE MINIMUM AMOUNT PERMITTED BY SUCH APPLICABLE LAW. ALL THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF EITHER PARTY HAS BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. ALL THE FOREGOING LIMITATIONS ALSO APPLY WITH RESPECT TO PLEX'S SUPPLIERS, LICENSORS, DISTRIBUTORS, CONTRACTORS, AGENTS, AND THIRD PARTY CONTRIBUTORS. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION AND EXCLUSION MAY NOT APPLY TO YOU.
+
+7. Indemnity. You agree that Plex and its licensors, distributors, contractors, agents, and third party contributors shall have no liability whatsoever for any use You make of the Software. You shall indemnify and hold harmless Plex and its licensors, suppliers, distributors, contractors, agents, and third party contributors from any claims, damages, liabilities, costs and fees (including reasonable attorney fees) arising from Your use of the Software as well as from Your failure to comply with any term of this Agreement, or any losses, damages, claims, costs, and/or attorneys’ fees of You arising from any use of or reliance upon any information received in connection with the Software that comprises or is based upon data provided by Plex or any third party.
+
+8. Additional Information About Restrictions.
+
+A. You may reverse engineer the Software solely for the purpose of debugging modifications made by You to certain Third Party Files in source code format that are licensed under the GNU Lesser General Public License (LGPL) or under the GNU General Public License version 2 (GPL2) and only provided that You have made, prior to any such reverse engineering permitted under this sentence, unsuccessful prior reasonable good faith efforts to debug such modifications using techniques other than the reverse engineering of the Software.
+
+B. Certain Third Party Files may be provided to You with the Software and licensed to You under additional terms set forth in license agreements of the third party authors of the Third Party Files and are available from Plex upon request. Certain Third Party Files modified by Plex are provided solely for use by You except for GPL2 files. You shall not distribute or convey the Software or distribute or convey any modified or unmodified Third Party Files to any other person or entity in any manner whatsoever, and You shall not cause the Software or any modified or unmodified Third Party Files to be made available for viewing, copying, or downloading or the like with the sole exception of GPL2 files. Plex hereby offers, for a period ending three (3) years from Your first acceptance of this Agreement, to transfer to You a copy of the complete corresponding machine-readable source code files for any LGPL or GPL2 Third Party Files that Plex supplies to You. Only GPL2 Third Party Files may be subsequently transferred by You to a third party.
+
+9. Termination. This Agreement shall continue until terminated as set forth in this section. You may terminate this Agreement at any time. Your rights under this Agreement will terminate automatically without notice from Plex if You fail to comply with any term(s) of this Agreement, including any attempt to transfer a copy of the Software to another party except as provided in this Agreement. Upon termination, the Agreement granted hereunder shall terminate and You shall immediately discontinue all use of the Software, but the terms of this Agreement will otherwise remain in effect.
+
+10. Export Law Assurances. In connection with the Software, You agree to comply with all export laws and restrictions and regulations of the Department of Commerce, the United States Department of the Treasury Office of Foreign Assets Control ("OFAC"), or other United States or foreign agency or authority, and You agree not to export, or allow the export or re-export of, the Software in violation of any such restrictions, laws or regulations. By using the Software, You agree to the foregoing and represent and warrant that You are not located in, under the control of, or a national or resident of, any restricted country.
+
+11. Government Users. If the user, purchaser, or licensee of any Software is an agency, department, contractor, or other entity of any government, the use, duplication, reproduction, release, modification, disclosure, and transfer of such Software, including technical data, software, and manuals, is restricted by the terms of this Agreement. All other use is prohibited. No rights other than those expressly provided in this Agreement are conferred. Software was developed fully at private expense.
+
+12. Miscellaneous. No agency, partnership, joint venture, or employment is created as a result of this Agreement and You do not have any authority of any kind to bind Plex in any respect whatsoever. The failure of either party to exercise in any respect any right provided for herein shall not be deemed a waiver of any further rights hereunder. If any provision of this Agreement is found to be unenforceable or invalid, that provision shall be limited or eliminated to the minimum extent necessary so that this Agreement shall otherwise remain in full force and effect and enforceable. This Agreement is not assignable, transferable, or sublicensable by You except with Plex's prior written consent. Plex may transfer, assign, or delegate this Agreement and its rights and obligations without consent. This Agreement shall be governed by and construed in accordance with the laws of the state of California, as if made within California between two residents thereof, and the parties submit to the exclusive jurisdiction of the Superior Court of Santa Clara County and the United States District Court for the Northern District of California. Notwithstanding the foregoing sentence, but without limiting Plex's right to seek injunctive or other equitable relief in any court of competent jurisdiction, any disputes arising with respect to this Agreement shall be referred to an arbitrator affiliated with the Judicial Arbitration and Mediation Services, Inc. ("JAMS"). The arbitrator shall be selected by joint agreement of the parties. In the event the parties cannot agree on an arbitrator within thirty (30) days of the initiating party providing the other party with written notice that it plans to seek arbitration, the parties shall each select an arbitrator affiliated with JAMS, which arbitrators shall jointly select a third such arbitrator to resolve the dispute. The written decision of the arbitrator shall be final and binding on the parties. The arbitration proceeding shall be carried on and heard in Santa Clara County, California using the English language and pursuant to the rules of (and administered by) JAMS. In any action or proceeding to enforce rights under this Agreement, the prevailing party will be entitled to recover costs and reasonable attorneys' fees from the other party. A separate written license agreement or order and signed by Plex and You or Your company, employer, or principal may state other terms and conditions that apply to You, including terms relating to price, payment, delivery, confidential information, support services, and the like. You are solely responsible to review such terms or conditions with Your company, employer or principal. In the event of any conflict in terms, the terms of the separate license agreement shall supersede the terms of this Agreement. Except as stated in the preceding three sentences, both parties agree that this Agreement is the complete and exclusive statement of the mutual understanding of the parties and supersedes and cancels all previous written and oral agreements, communications, and other understandings relating to the subject matter of this Agreement. Any modifications to this Agreement must be in a writing signed by authorized representatives of both parties and specifically referencing this paragraph of this Agreement. \ No newline at end of file
diff --git a/media-tv/plex-media-server/files/pms_initd_1 b/media-tv/plex-media-server/files/pms_initd_1
new file mode 100644
index 0000000..e2da23a
--- /dev/null
+++ b/media-tv/plex-media-server/files/pms_initd_1
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+
+depend() {
+ need avahi-daemon
+}
+
+start() {
+ ebegin "Starting Plex Media Server"
+ start-stop-daemon -S -m -p /var/run/plex-media-server.pid -1 /var/log/pms/out.log -2 /var/log/pms/err.log --quiet -u plex -N -5 -b --exec /usr/sbin/start_pms
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Plex Media Server"
+ # start-stop-daemon --stop --pidfile /var/run/plex-media-server.pid --quiet --exec /usr/sbin/start_pms
+ kill -- -`cat /var/run/plex-media-server.pid`
+ eend $?
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}
diff --git a/media-tv/plex-media-server/files/start_pms_1.patch b/media-tv/plex-media-server/files/start_pms_1.patch
new file mode 100644
index 0000000..32cf035
--- /dev/null
+++ b/media-tv/plex-media-server/files/start_pms_1.patch
@@ -0,0 +1,19 @@
+*** start_pms_old 2012-06-30 12:06:14.000000000 +0200
+--- start_pms 2012-06-30 12:08:33.000000000 +0200
+***************
+*** 7,13 ****
+ export PLEX_MEDIA_SERVER_TMPDIR=/tmp
+ export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
+
+! test -f /etc/default/plexmediaserver && . /etc/default/plexmediaserver
+
+ export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}"
+ export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
+--- 7,13 ----
+ export PLEX_MEDIA_SERVER_TMPDIR=/tmp
+ export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
+
+! test -f /etc/plex/plexmediaserver.conf && . /etc/plex/plexmediaserver.conf
+
+ export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}"
+ export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
diff --git a/media-tv/plex-media-server/plex-media-server-0.9.7.11.ebuild b/media-tv/plex-media-server/plex-media-server-0.9.7.11.ebuild
new file mode 100644
index 0000000..8f103f2
--- /dev/null
+++ b/media-tv/plex-media-server/plex-media-server-0.9.7.11.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils
+
+
+MAGIC="386-d353989"
+DESCRIPTION="Plex Media Server is a free media library for use with clients available for OS X, iOS and Android."
+HOMEPAGE="http://www.plexapp.com/"
+KEYWORDS="-* ~x86 ~amd64"
+SRC_URI="x86? ( http://www.plexapp.com/repo/pool/main/p/plexmediaserver/plexmediaserver_${PV}.${MAGIC}_i386.deb )
+ amd64? ( http://www.plexapp.com/repo/pool/main/p/plexmediaserver/plexmediaserver_${PV}.${MAGIC}_amd64.deb )"
+SLOT="0"
+LICENSE="PMS-License"
+IUSE=""
+
+RDEPEND="net-dns/avahi"
+DEPEND="${RDEPEND}"
+
+INIT_SCRIPT="${ROOT}/etc/init/plexmediaserver"
+
+pkg_setup() {
+ enewgroup plex
+ enewuser plex -1 /bin/bash /var/lib/plexmediaserver "plex" --system
+}
+
+pkg_preinst() {
+ einfo "Unpacking DEB File"
+ cd "${WORKDIR}"
+ ar x "${DISTDIR}/${A}"
+ mkdir data
+ mkdir control
+ tar -xzf data.tar.gz -C data
+ tar -xzf control.tar.gz -C control
+
+ einfo "Preparing files for installation"
+ # replace debian specific init scripts with gentoo specific ones
+ rm data/etc/init.d/plexmediaserver
+ rm -r data/etc/init
+ cp "${FILESDIR}"/pms_initd_1 data/etc/init.d/plex-media-server
+ chmod 755 data/etc/init.d/plex-media-server
+ # move the config to the correct place
+ mkdir data/etc/plex
+ mv data/etc/default/plexmediaserver data/etc/plex/plexmediaserver.conf
+ rmdir data/etc/default
+ # apply patch for start_pms to use the new config file
+ cd data/usr/sbin
+ epatch "${FILESDIR}"/start_pms_1.patch
+ cd ../../..
+ # remove debian specific useless files
+ rm data/usr/share/doc/plexmediaserver/README.Debian
+ # as the patch doesn't seem to correctly set the permissions on new files do this now
+ # now copy to image directory for actual installation
+ cp -R data/* "${D}"
+
+ # make sure the logging directory is created
+ mkdir "${D}"var
+ mkdir "${D}"var/log
+ mkdir "${D}"var/log/pms
+ chown plex:plex "${D}"var/log/pms
+
+ # also make sure the default library folder is pre created with correct permissions
+ mkdir "${D}"var/lib
+ mkdir "${D}"var/lib/plexmediaserver
+ chown plex:plex "${D}"var/lib/plexmediaserver
+
+ einfo "Stopping running instances of Media Server"
+ if [ -e "${INIT_SCRIPT}" ]; then
+ ${INIT_SCRIPT} stop
+ fi
+}
+
+pkg_prerm() {
+ einfo "Stopping running instances of Media Server"
+ if [ -e "${INIT_SCRIPT}" ]; then
+ ${INIT_SCRIPT} stop
+ fi
+}