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/emby-server/emby-server-3.0.5557.0.ebuild @ 90:e0f97106108d

updated mediabrowser ebuilds and added replacement ebuild for renamed version
author gsnerf <gsnerf@gsnerf.de>
date Sat, 21 Mar 2015 00:08:16 +0100
parents
children
comparison
equal deleted inserted replaced
89:94ac02a4bfc0 90:e0f97106108d
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="5"
6
7 inherit eutils user git-r3
8
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."
10 HOMEPAGE="http://emby.media/"
11 KEYWORDS="-* ~arm ~amd64 ~x86"
12 SRC_URI="https://github.com/MediaBrowser/MediaBrowser/archive/${PV}.tar.gz"
13 SLOT="0"
14 LICENSE="GPL-2"
15 IUSE=""
16 RESTRICT="mirror test"
17
18 RDEPEND=">=dev-lang/mono-3.2.7
19 >=media-video/ffmpeg-2[vpx]
20 >=media-libs/libmediainfo-0.7
21 media-gfx/imagemagick[jpeg,jpeg2k,webp,png]
22 !media-tv/mediabrowser-server"
23 DEPEND="app-arch/unzip ${RDEPEND}"
24
25 INSTALL_DIR="/opt/emby-server"
26 DATA_DIR="/usr/lib/emby-server"
27 STARTUP_LOG="/var/log/emby-server_start.log"
28 INIT_SCRIPT="${ROOT}/etc/init.d/emby-server"
29
30 # gentoo expects a specific subfolder in the working directory for the extracted source, so simply extracting won't work here
31 src_unpack() {
32 unpack ${A}
33 mv MediaBrowser-${PV} emby-server-${PV}
34 }
35
36
37 src_compile() {
38 einfo "updating root certificates for mono certificate store"
39 mozroots --import --sync
40 einfo "now actually compile"
41 xbuild /p:Configuration="Release Mono" /p:Platform="Any CPU" MediaBrowser.Mono.sln || die "building failed"
42 }
43
44 src_install() {
45 einfo "preparing startup scripts"
46 newinitd "${FILESDIR}"/initd_1 ${PN}
47 dodir /var/log/
48 touch ${D}${STARTUP_LOG}
49 chown emby:emby ${D}${STARTUP_LOG}
50
51 einfo "installing compiled files"
52 diropts -oemby -gemby
53 dodir ${INSTALL_DIR}
54 cp -R ${S}/MediaBrowser.Server.Mono/bin/Release\ Mono/* ${D}${INSTALL_DIR}/ || die "install failed, possibly compile did not succeed earlier?"
55 chown emby:emby -R ${D}${INSTALL_DIR}
56
57 # as we use the system libraries, we delete the local ones now as we couldn't do it before
58 rm -R ${D}${INSTALL_DIR}/libwebp
59 rm -R ${D}${INSTALL_DIR}/MediaInfo
60
61 einfo "prepare data directory"
62 dodir ${DATA_DIR}
63 }
64
65 pkg_setup() {
66 einfo "creating user for Emby"
67 enewgroup emby
68 enewuser emby -1 /bin/bash ${INSTALL_DIR} "emby" --system
69 }
70
71 pkg_prerm() {
72 einfo "Stopping running instances of Emby Server"
73 if [ -e "${INIT_SCRIPT}" ]; then
74 ${INIT_SCRIPT} stop
75 fi
76 }
77
78 pkg_postinst() {
79 einfo "emby-server was installed to ${INSTALL_DIR}, to start please use the init script provided."
80 einfo "All data generated and used by Emby can be found at ${DATA_DIR} after the first start."
81 einfo ""
82 ewarn "ATTENTION: If you moved from the former mediabrowser-server package don't forget to migrate"
83 ewarn "your original data directory before the first start! To do that move"
84 ewarn " /usr/lib/mediabrowser-server"
85 ewarn "to"
86 ewarn " /usr/lib/emby-server"
87 ewarn "and change owner status from mediabrowser:mediabrowser to emby:emby!"
88 ewarn " chown -R emby:emby /usr/lib/emby-server"
89 }