summaryrefslogtreecommitdiff
path: root/kodi-rpi/APKBUILD
blob: bb6738f798ff3c44c0fd0811482001b53a77a71f (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Maintainer: Karel Kočí <cynerd@email.cz>
pkgname=kodi-rpi
pkgver=18.5
_realname=Leia
pkgrel=1
_libdvdcss_pkgver="1.4.2-Leia-Beta-5"
_libdvdread_pkgver="6.0.0-Leia-Alpha-3"
_libdvdnav_pkgver="6.0.0-Leia-Alpha-3"
_crossguid_hash="8f399e8bd4"
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi build)"
url="https://kodi.tv"
arch="armv7"
license="GPL-2.0-only"
depends="python2
	coreutils
	hicolor-icon-theme
	xdpyinfo
	curl
	py-pillow
	py-bluez
	py-simplejson"
# Required dependencies
depends_dev="libass-dev
	libcdio-dev
	curl-dev
	ffmpeg-rpi-dev
	flatbuffers-dev
	fmt-dev
	freetype-dev
	fribidi-dev
	fstrcmp-dev
	libdvdcss-dev
	lzo-dev
	openssl-dev
	pcre-dev
	rapidjson-dev
	sqlite-dev
	taglib-dev
	tinyxml-dev
	zlib-dev
	giflib-dev
	libjpeg-turbo-dev
"

# Required for Raspberry Pi
depends_dev="$depends_dev
	raspberrypi-dev
"

# Optional for extra features
depends_dev="$depends_dev
	alsa-lib-dev
	avahi-dev
	bluez-dev
	libbluray-dev
	libcap-dev
	libcec-dev
	dbus-dev
	libmicrohttpd-dev
	libnfs-dev
	libplist-dev
	pulseaudio-dev
	python2-dev
	samba-dev
	eudev-dev
	libxslt-dev
	mariadb-connector-c-dev
	libshairport-dev"
makedepends="$depends_dev
	cmake
	swig
	autoconf
	automake
	libtool
	doxygen
	graphviz
	xz
	tar
	openjdk8-jre-base"

replaces="xbmc"
provides="kodi kodi-bin"
options="ldpath-recursive !check" # No testsuite
source="https://github.com/xbmc/xbmc/archive/$pkgver-$_realname.tar.gz
	libdvdcss-$_libdvdcss_pkgver.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_pkgver.tar.gz
	libdvdread-$_libdvdread_pkgver.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_pkgver.tar.gz
	libdvdnav-$_libdvdnav_pkgver.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_pkgver.tar.gz
	crossguid-$_crossguid_hash.tar.gz::https://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_hash.tar.gz
	set-default-stacksize.patch
	fix-musl-incompability.patch
	cassert.patch
	kodi.initd
	60-kodi.rules
	"

builddir="$srcdir/xbmc-$pkgver-$_realname"

build() {
	make -C tools/depends/target/crossguid PREFIX="$PWD"/usr

	cmake "$builddir" \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_PREFIX_PATH=/opt/vc \
		-DENABLE_EVENTCLIENTS=ON \
		-DENABLE_INTERNAL_FFMPEG=OFF \
		-DENABLE_INTERNAL_FMT=OFF \
		-DENABLE_INTERNAL_CROSSGUID=ON \
		-DENABLE_INTERNAL_FSTRCMP=OFF \
		-DENABLE_INTERNAL_FLATBUFFERS=OFF \
		-DENABLE_INTERNAL_RapidJSON=OFF \
		-Dlibdvdcss_URL="$srcdir"/libdvdcss-$_libdvdcss_pkgver.tar.gz \
		-Dlibdvdread_URL="$srcdir"/libdvdread-$_libdvdread_pkgver.tar.gz \
		-Dlibdvdnav_URL="$srcdir"/libdvdnav-$_libdvdnav_pkgver.tar.gz \
		-DCROSSGUID_URL="$srcdir"/crossguid-$_crossguid_hash.tar.gz \
		-DWITH_CPU="cortex-a53" \
		-DCORE_PLATFORM_NAME=rbpi
		# NOTE: CPU for Raspberry Pi 2 should be cortex-a7
	make
	make preinstall
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/kodi.initd "$pkgdir"/etc/init.d/kodi
}


sha512sums="6fe70d8ee5b6ffd3d43b89487554e41eed8dbf95bb017b82578b547ec248ae94f4dda298f0d85c5896019f7032eba4e1e2494c8140dde9c9b9cb21802acfd029  18.5-Leia.tar.gz
5185dbdbeb1bd13ea9d8723f1f4ab599d6f3102f5ba1096cd085aa1cda252c045f327c719227bba8e1b742352ade5e335106c8d0c1637a5a6b93ce661620dd7e  libdvdcss-1.4.2-Leia-Beta-5.tar.gz
b3419ba0a1a2dd70f1bb6236afdfe1c6e88c9ad4264198b289e3bba9375e077cecf7f89848c7b09debaa445327f3507101f3d157e692f7a7163b2bb52643e1e7  libdvdread-6.0.0-Leia-Alpha-3.tar.gz
11c93eaacd156f8fd7dec7c43d366438b201f31ad55b2870463a9e286912b6ada08882319a021fb7992190f87b909a49f2b83e0321cc17aedc29f7fe5898fa72  libdvdnav-6.0.0-Leia-Alpha-3.tar.gz
2682d63609d3dcdfcd8136be632e45df26ad88ce93b9c49745cf728bbd2e6254a7b05c8b059ab581d532372e504206a525a52564b64d076dfdae9c965a09fd16  crossguid-8f399e8bd4.tar.gz
3fd97e9fa22e59b3cd30fdad19474e177a9d062598765fa8ba4955f1da4e10581ff1463dd0794d3ee3cefebf753007a4d445b2bc47a257574d3927c1408b8876  set-default-stacksize.patch
65b78a96bef33cec975b371f1a930d551d7b224955d6075b7edc7e51ec30fec9c77d34f622abbaf827c60df6029206b72c02ee2d2f138d276c1b843336fd14ab  fix-musl-incompability.patch
7348495a805d07730dc569b091f15765ca9d86fa28987a343dfc7fa36cd6ecbb52ac4ea76d7c9fe9eab90ed8552ef6aeae7ffd72edd11f8d780c1de2e9ffe49d  cassert.patch
7e2a2289da3098e0007e461ad538dcd6435e908283caf1719788248fe736615890175e11392ca0cd68002872217bbf7b70cf909f228307828aa82467d5502ed4  kodi.initd
465a2079d598bf909a458d8e9d0ddd2b2a41dff83ba736542cffec7811c044295d5af092928f20aaa6cd3bc8b13bb03ede5c7ded1783680f890464e103392787  60-kodi.rules"