1 1 1
default
Michalis Adamidis (gsnerf) - 7 days ago 2018-11-08 20:49:10
gsnerf@gsnerf.de
updated latest ebuild to work correctly with completely new mono install
3 files changed with 118 insertions and 117 deletions:
↑ Collapse Diff ↑
...
 
@@ -7,5 +7,5 @@ DIST 3.1.5.tar.gz 41451142 BLAKE2B 8cf36
7 7
 
DIST 3.2.70.0.tar.gz 69456965 BLAKE2B 5a177db3c0ebcb340e7fea276e277506f14dba4d0b28921a6ad1f7874de4e7d69d2ab9fb5e37f27043f26f7d382d2be7d402655517068e64612107c803db3c87 SHA512 ed7f6fd15a648575b110c76aa04ef1cb62144a5a0b4884f9f12d0e4382900159392a727efaa3d1275eb6b98f15f186efc169b878321ae328794f0b77f38b1073
8 8
 
EBUILD emby-server-3.0.8500.ebuild 3930 BLAKE2B a0f11601c99235d26203ac20c10045cb6eabd7f641b26f768ee192beffda5d013b6f303f3632a17bf4ec2235924b7c7251484fa0b394d7e79e78405bcc29ccdd SHA512 a70675b9944f382efe78a868c9bbb1bf761d6b05daf22d38373f3c294a37ada0fd7b2a0285c3e06a880abf7c807a195dea61fa4d0f7661aa3ce92d9ab00082af
9 9
 
EBUILD emby-server-3.1.5.ebuild 3966 BLAKE2B ed4c71642dd168d1e1215115a2e32bef38c9dd549c60cdf86c67115e9ef0dae912c85564df4b74aa652e32bf1e05ce4d0395e8a97395406129a45f5f185411bd SHA512 61c4c14d1f0cd5732ae14d3162bacf60510560ae678fc956b1eb8684ff5b9366ffe95f03d258f64e54b0af883a97aa59649b9be91dde08dcd8ec1654a78bad3f
10
 
EBUILD emby-server-3.2.70.0.ebuild 4183 BLAKE2B 66c98865b0afc86cdf24d0c904dfa9149e97b5d8f229f87929dd17dd299ec88bd39e141059e3c7863d07d9d4321ff90f84555a8c88c37f624a8b3726a959c47f SHA512 5d66a93f7be97e665cdb54337fbc8f97185ddd5eec01cc79c1a4041fccd7f8d6b9b5ba408b75c352b0cb204d00db16877f91034273f0298e8d2369e32ed60afb
10
 
EBUILD emby-server-3.2.70.0-r1.ebuild 4216 BLAKE2B bd714c808750642ce6f06295f929415b9725f6e873449755f95cd1077dc781a0011705a1ae071f83ca4a540a53a011e4e36865020e1c088ed85743f0daf2424d SHA512 aca53e5f77686807f2d7bef66a3fbcaddebb0a6c7d003ff243944b154d536f23446c1aba85273d4a071ba7db64bb1f664325fa73c7e0509acf392369bc66a0cf
11 11
 
EBUILD emby-server-9999.ebuild 3079 BLAKE2B b15ba2a9bcfbd0eb10640f89106eb931820b98d42ea2b7746d057d6bf06ef55e04dfc5cd721aab3965e3235076eb2a6c28d659d363d94166cdf383b978c71746 SHA512 1febd22bfe38090668cc391fbebee8cd5a71f9ec678a224a9ed0bf29f76a9940c3016b7d20b5209d9e8d871cdd185c0ab0f2642ce4653407497233f1e3b9207e
 
new file 100644
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 dotnet
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/Emby/archive/${PV}.tar.gz"
13
 
SLOT="0"
14
 
LICENSE="GPL-2"
15
 
IUSE=""
16
 
RESTRICT="mirror test"
17
 

	
18
 
RDEPEND=">=dev-lang/mono-4.6.0
19
 
	>=media-video/ffmpeg-2[vpx]
20
 
	media-gfx/imagemagick[jpeg,jpeg2k,webp,png]
21
 
	!media-tv/mediabrowser-server
22
 
	>=dev-db/sqlite-3.0.0
23
 
	dev-dotnet/referenceassemblies-pcl
24
 
	app-misc/ca-certificates"
25
 
DEPEND="app-arch/unzip ${RDEPEND}"
26
 

	
27
 
INSTALL_DIR="/opt/emby-server"
28
 
DATA_DIR="/var/lib/emby-server"
29
 
STARTUP_LOG="/var/log/emby-server_start.log"
30
 
INIT_SCRIPT="${ROOT}/etc/init.d/emby-server"
31
 

	
32
 
# INSTALL
33
 
# #######################################################################################################
34
 

	
35
 
pkg_setup() {
36
 
	einfo "creating user for Emby"
37
 
	enewgroup emby
38
 
	enewuser emby -1 /bin/bash ${INSTALL_DIR} "emby"
39
 

	
40
 
	einfo "updating root certificates for mono certificate store"
41
 
        addwrite "/usr/share/.mono/keypairs"
42
 
	dotnet_pkg_setup
43
 
        cert-sync /etc/ssl/certs/ca-certificates.crt
44
 
}
45
 

	
46
 
# gentoo expects a specific subfolder in the working directory for the extracted source, so simply extracting won't work here
47
 
src_unpack() {
48
 
        unpack ${A}
49
 
        mv Emby-${PV} emby-server-${PV}
50
 
}
51
 

	
52
 
src_prepare() {
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
54
 
	MAGICKWAND=$(ldconfig -p | grep MagickWand.*.so$ | cut -d" " -f4)
55
 
	MAGICKWAND=${MAGICKWAND##*/}
56
 
	einfo "adapting to imagemagick library to: ${MAGICKWAND}"
57
 
	sed -i -e "s/\"libMagickWand-6.Q8.so\"/\"${MAGICKWAND}\"/" MediaBrowser.Server.Mono/ImageMagickSharp.dll.config || die "could not update libMagickWand reference!"
58
 
}
59
 

	
60
 

	
61
 
src_compile() {
62
 
	addpredict "/etc/mono/registry"
63
 
	xbuild /p:Configuration="Release Mono" /p:Platform="Any CPU" MediaBrowser.sln || die "building failed"
64
 
}
65
 

	
66
 
src_install() {
67
 
	einfo "preparing startup scripts"
68
 
	newinitd "${FILESDIR}"/emby-server.init_3  ${PN}
69
 
	newconfd "${FILESDIR}"/emby-server.conf ${PN}
70
 

	
71
 
	einfo "preparing startup log file"
72
 
	dodir /var/log/
73
 
	touch ${D}${STARTUP_LOG}
74
 
	chown emby:emby ${D}${STARTUP_LOG}
75
 

	
76
 
	einfo "installing compiled files"
77
 
	diropts -oemby -gemby
78
 
	dodir ${INSTALL_DIR}
79
 
	cp -R ${S}/MediaBrowser.Server.Mono/bin/Release/* ${D}${INSTALL_DIR}/ || die "install failed, possibly compile did not succeed earlier?"
80
 
	chown emby:emby -R ${D}${INSTALL_DIR}
81
 

	
82
 
	einfo "prepare data directory"
83
 
	dodir ${DATA_DIR}
84
 
}
85
 

	
86
 
pkg_postinst() {
87
 
	einfo "emby-server was installed to ${INSTALL_DIR}, to start please use the init script provided."
88
 
	einfo "All data generated and used by Emby can be found at ${DATA_DIR} after the first start."
89
 
	einfo ""
90
 

	
91
 
	if [[ -d "/usr/lib/mediabrowser-server" || -h "/usr/lib/mediabrowser-server" ]]; then
92
 
		ewarn "ATTENTION: You seem to have moved from the former mediabrowser-server package:"
93
 
		ewarn "don't forget to migrate your original data directory before the first start!"
94
 
		ewarn "To do that move"
95
 
		ewarn "     /usr/lib/mediabrowser-server"
96
 
		ewarn "to"
97
 
		ewarn "     ${DATA_DIR}"
98
 
		ewarn "and change owner status from mediabrowser:mediabrowser to emby:emby!"
99
 
		ewarn "     chown -R emby:emby ${DATA_DIR}"
100
 
	fi
101
 

	
102
 
	if [[ -d "/usr/lib/emby-server" || -h "/usr/lib/emby-server"  ]]; then
103
 
		ewarn "ATTENTION: You seem to have existing program data at /usr/lib/emby-server!"
104
 
		ewarn "Please move that folder to ${DATA_DIR} before the first start and make sure the folder is owned by emby:emby"
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!"
106
 
	fi
107
 
}
108
 

	
109
 
# UNINSTALL
110
 
# #######################################################################################################
111
 

	
112
 
pkg_prerm() {
113
 
	einfo "Stopping running instances of Emby Server"
114
 
	if [ -e "${INIT_SCRIPT}" ]; then
115
 
		${INIT_SCRIPT} stop
116
 
	fi
117
 
}
media-tv/emby-server/emby-server-3.2.70.0.ebuild
 
deleted file
0 comments (0 inline, 0 general)