We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

annotate media-tv/emby-server/emby-server-3.2.70.0-r1.ebuild @ 220:5fc6acd937e1

dev-vcs/kallithea: version bump to 0.3.6 (security update), masking <0.3.6
author Daniel Neugebauer <dneuge@energiequant.de>
date Sat, 29 Dec 2018 16:31:18 +0100
parents 68f19d4c4a2e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
218
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
1 # Copyright 1999-2015 Gentoo Foundation
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
3 # $Header: $
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
4
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
5 EAPI="5"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
6
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
7 inherit eutils user git-r3 dotnet
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
8
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
9 DESCRIPTION="Emby Server (formerly known as MediaBrowser Server) is a software that indexes a lot of different kinds of media and allows for them to be retrieved and played through the DLNA protocol on any device capable of processing them."
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
10 HOMEPAGE="http://emby.media/"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
11 KEYWORDS="-* ~arm ~amd64 ~x86"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
12 SRC_URI="https://github.com/MediaBrowser/Emby/archive/${PV}.tar.gz"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
13 SLOT="0"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
14 LICENSE="GPL-2"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
15 IUSE=""
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
16 RESTRICT="mirror test"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
17
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
18 RDEPEND=">=dev-lang/mono-4.6.0
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
19 >=media-video/ffmpeg-2[vpx]
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
20 media-gfx/imagemagick[jpeg,jpeg2k,webp,png]
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
21 !media-tv/mediabrowser-server
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
22 >=dev-db/sqlite-3.0.0
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
23 dev-dotnet/referenceassemblies-pcl
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
24 app-misc/ca-certificates"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
25 DEPEND="app-arch/unzip ${RDEPEND}"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
26
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
27 INSTALL_DIR="/opt/emby-server"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
28 DATA_DIR="/var/lib/emby-server"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
29 STARTUP_LOG="/var/log/emby-server_start.log"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
30 INIT_SCRIPT="${ROOT}/etc/init.d/emby-server"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
31
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
32 # INSTALL
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
33 # #######################################################################################################
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
34
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
35 pkg_setup() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
36 einfo "creating user for Emby"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
37 enewgroup emby
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
38 enewuser emby -1 /bin/bash ${INSTALL_DIR} "emby"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
39
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
40 einfo "updating root certificates for mono certificate store"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
41 addwrite "/usr/share/.mono/keypairs"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
42 dotnet_pkg_setup
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
43 cert-sync /etc/ssl/certs/ca-certificates.crt
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
44 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
45
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
46 # gentoo expects a specific subfolder in the working directory for the extracted source, so simply extracting won't work here
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
47 src_unpack() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
48 unpack ${A}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
49 mv Emby-${PV} emby-server-${PV}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
50 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
51
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
52 src_prepare() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
53 # the user can define the quality of the imagemagic himself, here we try to figure out the correct files to use in our configuration
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
54 MAGICKWAND=$(ldconfig -p | grep MagickWand.*.so$ | cut -d" " -f4)
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
55 MAGICKWAND=${MAGICKWAND##*/}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
56 einfo "adapting to imagemagick library to: ${MAGICKWAND}"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
57 sed -i -e "s/\"libMagickWand-6.Q8.so\"/\"${MAGICKWAND}\"/" MediaBrowser.Server.Mono/ImageMagickSharp.dll.config || die "could not update libMagickWand reference!"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
58 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
59
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
60
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
61 src_compile() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
62 addpredict "/etc/mono/registry"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
63 xbuild /p:Configuration="Release Mono" /p:Platform="Any CPU" MediaBrowser.sln || die "building failed"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
64 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
65
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
66 src_install() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
67 einfo "preparing startup scripts"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
68 newinitd "${FILESDIR}"/emby-server.init_3 ${PN}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
69 newconfd "${FILESDIR}"/emby-server.conf ${PN}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
70
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
71 einfo "preparing startup log file"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
72 dodir /var/log/
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
73 touch ${D}${STARTUP_LOG}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
74 chown emby:emby ${D}${STARTUP_LOG}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
75
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
76 einfo "installing compiled files"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
77 diropts -oemby -gemby
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
78 dodir ${INSTALL_DIR}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
79 cp -R ${S}/MediaBrowser.Server.Mono/bin/Release/* ${D}${INSTALL_DIR}/ || die "install failed, possibly compile did not succeed earlier?"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
80 chown emby:emby -R ${D}${INSTALL_DIR}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
81
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
82 einfo "prepare data directory"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
83 dodir ${DATA_DIR}
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
84 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
85
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
86 pkg_postinst() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
87 einfo "emby-server was installed to ${INSTALL_DIR}, to start please use the init script provided."
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
88 einfo "All data generated and used by Emby can be found at ${DATA_DIR} after the first start."
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
89 einfo ""
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
90
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
91 if [[ -d "/usr/lib/mediabrowser-server" || -h "/usr/lib/mediabrowser-server" ]]; then
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
92 ewarn "ATTENTION: You seem to have moved from the former mediabrowser-server package:"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
93 ewarn "don't forget to migrate your original data directory before the first start!"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
94 ewarn "To do that move"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
95 ewarn " /usr/lib/mediabrowser-server"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
96 ewarn "to"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
97 ewarn " ${DATA_DIR}"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
98 ewarn "and change owner status from mediabrowser:mediabrowser to emby:emby!"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
99 ewarn " chown -R emby:emby ${DATA_DIR}"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
100 fi
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
101
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
102 if [[ -d "/usr/lib/emby-server" || -h "/usr/lib/emby-server" ]]; then
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
103 ewarn "ATTENTION: You seem to have existing program data at /usr/lib/emby-server!"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
104 ewarn "Please move that folder to ${DATA_DIR} before the first start and make sure the folder is owned by emby:emby"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
105 ewarn "The folder /usr/lib/emby-server will be repurposed in one of the next releases, so make sure to clean that directory up!"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
106 fi
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
107 }
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
108
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
109 # UNINSTALL
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
110 # #######################################################################################################
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
111
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
112 pkg_prerm() {
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
113 einfo "Stopping running instances of Emby Server"
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
114 if [ -e "${INIT_SCRIPT}" ]; then
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
115 ${INIT_SCRIPT} stop
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
116 fi
68f19d4c4a2e updated latest ebuild to work correctly with completely new mono install
gsnerf <gsnerf@gsnerf.de>
parents:
diff changeset
117 }