aboutsummaryrefslogtreecommitdiffstats
path: root/testing/emby/APKBUILD
blob: 0fe7668bec54e5d1ac4b88234deb59dd47a74f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=emby
pkgver=3.0.5724.6
pkgrel=0
pkgdesc="Bring together your videos, music, photos, and live television"
url="http://emby.media"
arch="noarch"
license="GPL2"
depends="ffmpeg mono sqlite-libs imagemagick libmediainfo"
pkgusers=$pkgname
pkggroups=$pkgname
depends_dev=""
makedepends="$depends_dev"
install="$pkgname.pre-install"
subpackages="$pkgname-migrate"
source="Emby-$pkgver.tar.gz::https://github.com/MediaBrowser/Emby/archive/$pkgver.tar.gz
	emby-server
	$pkgname.initd
	$pkgname.confd
	emby-migrate"

_builddir="$srcdir"/Emby-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	mkdir -p "$_builddir"/build
	# check libs and update.
	if [ -e "/usr/lib/libmediainfo.so.0" ]; then
		sed -i s/libmediainfo.so/libmediainfo.so.0/g \
			"$_builddir"/MediaBrowser.Server.Mono/MediaBrowser.MediaInfo.dll.config \
			|| return 1
	else
		die "libmediainfo library not found!"
	fi
	if [ -e "/usr/lib/libMagickWand-6.Q16.so.2" ]; then
		sed -i s/libMagickWand-6.Q8.so/libMagickWand-6.Q16.so.2/g \
			"$_builddir"/MediaBrowser.Server.Mono/ImageMagickSharp.dll.config \
			|| return 1
	else
		die "libMagickWand not found!"
	fi
	if [ -e "/usr/lib/libsqlite3.so.0" ]; then
		sed -i s/libsqlite3.so/libsqlite3.so.0/g \
			"$_builddir"/MediaBrowser.Server.Mono/System.Data.SQLite.dll.config \
			|| return 1
	else
		die "libsqlite3 not found!"
	fi
}

build() {
	cd "$_builddir"
	xbuild \
		/p:Configuration='Release Mono' \
		/p:Platform='Any CPU' \
		/p:OutputPath="$_builddir"/build \
		/t:build MediaBrowser.Mono.sln || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/lib/emby || return 1
	install -d -o $pkgusers -g $pkggroups \
		 "$pkgdir"/var/lib/emby || return 1
	cp -r "$_builddir"/build/* \
		"$pkgdir"/usr/lib/emby/
	install -Dm755 "$srcdir"/emby-server \
		"$pkgdir"/usr/bin/emby-server || return 1
	install -Dm755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/emby || return 1
	install -Dm644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/emby || return 1
}

migrate() {
	pkgdesc="$pkgname database migration script"
	depends="sqlite"
	install -Dm755 "$srcdir"/emby-migrate \
		"$subpkgdir"/usr/bin/emby-migrate || return 1
}

md5sums="7ddeae6667ccca9037f78a0e1d1604d8  Emby-3.0.5724.6.tar.gz
1fb8f122e9659da42be092fd054debf3  emby-server
1dd4899fb086d8a9549ed8259d130024  emby.initd
780b7fddf63030437fd398eb679bfb42  emby.confd
e176391105b6c4793ada2b9745cf82c7  emby-migrate"
sha256sums="295791cfffb76572eb20d0ba9c065f9db7ec765b0775613aab82ebeebb0868c5  Emby-3.0.5724.6.tar.gz
e287a2d6b88c0d6b17b29c0be7463e489eab4ea5153d52e3e00e47119384e130  emby-server
82e30752bfe43ac66adaca88651b839d396897cc85c3a45fa3c3c2d473cd779c  emby.initd
eadf0c8c2cee2ccc6761aa731cd58dd70086f1dc207acdd71ac1be9fa9f94ed4  emby.confd
0e3f6b7fe700a3bbdf97bdae8655453b34b1bd08fa8ae339e0fd130fe8670b0b  emby-migrate"
sha512sums="e85f8d8d6e06c6a58c08827f5ddcc320ff29c2c753386c1a144a36f98bf6b44c0bc064cf93811987d2f856fbbdaaa6d2ee3fd068365004d0d216fd1d82c071c7  Emby-3.0.5724.6.tar.gz
f161fbf2d83d91e5436578f1998410dba991c8d2de4fb8852ec106b13ce3e7119fec7432998dfffa2c488425e2a5eacaf34b0c4e6fc93ad370c1ba94b3eaa2e4  emby-server
2a520ee646b0489bbacd79679e75828194cbcd41845948816d1ae4d129f7cd582561f7357fa0c6d7f3f1970cc7900ae34338d54a4e54d5b21284c020a911e284  emby.initd
ebdb39d3e17277ecc51709fc6862265295892d6aa1b5f1b9da537a80552b81c845863cd058ab468f7cf20c22f8f56954b7cce4d149f8fa233ea19ae7aa0bc001  emby.confd
d4275622b26228c352ee9150441995c2062f6afdda46ccca176ad13a17d5ce432f6cf80b7c7d3029763d3e6fb79cf9a7a07bdbf4fef1dfaee2811c56ec0ec7b9  emby-migrate"