2 # - fix build flags - some files are compiled with -O3 and without rpm*flags
3 # - add and/or fix users/groups permissions
4 # - split to subpackages?
5 # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl!
9 %bcond_with afpclient # AFP support via libafpclient
10 %bcond_without airplay # AirPlay support
11 %bcond_with airtunes # AirTunes support
12 %bcond_without alsa # ALSA support
13 %bcond_without avahi # Avahi support
14 %bcond_without dbus # DBUS support
15 %bcond_without dvdcss # DVDCSS support
16 %bcond_without gl # OpenGL rendering
17 %bcond_with gtest # configure Google Test Framework
18 %bcond_without joystick # SDL joystick support
19 %bcond_without libcap # libcap support
20 %bcond_with libcec # libcec support
21 %bcond_without libgif # gif support via libgif
22 %bcond_without libusb # libusb support
23 %bcond_with mdnsembedded # mDNSEmbedded support
24 %bcond_without mysql # MySQL
25 %bcond_without nfs # NFS support via libnfs
26 %bcond_without non_free # componentents with non-compliant licenses
27 %bcond_with openmax # OpenMax decoding, requires OpenGLES
28 %bcond_without optical_drive # optical drive
29 %bcond_without projectm # ProjectM visualisation
30 %bcond_without pulse # PulseAudio support
31 %bcond_without rtmp # RTMP support via librtmp
32 %bcond_without samba # SAMBA support
33 %bcond_without sdl # SDL
34 %bcond_without ssh # SSH SFTP support
35 %bcond_without texturepacker # texturepacker support
36 %bcond_without udev # udev support
37 %bcond_without upnp # UPnP support
38 %bcond_without vaapi # VAAPI decoding
39 %bcond_without vdpau # VDPAU decoding
40 %bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform)
41 %bcond_without webserver # webserver
42 %bcond_without x11 # x11 'Linux Only'
43 %bcond_without xrandr # XRandR support
44 %bcond_with asap_codec # ASAP ADPCM support
45 %bcond_with gles # OpenGLES rendering
46 %bcond_without libbluray # libbluray support
47 %bcond_without mid # MID support
48 %bcond_with profiling # gprof profiling
49 %bcond_with tegra # Tegra2 arm
50 %bcond_with wayland # wayland
52 %bcond_without system_ffmpeg # build with system ffmpeg
53 %bcond_without system_dvdread # build with system dvdread
55 %define codename Jarvis
56 Summary: Kodi is a free and open source media-player and entertainment hub
60 License: GPL v2+ and GPL v3+
61 Group: Applications/Multimedia
62 #Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
63 Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
64 # Source0-md5: 79358ad5f77f42c5498a9412d5a78dd5
65 Patch0: jpeglib-boolean.patch
66 Patch1: disable-static.patch
71 BuildRequires: Mesa-libGLU-devel
72 BuildRequires: OpenGL-devel
73 BuildRequires: SDL2-devel
74 BuildRequires: SDL_image-devel
75 BuildRequires: SDL_mixer-devel
76 BuildRequires: alsa-lib-devel
77 BuildRequires: autoconf
78 BuildRequires: automake
79 BuildRequires: avahi-devel
80 BuildRequires: bluez-libs-devel >= 4.99
81 BuildRequires: boost-devel
82 BuildRequires: bzip2-devel
84 BuildRequires: crossguid-devel
85 BuildRequires: curl-devel
86 BuildRequires: dbus-devel
87 BuildRequires: dcadec-devel
88 BuildRequires: doxygen
89 %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4}
90 BuildRequires: flac-devel
91 BuildRequires: fontconfig-devel
92 BuildRequires: freetype-devel
93 BuildRequires: fribidi-devel
95 BuildRequires: gettext-autopoint
96 BuildRequires: gettext-tools
97 BuildRequires: giflib-devel
98 BuildRequires: glew-devel
100 BuildRequires: jasper-devel
102 BuildRequires: libass-devel
103 BuildRequires: libbluray-devel >= 0.7.0
104 BuildRequires: libcap-devel
105 BuildRequires: libcdio-devel
106 %{?with_libcec:BuildRequires: libcec-devel >= 2.1.0}
107 %{?with_system_dvdread:BuildRequires: libdvdread-devel}
108 BuildRequires: libgif-devel
109 %ifarch i686 pentium4 athlon %{x8664}
110 BuildRequires: libcrystalhd-devel
112 BuildRequires: libgcrypt-devel
113 BuildRequires: libjpeg-devel
114 BuildRequires: libltdl-devel
115 BuildRequires: libmad-devel
116 BuildRequires: libmicrohttpd-devel
117 BuildRequires: libmodplug-devel
118 BuildRequires: libmpeg2-devel
119 BuildRequires: libogg-devel
120 BuildRequires: libplist-devel
121 BuildRequires: libpng-devel
122 BuildRequires: librtmp-devel
123 BuildRequires: libsamplerate-devel
124 BuildRequires: libsmbclient-devel
125 BuildRequires: libssh-devel
126 BuildRequires: libtiff-devel
127 BuildRequires: libtool
128 BuildRequires: libva-devel
129 BuildRequires: libva-glx-devel
130 BuildRequires: libvdpau-devel
131 BuildRequires: libvorbis-devel
132 BuildRequires: libxslt-devel
133 BuildRequires: lzo-devel
134 BuildRequires: mysql-devel
138 BuildRequires: openssl-devel
139 BuildRequires: pcre-cxx-devel
140 BuildRequires: pkgconfig
141 BuildRequires: pulseaudio-devel
142 BuildRequires: python-devel >= 2.4
143 BuildRequires: rpm-pythonprov
144 BuildRequires: rpmbuild(macros) >= 1.566
145 BuildRequires: sed >= 4.0
146 BuildRequires: sqlite3-devel
148 BuildRequires: taglib-devel >= 1.8
149 BuildRequires: tinyxml-devel
150 BuildRequires: udev-devel
152 BuildRequires: xorg-lib-libX11-devel
153 BuildRequires: xorg-lib-libXext-devel
154 BuildRequires: xorg-lib-libXinerama-devel
155 BuildRequires: xorg-lib-libXmu-devel
156 BuildRequires: xorg-lib-libXrandr-devel
157 BuildRequires: xorg-lib-libXt-devel
158 BuildRequires: xorg-lib-libXtst-devel
159 BuildRequires: yajl-devel
162 BuildRequires: zlib-devel
163 # kodi uses it's own, modified squish
164 BuildConflicts: squish-devel
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
172 Requires: /usr/bin/glxinfo
173 Requires: SDL >= 1.2.14-5
174 Requires: lsb-release
175 Requires: xorg-app-xdpyinfo
176 # dlopened libraries:
177 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
182 Requires: libmpeg2-libs
186 Obsoletes: xbmc < 14.0
187 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
199 %setup -q -n xbmc-%{version}-%{codename}
202 %{?with_system_dvdread:%patch2 -p1}
206 rm -r lib/cximage-6.0/zlib
207 #rm -r lib/libhdhomerun
209 rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
213 %{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
215 %if %{without system_ffmpeg}
216 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
220 %{__make} -C tools/depends/native/libsquish-native \
225 ac_cv_type__Bool=yes \
226 --disable-silent-rules \
229 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
230 %{__enable_disable afpclient} \
231 %{__enable_disable airplay} \
232 %{__enable_disable airtunes} \
233 %{__enable_disable alsa} \
234 %{__enable_disable asap_codec asap-codec} \
235 %{__enable_disable avahi} \
236 %{__enable_disable dbus} \
237 %{__enable_disable dvdcss} \
238 %{__enable_disable gles} \
239 %{__enable_disable gl} \
240 %{__enable_disable gtest} \
241 %{__enable_disable joystick} \
242 %{__enable_disable libbluray} \
243 %{__enable_disable libcap} \
244 %{__enable_disable libcec} \
245 %{__enable_disable libgif} \
246 %{__enable_disable libusb} \
247 %{__enable_disable mdnsembedded} \
248 %{__enable_disable mid} \
249 %{__enable_disable mysql} \
250 %{__enable_disable nfs} \
251 %{__enable_disable non_free non-free} \
252 %{__enable_disable openmax} \
253 %{__enable_disable optical_drive optical-drive} \
254 %{__enable_disable profiling} \
255 %{__enable_disable pulse} \
256 %{__enable_disable rtmp} \
257 %{__enable_disable samba} \
258 %{__enable_disable sdl} \
259 %{__enable_disable ssh} \
260 %{__enable_disable tegra} \
261 %{__enable_disable texturepacker} \
262 %{__enable_disable udev} \
263 %{__enable_disable upnp} \
264 %{__enable_disable vaapi} \
265 %{__enable_disable vdpau} \
266 %{__enable_disable vtbdecoder} \
267 %{__enable_disable wayland} \
268 %{__enable_disable webserver} \
269 %{__enable_disable x11} \
270 %{__enable_disable xrandr} \
276 rm -rf $RPM_BUILD_ROOT
278 DESTDIR=$RPM_BUILD_ROOT
280 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
282 # no -devel package yet
283 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
284 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
286 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
287 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
288 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
291 rm -rf $RPM_BUILD_ROOT
294 %defattr(644,root,root,755)
295 %doc README.md docs/README.linux
296 %attr(755,root,root) %{_bindir}/kodi
297 %attr(755,root,root) %{_bindir}/kodi-standalone
299 %attr(755,root,root) %{_libdir}/%{name}
300 %{_desktopdir}/kodi.desktop
301 %{_iconsdir}/hicolor/*/apps/%{name}.png
302 %{_datadir}/xsessions/kodi.desktop
304 # legacy xbmc compatibility links
305 %attr(755,root,root) %{_bindir}/xbmc
306 %attr(755,root,root) %{_bindir}/xbmc-standalone
307 %{_datadir}/xsessions/xbmc.desktop