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.15.2.ebuild @ 118:9d726bd603c0
updated plex and emby ebuilds
author | gsnerf <gsnerf@gsnerf.de> |
---|---|
date | Tue, 26 Jan 2016 20:59:48 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
117:28b49622ed7b | 118:9d726bd603c0 |
---|---|
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 user | |
8 | |
9 MAGIC="1663-7efd046" | |
10 # URI_PRE="http://plexapp.com/repo/pool/main/p/plexmediaserver/plexmediaserver_${PV}.${MAGIC}_" | |
11 # this does not seem to work atm(/anymore?) | |
12 URI_PRE="http://downloads.plexapp.com/plex-media-server/${PV}.${MAGIC}/plexmediaserver_${PV}.${MAGIC}_" | |
13 | |
14 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." | |
15 HOMEPAGE="http://www.plexapp.com/" | |
16 KEYWORDS="-* ~x86 ~amd64" | |
17 SRC_URI="x86? ( ${URI_PRE}i386.deb ) | |
18 amd64? ( ${URI_PRE}amd64.deb )" | |
19 SLOT="0" | |
20 LICENSE="PMS-License" | |
21 IUSE="" | |
22 RESTRICT="mirror" | |
23 | |
24 RDEPEND="net-dns/avahi" | |
25 DEPEND="${RDEPEND}" | |
26 | |
27 INIT_SCRIPT="${ROOT}/etc/init/plexmediaserver" | |
28 | |
29 pkg_setup() { | |
30 enewgroup plex | |
31 enewuser plex -1 /bin/bash /var/lib/plexmediaserver "plex" --system | |
32 } | |
33 | |
34 pkg_preinst() { | |
35 einfo "unpacking DEB File" | |
36 cd ${WORKDIR} | |
37 # ar x ${DISTDIR}/${A} | |
38 mkdir data | |
39 mkdir control | |
40 tar -xzf data.tar.gz -C data | |
41 tar -xzf control.tar.gz -C control | |
42 | |
43 einfo "updating init script" | |
44 # replace debian specific init scripts with gentoo specific ones | |
45 rm data/etc/init.d/plexmediaserver | |
46 rm -r data/etc/init | |
47 cp "${FILESDIR}"/pms_initd_1 data/etc/init.d/plex-media-server | |
48 chmod 755 data/etc/init.d/plex-media-server | |
49 | |
50 einfo "moving config files" | |
51 # move the config to the correct place | |
52 mkdir data/etc/plex | |
53 mv data/etc/default/plexmediaserver data/etc/plex/plexmediaserver.conf | |
54 rmdir data/etc/default | |
55 | |
56 einfo "cleaning apt config entry" | |
57 rm -r data/etc/apt | |
58 | |
59 einfo "patching startup" | |
60 # apply patch for start_pms to use the new config file | |
61 cd data/usr/sbin | |
62 epatch "${FILESDIR}"/start_pms_1.patch | |
63 cd ../../.. | |
64 # remove debian specific useless files | |
65 rm data/usr/share/doc/plexmediaserver/README.Debian | |
66 | |
67 # as the patch doesn't seem to correctly set the permissions on new files do this now | |
68 # now copy to image directory for actual installation | |
69 cp -R data/* ${D} | |
70 | |
71 einfo "preparing logging targets" | |
72 # make sure the logging directory is created | |
73 mkdir ${D}var | |
74 mkdir ${D}var/log | |
75 mkdir ${D}var/log/pms | |
76 chown plex:plex ${D}var/log/pms | |
77 | |
78 einfo "prepare default library destination" | |
79 # also make sure the default library folder is pre created with correct permissions | |
80 mkdir ${D}var/lib | |
81 mkdir ${D}var/lib/plexmediaserver | |
82 chown plex:plex ${D}var/lib/plexmediaserver | |
83 | |
84 einfo "Stopping running instances of Media Server" | |
85 if [ -e "${INIT_SCRIPT}" ]; then | |
86 ${INIT_SCRIPT} stop | |
87 fi | |
88 } | |
89 | |
90 pkg_prerm() { | |
91 einfo "Stopping running instances of Media Server" | |
92 if [ -e "${INIT_SCRIPT}" ]; then | |
93 ${INIT_SCRIPT} stop | |
94 fi | |
95 } | |
96 | |
97 pkg_postinst() { | |
98 einfo "" | |
99 elog "Plex Media Server is now fully installed. Please check the configuration file in /etc/plex if the defaults please your needs." | |
100 elog "To start please call '/etc/init.d/plex-media-server start'. You can manage your library afterwards by navigating to http://<ip>:32400/web/" | |
101 einfo "" | |
102 | |
103 ewarn "Please note, that the URL to the library management has changed from http://<ip>:32400/manage to http://<ip>:32400/web!" | |
104 ewarn "If the new management interface forces you to log into myPlex and afterwards gives you an error that you need to be a plex-pass subscriber please delete the folder WebClient.bundle inside the Plug-Ins folder found in your library!" | |
105 } |