1 |
commit: 3f9666d4a6bf1cd45d48a694e439802e63a4600f |
2 |
Author: Stephen Shkardoon <ss23 <AT> ss23 <DOT> geek <DOT> nz> |
3 |
AuthorDate: Sat Dec 14 08:23:35 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 14 08:24:29 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f9666d4 |
7 |
|
8 |
media-tv/plex-media-server: 1.61.4 bump |
9 |
|
10 |
Closes: https://bugs.gentoo.org/681858 |
11 |
Signed-off-by: Stephen Shkardoon <ss23 <AT> ss23.geek.nz> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/13935 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
media-tv/plex-media-server/Manifest | 1 + |
16 |
.../files/virtualenv_start_pms_2019.patch | 12 ++ |
17 |
media-tv/plex-media-server/metadata.xml | 8 +- |
18 |
.../plex-media-server-1.16.4.ebuild | 121 +++++++++++++++++++++ |
19 |
4 files changed, 140 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/media-tv/plex-media-server/Manifest b/media-tv/plex-media-server/Manifest |
22 |
index 7fea2adddd2..e1b06077fe6 100644 |
23 |
--- a/media-tv/plex-media-server/Manifest |
24 |
+++ b/media-tv/plex-media-server/Manifest |
25 |
@@ -2,3 +2,4 @@ DIST plexmediaserver_1.11.3.4803-c40bba82e_amd64.deb 108830880 BLAKE2B 7ed912756 |
26 |
DIST plexmediaserver_1.12.3.4973-215c28d86_amd64.deb 109277946 BLAKE2B 6a868943c77a1355dd0a4dbe88323b937d827dbfe84e729cf1f5c5c7d4a7d44e9af7e69121a7e3cf9f5d60786c9877bd3e303d9d5d301c86f08984afb1062730 SHA512 1befe9196926bf4cabd1f9c746e958efc72392479a844f8c3d9161282618fe28e29dbb9c12ddccf5db5b852ae58cd43dc0d988f00732431e16106021c8618347 |
27 |
DIST plexmediaserver_1.13.2.5154-fd05be322_amd64.deb 111093662 BLAKE2B 26b1161107a8f9223f7065ff4119a32470c06794a159a42181b9278107a6d14f9fbb582e515223aaa659e9007d9b18299cd65b2a068e1d7dd934d52552a44cd1 SHA512 548c033272d56f6c54ab073536327b285fdbda3192c203a3ea3ff2b6c7afbc79ba7d56d7251f623ca1e09db572c92000d7baa7a8a555d853d85fdb9d1dfb8479 |
28 |
DIST plexmediaserver_1.14.1.5488-cc260c476_amd64.deb 105175642 BLAKE2B 59f7cc130115ae2179bcf0ddf5ef4583886c11447c423ada2b1da62f83c3840c89aa2b6d9c56e3a358d1da03bc9a6bd340cae7fee1b6da102e9bc785de4f8e27 SHA512 48f25ac27a8dc5d1a4ae74a04793994bb21431ed3069a9808373e0c5a424fd53f577d0912e1e46a155133b094bdafb7edeb5b6c9ef428a08e07e24e055267e86 |
29 |
+DIST plexmediaserver_1.16.4.1469-6d5612c2f_amd64.deb 74427444 BLAKE2B f90973aaadaf8e11fbcaa0aaa817a11b62049b1eaa22c04daf65d4fc21e73eb90d982e3faa66b482fdb4e7b53467246e20845c432920718334c5419c760e85bd SHA512 0753e82d4cd2c5a35f8f62329c3013eff297edd1bf9afcfd1444c3f3f85d33b3aec4a553c70931182d3a45df44dd26ce10ddbee9b59755914c988f0edbe5aa70 |
30 |
|
31 |
diff --git a/media-tv/plex-media-server/files/virtualenv_start_pms_2019.patch b/media-tv/plex-media-server/files/virtualenv_start_pms_2019.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..c68178bcb1c |
34 |
--- /dev/null |
35 |
+++ b/media-tv/plex-media-server/files/virtualenv_start_pms_2019.patch |
36 |
@@ -0,0 +1,12 @@ |
37 |
+--- a/usr/sbin/start_pms 2019-08-08 01:07:58.239646635 +0200 |
38 |
++++ b/usr/sbin/start_pms 2019-08-08 01:09:39.828649755 +0200 |
39 |
+@@ -20,6 +20,9 @@ |
40 |
+ |
41 |
+ test -f /etc/default/plexmediaserver && . /etc/default/plexmediaserver |
42 |
+ |
43 |
++# Activate python virtualenv |
44 |
++. "${PLEX_MEDIA_SERVER_HOME}"/Resources/Python/bin/activate |
45 |
++ |
46 |
+ if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ] |
47 |
+ then |
48 |
+ mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" |
49 |
|
50 |
diff --git a/media-tv/plex-media-server/metadata.xml b/media-tv/plex-media-server/metadata.xml |
51 |
index 1a06e96ebdc..8815e575c0e 100644 |
52 |
--- a/media-tv/plex-media-server/metadata.xml |
53 |
+++ b/media-tv/plex-media-server/metadata.xml |
54 |
@@ -2,7 +2,11 @@ |
55 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
56 |
<pkgmetadata> |
57 |
<maintainer type="person"> |
58 |
- <email>chainsaw@g.o</email> |
59 |
- <name>Tony Vroon</name> |
60 |
+ <email>ss23@×××××××××.nz</email> |
61 |
+ <name>Stephen Shkardoon</name> |
62 |
+ </maintainer> |
63 |
+ <maintainer type="project"> |
64 |
+ <email>proxy-maint@g.o</email> |
65 |
+ <name>Proxy Maintainers</name> |
66 |
</maintainer> |
67 |
</pkgmetadata> |
68 |
|
69 |
diff --git a/media-tv/plex-media-server/plex-media-server-1.16.4.ebuild b/media-tv/plex-media-server/plex-media-server-1.16.4.ebuild |
70 |
new file mode 100644 |
71 |
index 00000000000..69d4dccad28 |
72 |
--- /dev/null |
73 |
+++ b/media-tv/plex-media-server/plex-media-server-1.16.4.ebuild |
74 |
@@ -0,0 +1,121 @@ |
75 |
+# Copyright 1999-2019 Gentoo Authors |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+ |
78 |
+EAPI=7 |
79 |
+ |
80 |
+PYTHON_COMPAT=( python2_7 ) |
81 |
+inherit eutils systemd unpacker pax-utils python-single-r1 |
82 |
+ |
83 |
+MINOR_VERSION="1469-6d5612c2f" |
84 |
+ |
85 |
+_APPNAME="plexmediaserver" |
86 |
+_USERNAME="plex" |
87 |
+_SHORTNAME="${_USERNAME}" |
88 |
+_FULL_VERSION="${PV}.${MINOR_VERSION}" |
89 |
+ |
90 |
+URI="https://downloads.plex.tv/plex-media-server-new" |
91 |
+ |
92 |
+DESCRIPTION="A free media library that is intended for use with a plex client" |
93 |
+HOMEPAGE="https://www.plex.tv/" |
94 |
+SRC_URI="amd64? ( ${URI}/${_FULL_VERSION}/debian/plexmediaserver_${_FULL_VERSION}_amd64.deb )" |
95 |
+SLOT="0" |
96 |
+LICENSE="Plex" |
97 |
+RESTRICT="bindist strip" |
98 |
+KEYWORDS="-* ~amd64" |
99 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
100 |
+ |
101 |
+DEPEND="dev-python/virtualenv[${PYTHON_USEDEP}]" |
102 |
+ |
103 |
+RDEPEND=" |
104 |
+ net-dns/avahi |
105 |
+ acct-user/plex |
106 |
+ acct-group/plex |
107 |
+ ${PYTHON_DEPS}" |
108 |
+ |
109 |
+QA_DESKTOP_FILE="usr/share/applications/plexmediamanager.desktop" |
110 |
+QA_PREBUILT="*" |
111 |
+QA_MULTILIB_PATHS=( |
112 |
+ "usr/lib/${_APPNAME}/.*" |
113 |
+ "usr/lib/${_APPNAME}/Resources/Python/lib/python2.7/.*" |
114 |
+) |
115 |
+ |
116 |
+BINS_TO_PAX_MARK=( "${ED}/usr/lib/plexmediaserver/Plex Script Host" ) |
117 |
+ |
118 |
+S="${WORKDIR}" |
119 |
+PATCHES=( "${FILESDIR}/virtualenv_start_pms_2019.patch" ) |
120 |
+ |
121 |
+src_unpack() { |
122 |
+ unpack_deb ${A} |
123 |
+} |
124 |
+ |
125 |
+src_install() { |
126 |
+ # Move the config to the correct place |
127 |
+ local config_vanilla="/etc/default/plexmediaserver" |
128 |
+ local config_path="/etc/${_SHORTNAME}" |
129 |
+ dodir "${config_path}" |
130 |
+ insinto "${config_path}" |
131 |
+ doins "${config_vanilla#/}" |
132 |
+ sed -e "s#${config_vanilla}#${config_path}/${_APPNAME}#g" -i "${S}"/usr/sbin/start_pms || die |
133 |
+ |
134 |
+ # Remove Debian specific files |
135 |
+ rm -r "usr/share/doc" || die |
136 |
+ |
137 |
+ # Copy main files over to image and preserve permissions so it is portable |
138 |
+ cp -rp usr/ "${ED}"/ || die |
139 |
+ |
140 |
+ # Make sure the logging directory is created |
141 |
+ local logging_dir="/var/log/pms" |
142 |
+ dodir "${logging_dir}" |
143 |
+ fowners "${_USERNAME}":"${_USERNAME}" "${logging_dir}" |
144 |
+ keepdir "${logging_dir}" |
145 |
+ |
146 |
+ # Create default library folder with correct permissions |
147 |
+ local default_library_dir="/var/lib/${_APPNAME}" |
148 |
+ dodir "${default_library_dir}" |
149 |
+ fowners "${_USERNAME}":"${_USERNAME}" "${default_library_dir}" |
150 |
+ keepdir "${default_library_dir}" |
151 |
+ |
152 |
+ # Install the OpenRC init/conf files |
153 |
+ doinitd "${FILESDIR}/init.d/${PN}" |
154 |
+ doconfd "${FILESDIR}/conf.d/${PN}" |
155 |
+ |
156 |
+ # Mask Plex libraries so that revdep-rebuild doesn't try to rebuild them. |
157 |
+ # Plex has its own precompiled libraries. |
158 |
+ _mask_plex_libraries_revdep |
159 |
+ |
160 |
+ # Install systemd service file |
161 |
+ systemd_newunit "${FILESDIR}/systemd/${PN}.service" "${PN}.service" |
162 |
+ |
163 |
+ # Add pax markings to some binaries so that they work on hardened setup |
164 |
+ for f in "${BINS_TO_PAX_MARK[@]}"; do |
165 |
+ pax-mark m "${f}" |
166 |
+ done |
167 |
+ |
168 |
+ einfo "Configuring virtualenv" |
169 |
+ virtualenv -v --no-pip --no-setuptools --no-wheel "${ED}"/usr/lib/plexmediaserver/Resources/Python || die |
170 |
+ pushd "${ED}"/usr/lib/plexmediaserver/Resources/Python &>/dev/null || die |
171 |
+ find . -type f -exec sed -i -e "s#${D}##g" {} + || die |
172 |
+ popd &>/dev/null || die |
173 |
+} |
174 |
+ |
175 |
+pkg_postinst() { |
176 |
+ elog "Plex Media Server is now installed. Please check the configuration" |
177 |
+ elog "file in /etc/${_SHORTNAME}/${_APPNAME}" |
178 |
+ elog "to verify the default settings." |
179 |
+ elog "To start the Plex Server, run 'rc-config start plex-media-server'," |
180 |
+ elog "you will then be able to access your library at" |
181 |
+ elog "http://<ip>:32400/web/" |
182 |
+} |
183 |
+ |
184 |
+# Adds the precompiled plex libraries to the revdep-rebuild's mask list |
185 |
+# so it doesn't try to rebuild libraries that can't be rebuilt. |
186 |
+_mask_plex_libraries_revdep() { |
187 |
+ dodir /etc/revdep-rebuild/ |
188 |
+ |
189 |
+ # Bug: 659702. The upstream plex binary installs its precompiled package to /usr/lib. |
190 |
+ # Due to profile 17.1 splitting /usr/lib and /usr/lib64, we can no longer rely |
191 |
+ # on the implicit symlink automatically satisfying our revdep requirement when we use $(get_libdir). |
192 |
+ # Thus we will match upstream's directory automatically. If upstream switches their location, |
193 |
+ # then so should we. |
194 |
+ echo "SEARCH_DIRS_MASK=\"${EPREFIX}/usr/lib/plexmediaserver\"" > "${ED}"/etc/revdep-rebuild/80plexmediaserver |
195 |
+} |