]>
Commit | Line | Data |
---|---|---|
18b90c81 | 1 | # TODO: |
3a71016a | 2 | # - fix build flags - some files are compiled with -O3 and without rpm*flags |
92b96980 | 3 | # - add and/or fix users/groups permissions |
63ff963e | 4 | # - split to subpackages? |
928406b7 | 5 | # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl! |
18b90c81 | 6 | # |
92b96980 | 7 | # Conditional build: |
ceb94d36 | 8 | # Features: |
c0d69361 ER |
9 | %bcond_with afpclient # AFP support via libafpclient |
10 | %bcond_without airplay # AirPlay support | |
11 | %bcond_with airtunes # AirTunes support | |
e148a10d ER |
12 | %bcond_without alsa # ALSA support |
13 | %bcond_without avahi # Avahi support | |
ceb94d36 ER |
14 | %bcond_without dbus # DBUS support |
15 | %bcond_without dvdcss # DVDCSS support | |
98f23c16 ER |
16 | %bcond_without fishbmc # FishBMC visualisation |
17 | %bcond_without gl # OpenGL rendering | |
18 | %bcond_without goom # GOOM visualisation | |
ceb94d36 | 19 | %bcond_with gtest # configure Google Test Framework |
98f23c16 | 20 | %bcond_without joystick # SDL joystick support |
c0d69361 ER |
21 | %bcond_without libcap # libcap support |
22 | %bcond_with libcec # libcec support | |
8ea15fa3 | 23 | %bcond_without libusb # libusb support |
c0d69361 | 24 | %bcond_with mdnsembedded # mDNSEmbedded support |
ceb94d36 | 25 | %bcond_without mysql # MySQL |
8ea15fa3 | 26 | %bcond_without nfs # NFS support via libnfs |
ceb94d36 | 27 | %bcond_without non_free # componentents with non-compliant licenses |
c0d69361 | 28 | %bcond_with openmax # OpenMax decoding, requires OpenGLES |
ceb94d36 | 29 | %bcond_without optical_drive # optical drive |
98f23c16 | 30 | %bcond_without projectm # ProjectM visualisation |
c0d69361 | 31 | %bcond_without pulse # PulseAudio support |
98f23c16 | 32 | %bcond_without rsxs # really slick X screensavers |
c0d69361 | 33 | %bcond_without rtmp # RTMP support via librtmp |
e148a10d | 34 | %bcond_without samba # SAMBA support |
c0d69361 | 35 | %bcond_without sdl # SDL |
98f23c16 | 36 | %bcond_without spectrum # Spectrum visualisation |
e148a10d | 37 | %bcond_without ssh # SSH SFTP support |
98f23c16 | 38 | %bcond_without texturepacker # texturepacker support |
c0d69361 | 39 | %bcond_without udev # udev support |
e148a10d | 40 | %bcond_without upnp # UPnP support |
c0d69361 ER |
41 | %bcond_without vaapi # VAAPI decoding |
42 | %bcond_without vdpau # VDPAU decoding | |
43 | %bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform) | |
98f23c16 | 44 | %bcond_without waveform # Waveform visualisation |
ceb94d36 | 45 | %bcond_without webserver # webserver |
98f23c16 ER |
46 | %bcond_without x11 # x11 'Linux Only' |
47 | %bcond_without xrandr # XRandR support | |
e148a10d ER |
48 | %bcond_with asap_codec # ASAP ADPCM support |
49 | %bcond_with gles # OpenGLES rendering | |
50 | %bcond_without libbluray # libbluray support | |
51 | %bcond_without mid # MID support | |
52 | %bcond_with profiling # gprof profiling | |
53 | %bcond_with tegra # Tegra2 arm | |
54 | %bcond_with wayland # wayland | |
ceb94d36 | 55 | # System libs: |
6e5f6f0e | 56 | %bcond_without system_ffmpeg # build with system ffmpeg |
e25cf996 | 57 | %bcond_without system_dvdread # build with system dvdread |
92b96980 | 58 | |
a80d7bee | 59 | %define codename Isengard |
d61811e9 | 60 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c | 61 | Name: kodi |
a80d7bee | 62 | Version: 15.0 |
64f2ff52 | 63 | Release: 2 |
68612b1e | 64 | License: GPL v2+ and GPL v3+ |
18b90c81 | 65 | Group: Applications/Multimedia |
92b53b2c | 66 | Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz |
a80d7bee JR |
67 | # Source0-md5: d3bd3dc9fd705bcf59d8c91199994537 |
68 | Source1: https://github.com/xbmc/FFmpeg/archive/2.6.3-%{codename}.tar.gz | |
69 | # Source1-md5: 31c6cd81c44cce93358b6d9357772aec | |
d2f0f4c7 | 70 | Patch0: jpeglib-boolean.patch |
af2a7b89 | 71 | Patch1: disable-static.patch |
e25cf996 | 72 | Patch2: dvdread.patch |
92b53b2c | 73 | URL: http://kodi.tv/ |
b85db44b AF |
74 | BuildRequires: Mesa-libGLU-devel |
75 | BuildRequires: OpenGL-devel | |
658b3aff | 76 | BuildRequires: SDL2-devel |
18b90c81 SP |
77 | BuildRequires: SDL_image-devel |
78 | BuildRequires: SDL_mixer-devel | |
79 | BuildRequires: alsa-lib-devel | |
80 | BuildRequires: autoconf | |
81 | BuildRequires: automake | |
82 | BuildRequires: avahi-devel | |
b85db44b | 83 | BuildRequires: bluez-libs-devel >= 4.99 |
5a2f2b01 | 84 | BuildRequires: boost-devel |
18b90c81 SP |
85 | BuildRequires: bzip2-devel |
86 | BuildRequires: cmake | |
87 | BuildRequires: curl-devel | |
88 | BuildRequires: dbus-devel | |
501e1d3e | 89 | BuildRequires: doxygen |
64d462c0 | 90 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4} |
5a2f2b01 | 91 | BuildRequires: flac-devel |
18b90c81 SP |
92 | BuildRequires: fontconfig-devel |
93 | BuildRequires: freetype-devel | |
94 | BuildRequires: fribidi-devel | |
95 | BuildRequires: gawk | |
63ff963e | 96 | BuildRequires: gettext-autopoint |
0747666f | 97 | BuildRequires: gettext-tools |
a1f637af | 98 | BuildRequires: giflib-devel |
18b90c81 SP |
99 | BuildRequires: glew-devel |
100 | BuildRequires: gperf | |
5a2f2b01 | 101 | BuildRequires: jasper-devel |
37fbe511 | 102 | BuildRequires: jre |
b85db44b | 103 | BuildRequires: libass-devel |
37fbe511 KK |
104 | BuildRequires: libbluray-devel >= 0.2.1 |
105 | BuildRequires: libcap-devel | |
18b90c81 | 106 | BuildRequires: libcdio-devel |
c0d69361 | 107 | %{?with_libcec:BuildRequires: libcec-devel} |
e25cf996 | 108 | %{?with_system_dvdread:BuildRequires: libdvdread-devel} |
1aef2bca | 109 | %ifarch i686 pentium4 athlon %{x8664} |
5f83fc0f | 110 | BuildRequires: libcrystalhd-devel |
1aef2bca | 111 | %endif |
b85db44b | 112 | BuildRequires: libgcrypt-devel |
18b90c81 | 113 | BuildRequires: libjpeg-devel |
45a200ab | 114 | BuildRequires: libltdl-devel |
18b90c81 | 115 | BuildRequires: libmad-devel |
63ff963e | 116 | BuildRequires: libmicrohttpd-devel |
63ff963e | 117 | BuildRequires: libmodplug-devel |
c462fd57 | 118 | BuildRequires: libmpeg2-devel |
18b90c81 | 119 | BuildRequires: libogg-devel |
b85db44b | 120 | BuildRequires: libplist-devel |
5a2f2b01 | 121 | BuildRequires: libpng-devel |
b85db44b | 122 | BuildRequires: librtmp-devel |
18b90c81 SP |
123 | BuildRequires: libsamplerate-devel |
124 | BuildRequires: libsmbclient-devel | |
b85db44b | 125 | BuildRequires: libssh-devel |
5a2f2b01 | 126 | BuildRequires: libtiff-devel |
127 | BuildRequires: libtool | |
b85db44b | 128 | BuildRequires: libva-devel |
5f83fc0f | 129 | BuildRequires: libva-glx-devel |
5a2f2b01 | 130 | BuildRequires: libvdpau-devel |
18b90c81 | 131 | BuildRequires: libvorbis-devel |
501e1d3e | 132 | BuildRequires: libxslt-devel |
5a2f2b01 | 133 | BuildRequires: lzo-devel |
134 | BuildRequires: mysql-devel | |
c1b45330 | 135 | %ifarch %{ix86} |
26cae375 | 136 | BuildRequires: nasm |
c1b45330 | 137 | %endif |
18b90c81 | 138 | BuildRequires: openssl-devel |
63ff963e | 139 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 140 | BuildRequires: pkgconfig |
18b90c81 | 141 | BuildRequires: pulseaudio-devel |
b85db44b | 142 | BuildRequires: python-devel >= 2.4 |
3a71016a | 143 | BuildRequires: rpm-pythonprov |
6f41c837 | 144 | BuildRequires: rpmbuild(macros) >= 1.566 |
c462fd57 | 145 | BuildRequires: sed >= 4.0 |
18b90c81 | 146 | BuildRequires: sqlite3-devel |
37fbe511 KK |
147 | BuildRequires: swig |
148 | BuildRequires: taglib-devel >= 1.8 | |
7613a43d | 149 | BuildRequires: tinyxml-devel |
b85db44b | 150 | BuildRequires: udev-devel |
5a2f2b01 | 151 | BuildRequires: unzip |
b85db44b AF |
152 | BuildRequires: xorg-lib-libX11-devel |
153 | BuildRequires: xorg-lib-libXext-devel | |
5a2f2b01 | 154 | BuildRequires: xorg-lib-libXinerama-devel |
b85db44b | 155 | BuildRequires: xorg-lib-libXmu-devel |
18b90c81 | 156 | BuildRequires: xorg-lib-libXrandr-devel |
b85db44b | 157 | BuildRequires: xorg-lib-libXt-devel |
5a2f2b01 | 158 | BuildRequires: xorg-lib-libXtst-devel |
b85db44b | 159 | BuildRequires: yajl-devel |
501e1d3e | 160 | BuildRequires: yasm |
18b90c81 SP |
161 | BuildRequires: zip |
162 | BuildRequires: zlib-devel | |
af2a7b89 JR |
163 | # kodi uses it's own, modified squish |
164 | BuildConflicts: squish-devel | |
b85db44b AF |
165 | #https://github.com/sahlberg/libnfs |
166 | #BuildRequires: libnfs-devel | |
167 | #http://sites.google.com/site/alexthepuffin/home | |
168 | #BuildRequires: afpfs-ng-devel | |
169 | #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz | |
170 | #https://github.com/albertz/shairport | |
171 | #BuildRequires: libshairport | |
63ff963e | 172 | Requires: /usr/bin/glxinfo |
f4f8f308 | 173 | Requires: SDL >= 1.2.14-5 |
a58652d4 SP |
174 | Requires: lsb-release |
175 | Requires: xorg-app-xdpyinfo | |
06c1bb12 | 176 | # dlopened libraries: |
d61811e9 | 177 | # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special:// |
06c1bb12 ER |
178 | Requires: curl-libs |
179 | Requires: libass | |
180 | Requires: libbluray | |
181 | Requires: libmodplug | |
182 | Requires: libmpeg2-libs | |
183 | Requires: libogg | |
184 | Requires: libplist | |
185 | Requires: libvorbis | |
92b53b2c | 186 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
187 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
188 | ||
189 | %description | |
d61811e9 ER |
190 | Kodi Entertainment Center (formerly XBMC) is a free and open-source |
191 | media player software developed by the XBMC Foundation, a non-profit | |
192 | technology consortium. Kodi is available for multiple operating | |
193 | systems and hardware platforms, with a software 10-foot user interface | |
194 | for use with televisions and remote controls. It allows users to play | |
195 | and view most videos, music, such as podcasts from the internet, and | |
196 | all common digital media files from local and network storage media. | |
18b90c81 SP |
197 | |
198 | %prep | |
92b53b2c | 199 | %setup -q -n xbmc-%{version}-%{codename} |
bfa116d7 | 200 | %patch0 -p1 |
af2a7b89 | 201 | %patch1 -p1 |
05c4c454 | 202 | %{?with_system_dvdread:%patch2 -p1} |
18b90c81 | 203 | |
5d47de93 ER |
204 | rm -r lib/cximage-6.0/zlib |
205 | #rm -r lib/libhdhomerun | |
206 | rm -r lib/libmpeg2 | |
207 | rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2 | |
5d47de93 | 208 | rm -r lib/libbluray |
5d47de93 ER |
209 | rm -r lib/librtmp |
210 | rm -r lib/win32 | |
05c4c454 | 211 | %{?with_system_dvdread:rm -r lib/libdvd/libdvdread} |
5d47de93 | 212 | |
72cf5436 ER |
213 | %if %{without system_ffmpeg} |
214 | ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz | |
928406b7 ER |
215 | %endif |
216 | ||
18b90c81 SP |
217 | %build |
218 | ./bootstrap | |
65712ad3 | 219 | %configure \ |
ace9791d | 220 | --disable-silent-rules \ |
51b524ca | 221 | --disable-debug \ |
ace9791d | 222 | --disable-ccache \ |
928406b7 | 223 | --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \ |
c0d69361 ER |
224 | %{__enable_disable afpclient} \ |
225 | %{__enable_disable airplay} \ | |
226 | %{__enable_disable airtunes} \ | |
ceb94d36 | 227 | %{__enable_disable alsa} \ |
e148a10d | 228 | %{__enable_disable asap_codec asap-codec} \ |
ceb94d36 ER |
229 | %{__enable_disable avahi} \ |
230 | %{__enable_disable dbus} \ | |
98f23c16 ER |
231 | %{__enable_disable dvdcss} \ |
232 | %{__enable_disable fishbmc} \ | |
e148a10d | 233 | %{__enable_disable gles} \ |
98f23c16 | 234 | %{__enable_disable gl} \ |
b85db44b | 235 | %{__enable_disable goom} \ |
98f23c16 | 236 | %{__enable_disable gtest} \ |
98f23c16 | 237 | %{__enable_disable joystick} \ |
e148a10d | 238 | %{__enable_disable libbluray} \ |
c0d69361 | 239 | %{__enable_disable libcap} \ |
98f23c16 | 240 | %{__enable_disable libcec} \ |
c0d69361 ER |
241 | %{__enable_disable libusb} \ |
242 | %{__enable_disable mdnsembedded} \ | |
e148a10d | 243 | %{__enable_disable mid} \ |
ceb94d36 | 244 | %{__enable_disable mysql} \ |
c0d69361 | 245 | %{__enable_disable nfs} \ |
ceb94d36 | 246 | %{__enable_disable non_free non-free} \ |
c0d69361 | 247 | %{__enable_disable openmax} \ |
ceb94d36 | 248 | %{__enable_disable optical_drive optical-drive} \ |
e148a10d | 249 | %{__enable_disable profiling} \ |
98f23c16 | 250 | %{__enable_disable projectm} \ |
c0d69361 | 251 | %{__enable_disable pulse} \ |
98f23c16 | 252 | %{__enable_disable rsxs} \ |
c0d69361 | 253 | %{__enable_disable rtmp} \ |
ceb94d36 | 254 | %{__enable_disable samba} \ |
c0d69361 | 255 | %{__enable_disable sdl} \ |
98f23c16 | 256 | %{__enable_disable spectrum} \ |
ceb94d36 | 257 | %{__enable_disable ssh} \ |
e148a10d ER |
258 | %{__enable_disable tegra} \ |
259 | %{__enable_disable texturepacker} \ | |
c0d69361 | 260 | %{__enable_disable udev} \ |
ceb94d36 | 261 | %{__enable_disable upnp} \ |
c0d69361 ER |
262 | %{__enable_disable vaapi} \ |
263 | %{__enable_disable vdpau} \ | |
264 | %{__enable_disable vtbdecoder} \ | |
98f23c16 | 265 | %{__enable_disable waveform} \ |
e148a10d | 266 | %{__enable_disable wayland} \ |
ceb94d36 | 267 | %{__enable_disable webserver} \ |
98f23c16 ER |
268 | %{__enable_disable x11} \ |
269 | %{__enable_disable xrandr} \ | |
270 | %{nil} | |
68612b1e | 271 | |
00f4b5ab | 272 | %{__make} V=1 |
18b90c81 SP |
273 | |
274 | %install | |
275 | rm -rf $RPM_BUILD_ROOT | |
18b90c81 | 276 | %{__make} install \ |
92b96980 | 277 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 278 | |
25890c53 ER |
279 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
280 | ||
281 | # no -devel package yet | |
282 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi | |
283 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc | |
284 | ||
a5bfc3a3 ER |
285 | # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues) |
286 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc | |
287 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc | |
288 | ||
18b90c81 SP |
289 | %clean |
290 | rm -rf $RPM_BUILD_ROOT | |
291 | ||
292 | %files | |
293 | %defattr(644,root,root,755) | |
25890c53 ER |
294 | %doc README.md docs/README.linux |
295 | %attr(755,root,root) %{_bindir}/kodi | |
296 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
18b90c81 | 297 | %{_datadir}/%{name} |
92b96980 | 298 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
299 | %{_desktopdir}/kodi.desktop |
300 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
301 | %{_datadir}/xsessions/kodi.desktop | |
302 | ||
303 | # legacy xbmc compatibility links | |
304 | %attr(755,root,root) %{_bindir}/xbmc | |
305 | %attr(755,root,root) %{_bindir}/xbmc-standalone | |
25890c53 | 306 | %{_datadir}/xsessions/xbmc.desktop |