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 (only for linux/freebsd)
13 %bcond_without avahi # Avahi support (default is enabled if libavahi-common and libavahi-client is found)
14 %bcond_without dbus # DBUS support
15 %bcond_without dvdcss # DVDCSS support
16 %bcond_without fishbmc # FishBMC visualisation
17 %bcond_without gl # OpenGL rendering
18 %bcond_without goom # GOOM visualisation
19 %bcond_with gtest # configure Google Test Framework
20 %bcond_without joystick # SDL joystick support
21 %bcond_without libcap # libcap support
22 %bcond_with libcec # libcec support
23 %bcond_with libusb # libusb support
24 %bcond_with mdnsembedded # mDNSEmbedded support
25 %bcond_without mysql # MySQL
26 %bcond_with nfs # NFS support via libnfs
27 %bcond_without non_free # componentents with non-compliant licenses
28 %bcond_with openmax # OpenMax decoding, requires OpenGLES
29 %bcond_without optical_drive # optical drive
30 %bcond_without projectm # ProjectM visualisation
31 %bcond_without pulse # PulseAudio support
32 %bcond_without rsxs # really slick X screensavers
33 %bcond_without rtmp # RTMP support via librtmp
34 %bcond_without samba # SAMBA support (default is enabled)
35 %bcond_without sdl # SDL
36 %bcond_without spectrum # Spectrum visualisation
37 %bcond_without ssh # SSH SFTP support (default is enabled)
38 %bcond_without texturepacker # texturepacker support
39 %bcond_without udev # udev support
40 %bcond_without upnp # UPnP support (default is enabled)
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)
44 %bcond_without waveform # Waveform visualisation
45 %bcond_without webserver # webserver
46 %bcond_without x11 # x11 'Linux Only'
47 %bcond_without xrandr # XRandR support
49 %bcond_without system_ffmpeg # build with system ffmpeg
50 %bcond_without system_dvdread # build with system dvdread
52 %define codename Helix
53 Summary: Kodi is a free and open source media-player and entertainment hub
57 License: GPL v2+ and GPL v3+
58 Group: Applications/Multimedia
59 Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
60 # Source0-md5: 9717c539789789b8aeaf1dcfdb9f2c69
61 Source1: https://github.com/xbmc/FFmpeg/archive/2.4.4-%{codename}.tar.gz
62 # Source1-md5: 19b5d29ef6b5a6fc202c652fe3905d9b
63 Patch0: jpeglib-boolean.patch
64 Patch1: dvddemux-ffmpeg.patch
67 BuildRequires: Mesa-libGLU-devel
68 BuildRequires: OpenGL-devel
69 BuildRequires: SDL2-devel
70 BuildRequires: SDL_image-devel
71 BuildRequires: SDL_mixer-devel
72 BuildRequires: alsa-lib-devel
73 BuildRequires: autoconf
74 BuildRequires: automake
75 BuildRequires: avahi-devel
76 BuildRequires: bluez-libs-devel >= 4.99
77 BuildRequires: boost-devel
78 BuildRequires: bzip2-devel
80 BuildRequires: curl-devel
81 BuildRequires: dbus-devel
82 BuildRequires: doxygen
83 %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4}
84 BuildRequires: flac-devel
85 BuildRequires: fontconfig-devel
86 BuildRequires: freetype-devel
87 BuildRequires: fribidi-devel
89 BuildRequires: gettext-autopoint
90 BuildRequires: gettext-tools
91 BuildRequires: glew-devel
93 BuildRequires: jasper-devel
95 BuildRequires: libass-devel
96 BuildRequires: libbluray-devel >= 0.2.1
97 BuildRequires: libcap-devel
98 BuildRequires: libcdio-devel
99 %{?with_libcec:BuildRequires: libcec-devel}
100 %{?with_system_dvdread:BuildRequires: libdvdread-devel}
101 %ifarch i686 pentium4 athlon %{x8664}
102 BuildRequires: libcrystalhd-devel
104 BuildRequires: libgcrypt-devel
105 BuildRequires: libjpeg-devel
106 BuildRequires: libltdl-devel
107 BuildRequires: libmad-devel
108 BuildRequires: libmicrohttpd-devel
109 BuildRequires: libmodplug-devel
110 BuildRequires: libmpeg2-devel
111 BuildRequires: libogg-devel
112 BuildRequires: libplist-devel
113 BuildRequires: libpng-devel
114 BuildRequires: librtmp-devel
115 BuildRequires: libsamplerate-devel
116 BuildRequires: libsmbclient-devel
117 BuildRequires: libssh-devel
118 BuildRequires: libtiff-devel
119 BuildRequires: libtool
120 BuildRequires: libva-devel
121 BuildRequires: libva-glx-devel
122 BuildRequires: libvdpau-devel
123 BuildRequires: libvorbis-devel
124 BuildRequires: libxslt-devel
125 BuildRequires: lzo-devel
126 BuildRequires: mysql-devel
130 BuildRequires: openssl-devel
131 BuildRequires: pcre-cxx-devel
132 BuildRequires: pkgconfig
133 BuildRequires: pulseaudio-devel
134 BuildRequires: python-devel >= 2.4
135 BuildRequires: rpm-pythonprov
136 BuildRequires: rpmbuild(macros) >= 1.566
137 BuildRequires: sed >= 4.0
138 BuildRequires: sqlite3-devel
140 BuildRequires: taglib-devel >= 1.8
141 BuildRequires: tinyxml-devel
142 BuildRequires: udev-devel
144 BuildRequires: xorg-lib-libX11-devel
145 BuildRequires: xorg-lib-libXext-devel
146 BuildRequires: xorg-lib-libXinerama-devel
147 BuildRequires: xorg-lib-libXmu-devel
148 BuildRequires: xorg-lib-libXrandr-devel
149 BuildRequires: xorg-lib-libXt-devel
150 BuildRequires: xorg-lib-libXtst-devel
151 BuildRequires: yajl-devel
154 BuildRequires: zlib-devel
155 #https://github.com/sahlberg/libnfs
156 #BuildRequires: libnfs-devel
157 #http://sites.google.com/site/alexthepuffin/home
158 #BuildRequires: afpfs-ng-devel
159 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
160 #https://github.com/albertz/shairport
161 #BuildRequires: libshairport
162 Requires: /usr/bin/glxinfo
163 Requires: SDL >= 1.2.14-5
164 Requires: lsb-release
165 Requires: xorg-app-xdpyinfo
166 # dlopened libraries:
167 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
172 Requires: libmpeg2-libs
176 Obsoletes: xbmc < 14.0
177 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
180 Kodi Entertainment Center (formerly XBMC) is a free and open-source
181 media player software developed by the XBMC Foundation, a non-profit
182 technology consortium. Kodi is available for multiple operating
183 systems and hardware platforms, with a software 10-foot user interface
184 for use with televisions and remote controls. It allows users to play
185 and view most videos, music, such as podcasts from the internet, and
186 all common digital media files from local and network storage media.
189 %setup -q -n xbmc-%{version}-%{codename}
191 %{?with_system_ffmpeg:%patch1 -p0}
192 %{?with_system_dvdread:%patch2 -p1}
194 rm -r lib/cximage-6.0/zlib
195 #rm -r lib/libhdhomerun
197 rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
200 rm -r lib/libmicrohttpd
204 %{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
206 %if %{without system_ffmpeg}
207 ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
213 --disable-silent-rules \
216 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
217 %{__enable_disable afpclient} \
218 %{__enable_disable airplay} \
219 %{__enable_disable airtunes} \
220 %{__enable_disable alsa} \
221 %{__enable_disable avahi} \
222 %{__enable_disable dbus} \
223 %{__enable_disable dvdcss} \
224 %{__enable_disable fishbmc} \
225 %{__enable_disable gl} \
226 %{__enable_disable goom} \
227 %{__enable_disable gtest} \
228 %{__enable_disable texturepacker} \
229 %{__enable_disable joystick} \
230 %{__enable_disable libcap} \
231 %{__enable_disable libcec} \
232 %{__enable_disable libusb} \
233 %{__enable_disable mdnsembedded} \
234 %{__enable_disable mysql} \
235 %{__enable_disable nfs} \
236 %{__enable_disable non_free non-free} \
237 %{__enable_disable openmax} \
238 %{__enable_disable optical_drive optical-drive} \
239 %{__enable_disable projectm} \
240 %{__enable_disable pulse} \
241 %{__enable_disable rsxs} \
242 %{__enable_disable rtmp} \
243 %{__enable_disable samba} \
244 %{__enable_disable sdl} \
245 %{__enable_disable spectrum} \
246 %{__enable_disable ssh} \
247 %{__enable_disable udev} \
248 %{__enable_disable upnp} \
249 %{__enable_disable vaapi} \
250 %{__enable_disable vdpau} \
251 %{__enable_disable vtbdecoder} \
252 %{__enable_disable waveform} \
253 %{__enable_disable webserver} \
254 %{__enable_disable x11} \
255 %{__enable_disable xrandr} \
261 rm -rf $RPM_BUILD_ROOT
263 DESTDIR=$RPM_BUILD_ROOT
265 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
267 # no -devel package yet
268 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
269 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
271 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
272 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
273 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
276 rm -rf $RPM_BUILD_ROOT
279 %defattr(644,root,root,755)
280 %doc README.md docs/README.linux
281 %attr(755,root,root) %{_bindir}/kodi
282 %attr(755,root,root) %{_bindir}/kodi-standalone
284 %attr(755,root,root) %{_libdir}/%{name}
285 %{_desktopdir}/kodi.desktop
286 %{_iconsdir}/hicolor/*/apps/%{name}.png
287 %{_datadir}/xsessions/kodi.desktop
289 # legacy xbmc compatibility links
290 %attr(755,root,root) %{_bindir}/xbmc
291 %attr(755,root,root) %{_bindir}/xbmc-standalone
292 %{_datadir}/xsessions/xbmc.desktop