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-9999.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 c822d78a4b9e
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="-* ~9999"
12 EGIT_REPO_URI="https://github.com/MediaBrowser/MediaBrowser/"
13 EGIT_BRANCH="dev"
14 SLOT="0"
15 LICENSE="GPL-2"
16 IUSE=""
17 RESTRICT="mirror test"
18
19 RDEPEND=">=dev-lang/mono-3.2.7
20 >=media-video/ffmpeg-2[vpx]
21 >=media-libs/libmediainfo-0.7
22 media-gfx/imagemagick[jpeg,jpeg2k,webp,png]
23 !media-tv/mediabrowser-server"
24 DEPEND="app-arch/unzip ${RDEPEND}"
25
26 INSTALL_DIR="/opt/emby-server"
27 DATA_DIR="/usr/lib/emby-server"
28 STARTUP_LOG="/var/log/emby-server_start.log"
29 INIT_SCRIPT="${ROOT}/etc/init.d/emby-server"
30
31 src_compile() {
32 einfo "updating root certificates for mono certificate store"
33 mozroots --import --sync
34 einfo "now actually compile"
35 xbuild /p:Configuration="Release Mono" /p:Platform="Any CPU" MediaBrowser.Mono.sln || die "building failed"
36 }
37
38 src_install() {
39 einfo "preparing startup scripts"
40 newinitd "${FILESDIR}"/initd_1 ${PN}
41 dodir /var/log/
42 touch ${D}${STARTUP_LOG}
43 chown emby:emby ${D}${STARTUP_LOG}
44
45 einfo "installing compiled files"
46 diropts -oemby -gemby
47 dodir ${INSTALL_DIR}
48 cp -R ${S}/MediaBrowser.Server.Mono/bin/Release\ Mono/* ${D}${INSTALL_DIR}/ || die "install failed, possibly compile did not succeed earlier?"
49 chown emby:emby -R ${D}${INSTALL_DIR}
50
51 # as we use the system libraries, we delete the local ones now as we couldn't do it before
52 rm -R ${D}${INSTALL_DIR}/libwebp
53 rm -R ${D}${INSTALL_DIR}/MediaInfo
54
55 einfo "prepare data directory"
56 dodir ${DATA_DIR}
57 }
58
59 pkg_setup() {
60 einfo "creating user for Emby"
61 enewgroup emby
62 enewuser emby -1 /bin/bash ${INSTALL_DIR} "emby" --system
63 }
64
65 pkg_prerm() {
66 einfo "Stopping running instances of Emby Server"
67 if [ -e "${INIT_SCRIPT}" ]; then
68 ${INIT_SCRIPT} stop
69 fi
70 }
71
72 pkg_postinst() {
73 einfo "emby-server was installed to ${INSTALL_DIR}, to start please use the init script provided."
74 einfo "All data generated and used by Emby can be found at ${DATA_DIR} after the first start."
75 einfo ""
76 ewarn "ATTENTION: If you moved from the former mediabrowser-server package don't forget to migrate"
77 ewarn "your original data directory before the first start! To do that move"
78 ewarn " /usr/lib/mediabrowser-server"
79 ewarn "to"
80 ewarn " /usr/lib/emby-server"
81 ewarn "and change owner status from mediabrowser:mediabrowser to emby:emby!"
82 ewarn " chown -R emby:emby /usr/lib/emby-server"
83 }