megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
comparison media-tv/plex-media-server/plex-media-server-0.9.3.5.ebuild @ 0:3d30b669f1d5
added ebuilds for plex-media-server
author | gsnerf <gsnerf@gsnerf.de> |
---|---|
date | Thu, 09 Feb 2012 02:55:54 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3d30b669f1d5 |
---|---|
1 # Copyright 1999-2011 Gentoo Foundation | |
2 # Distributed under the terms of the GNU General Public License v2 | |
3 # $Header: $ | |
4 | |
5 EAPI="2" | |
6 | |
7 inherit eutils | |
8 | |
9 DESCRIPTION="Plex Media Server is a free media library that is intended for use with a plex client available for OS X, iOS and Android systems. It is a standalone product which can be used in conjunction with every program, that knows the API. For managing the library a web based interface is provided." | |
10 HOMEPAGE="http://www.plexapp.com/" | |
11 KEYWORDS="-* ~x86 ~amd64" | |
12 SRC_URI="x86? ( http://www.plexapp.com/repo/pool/main/p/plexmediaserver/plexmediaserver_${PV}ubuntu1_i386.deb ) | |
13 amd64? ( http://www.plexapp.com/repo/pool/main/p/plexmediaserver/plexmediaserver_${PV}ubuntu1_amd64.deb )" | |
14 SLOT="0" | |
15 LICENSE="PMS-License" | |
16 IUSE="" | |
17 | |
18 RDEPEND="net-dns/avahi" | |
19 DEPEND="${RDEPEND}" | |
20 | |
21 INIT_SCRIPT="${ROOT}/etc/init/plexmediaserver" | |
22 | |
23 pkg_setup() { | |
24 enewgroup plex | |
25 enewuser plex -1 /bin/bash /var/lib/plexmediaserver "plex" --system | |
26 return | |
27 } | |
28 | |
29 src_unpack() { | |
30 ar x ${DISTDIR}/${A} | |
31 mkdir data | |
32 mkdir control | |
33 tar -xzf data.tar.gz -C data | |
34 tar -xzf control.tar.gz -C control | |
35 } | |
36 | |
37 src_prepare() { | |
38 # that is a debian file that does not exist in gentoo and therefore can't be handled through diff | |
39 rm data/etc/init.d/plexmediaserver | |
40 # now adapt the config and start scripts to work with gentoo | |
41 epatch "${FILESDIR}"/${PN}-startup_fix.patch | |
42 # as the patch doesn't seem to correctly set the permissions on new files do this now | |
43 chmod 755 data/etc/init.d/plex-media-server | |
44 } | |
45 | |
46 src_install () { | |
47 cp -R data/* ${D} | |
48 } | |
49 | |
50 pkg_preinst() { | |
51 einfo "Stopping running instances of Media Server" | |
52 if [ -e "${INIT_SCRIPT}" ]; then | |
53 ${INIT_SCRIPT} stop | |
54 fi | |
55 } | |
56 | |
57 pkg_prerm() { | |
58 einfo "Stopping running instances of Media Server" | |
59 if [ -e "${INIT_SCRIPT}" ]; then | |
60 ${INIT_SCRIPT} stop | |
61 fi | |
62 } |