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