2 # - fix build flags - some files are compiled with -O3 and without rpm*flags
3 # - fix linking argument order
4 # - add and/or fix users/groups permissions
5 # - split to subpackages?
6 # - system ffmpeg (--with-ffmpeg=shared), DVDDemuxFFmpeg.cpp:542:41: error: 'av_read_frame_flush' was not declared in this scope
7 # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl!
11 %bcond_with afpclient # AFP support via libafpclient
12 %bcond_without airplay # AirPlay support
13 %bcond_with airtunes # AirTunes support
14 %bcond_without alsa # ALSA support (only for linux/freebsd)
15 %bcond_without avahi # Avahi support (default is enabled if libavahi-common and libavahi-client is found)
16 %bcond_without dbus # DBUS support
17 %bcond_without dvdcss # DVDCSS support
18 %bcond_without fishbmc # FishBMC visualisation
19 %bcond_without gl # OpenGL rendering
20 %bcond_without goom # GOOM visualisation
21 %bcond_with gtest # configure Google Test Framework
22 %bcond_with hal # build with HAL
23 %bcond_without joystick # SDL joystick support
24 %bcond_without libcap # libcap support
25 %bcond_with libcec # libcec support
26 %bcond_with libusb # libusb support
27 %bcond_with mdnsembedded # mDNSEmbedded support
28 %bcond_without mysql # MySQL
29 %bcond_with nfs # NFS support via libnfs
30 %bcond_without non_free # componentents with non-compliant licenses
31 %bcond_with openmax # OpenMax decoding, requires OpenGLES
32 %bcond_without optical_drive # optical drive
33 %bcond_without projectm # ProjectM visualisation
34 %bcond_without pulse # PulseAudio support
35 %bcond_without rsxs # really slick X screensavers
36 %bcond_without rtmp # RTMP support via librtmp
37 %bcond_without samba # SAMBA support (default is enabled)
38 %bcond_without sdl # SDL
39 %bcond_without spectrum # Spectrum visualisation
40 %bcond_without ssh # SSH SFTP support (default is enabled)
41 %bcond_without texturepacker # texturepacker support
42 %bcond_without udev # udev support
43 %bcond_without upnp # UPnP support (default is enabled)
44 %bcond_without vaapi # VAAPI decoding
45 %bcond_without vdpau # VDPAU decoding
46 %bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform)
47 %bcond_without waveform # Waveform visualisation
48 %bcond_without webserver # webserver
49 %bcond_without x11 # x11 'Linux Only'
50 %bcond_without xrandr # XRandR support
52 %bcond_with system_ffmpeg # build with system ffmpeg
54 %define codename Helix
55 Summary: Kodi is a free and open source media-player and entertainment hub
59 License: GPL v2+ and GPL v3+
60 Group: Applications/Multimedia
61 Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
62 # Source0-md5: 9717c539789789b8aeaf1dcfdb9f2c69
63 Source1: https://github.com/xbmc/FFmpeg/archive/2.4.4-Helix.tar.gz
64 # Source1-md5: 19b5d29ef6b5a6fc202c652fe3905d9b
65 Patch0: jpeglib-boolean.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 BuildRequires: ffmpeg-devel
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 %{?with_hal:BuildRequires: hal-devel}
94 BuildRequires: jasper-devel
96 BuildRequires: libass-devel
97 BuildRequires: libbluray-devel >= 0.2.1
98 BuildRequires: libcap-devel
99 BuildRequires: libcdio-devel
100 %{?with_libcec:BuildRequires: libcec-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}
192 %if %{with system_ffmpeg}
193 ln -s %{SOURCE1} tools/depends/target/ffmpeg
199 --disable-silent-rules \
202 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
203 %{__enable_disable afpclient} \
204 %{__enable_disable airplay} \
205 %{__enable_disable airtunes} \
206 %{__enable_disable alsa} \
207 %{__enable_disable avahi} \
208 %{__enable_disable dbus} \
209 %{__enable_disable dvdcss} \
210 %{__enable_disable fishbmc} \
211 %{__enable_disable gl} \
212 %{__enable_disable goom} \
213 %{__enable_disable gtest} \
214 %{__enable_disable gtexturepacker} \
215 %{__enable_disable hal} \
216 %{__enable_disable joystick} \
217 %{__enable_disable libcap} \
218 %{__enable_disable libcec} \
219 %{__enable_disable libusb} \
220 %{__enable_disable mdnsembedded} \
221 %{__enable_disable mysql} \
222 %{__enable_disable nfs} \
223 %{__enable_disable non_free non-free} \
224 %{__enable_disable openmax} \
225 %{__enable_disable optical_drive optical-drive} \
226 %{__enable_disable projectm} \
227 %{__enable_disable pulse} \
228 %{__enable_disable rsxs} \
229 %{__enable_disable rtmp} \
230 %{__enable_disable samba} \
231 %{__enable_disable sdl} \
232 %{__enable_disable spectrum} \
233 %{__enable_disable ssh} \
234 %{__enable_disable udev} \
235 %{__enable_disable upnp} \
236 %{__enable_disable vaapi} \
237 %{__enable_disable vdpau} \
238 %{__enable_disable vtbdecoder} \
239 %{__enable_disable waveform} \
240 %{__enable_disable webserver} \
241 %{__enable_disable x11} \
242 %{__enable_disable xrandr} \
248 rm -rf $RPM_BUILD_ROOT
250 DESTDIR=$RPM_BUILD_ROOT
252 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
254 # no -devel package yet
255 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
256 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
259 rm -rf $RPM_BUILD_ROOT
262 %defattr(644,root,root,755)
263 %doc README.md docs/README.linux
264 %attr(755,root,root) %{_bindir}/kodi
265 %attr(755,root,root) %{_bindir}/kodi-standalone
267 %attr(755,root,root) %{_libdir}/%{name}
268 %{_desktopdir}/kodi.desktop
269 %{_iconsdir}/hicolor/*/apps/%{name}.png
270 %{_datadir}/xsessions/kodi.desktop
272 # legacy xbmc compatibility links
273 %attr(755,root,root) %{_bindir}/xbmc
274 %attr(755,root,root) %{_bindir}/xbmc-standalone
277 %{_datadir}/xsessions/xbmc.desktop