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!
10 %bcond_with afpclient # AFP support via libafpclient
11 %bcond_without airplay # AirPlay support
12 %bcond_with airtunes # AirTunes support
13 %bcond_without dvdcss # DVDCSS support
14 %bcond_without fishbmc # FishBMC visualisation
15 %bcond_without gl # OpenGL rendering
16 %bcond_without goom # GOOM visualisation
17 %bcond_with gtest # configure Google Test Framework
18 %bcond_with hal # build with HAL
19 %bcond_without joystick # SDL joystick support
20 %bcond_without libcap # libcap support
21 %bcond_with libcec # libcec support
22 %bcond_with libusb # libusb support
23 %bcond_with mdnsembedded # mDNSEmbedded support
24 %bcond_with nfs # NFS support via libnfs
25 %bcond_with openmax # OpenMax decoding, requires OpenGLES
26 %bcond_without projectm # ProjectM visualisation
27 %bcond_without pulse # PulseAudio support
28 %bcond_without rsxs # really slick X screensavers
29 %bcond_without rtmp # RTMP support via librtmp
30 %bcond_without sdl # SDL
31 %bcond_without spectrum # Spectrum visualisation
32 %bcond_without texturepacker # texturepacker support
33 %bcond_without udev # udev support
34 %bcond_without vaapi # VAAPI decoding
35 %bcond_without vdpau # VDPAU decoding
36 %bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform)
37 %bcond_without waveform # Waveform visualisation
38 %bcond_without x11 # x11 'Linux Only'
39 %bcond_without xrandr # XRandR support
40 %bcond_with system_ffmpeg # build with system ffmpeg
42 %define codename Helix
43 Summary: Kodi is a free and open source media-player and entertainment hub
47 License: GPL v2+ and GPL v3+
48 Group: Applications/Multimedia
49 Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
50 # Source0-md5: 9717c539789789b8aeaf1dcfdb9f2c69
51 Source1: https://github.com/xbmc/FFmpeg/archive/2.4.4-Helix.tar.gz
52 # Source1-md5: 19b5d29ef6b5a6fc202c652fe3905d9b
53 Patch0: jpeglib-boolean.patch
55 BuildRequires: Mesa-libGLU-devel
56 BuildRequires: OpenGL-devel
57 BuildRequires: SDL2-devel
58 BuildRequires: SDL_image-devel
59 BuildRequires: SDL_mixer-devel
60 BuildRequires: alsa-lib-devel
61 BuildRequires: autoconf
62 BuildRequires: automake
63 BuildRequires: avahi-devel
64 BuildRequires: bluez-libs-devel >= 4.99
65 BuildRequires: boost-devel
66 BuildRequires: bzip2-devel
68 BuildRequires: curl-devel
69 BuildRequires: dbus-devel
70 BuildRequires: doxygen
71 BuildRequires: ffmpeg-devel
72 BuildRequires: flac-devel
73 BuildRequires: fontconfig-devel
74 BuildRequires: freetype-devel
75 BuildRequires: fribidi-devel
77 BuildRequires: gettext-autopoint
78 BuildRequires: gettext-tools
79 BuildRequires: glew-devel
81 %{?with_hal:BuildRequires: hal-devel}
82 BuildRequires: jasper-devel
84 BuildRequires: libass-devel
85 BuildRequires: libbluray-devel >= 0.2.1
86 BuildRequires: libcap-devel
87 BuildRequires: libcdio-devel
88 %{?with_libcec:BuildRequires: libcec-devel}
89 %ifarch i686 pentium4 athlon %{x8664}
90 BuildRequires: libcrystalhd-devel
92 BuildRequires: libgcrypt-devel
93 BuildRequires: libjpeg-devel
94 BuildRequires: libltdl-devel
95 BuildRequires: libmad-devel
96 BuildRequires: libmicrohttpd-devel
97 BuildRequires: libmodplug-devel
98 BuildRequires: libmpeg2-devel
99 BuildRequires: libogg-devel
100 BuildRequires: libplist-devel
101 BuildRequires: libpng-devel
102 BuildRequires: librtmp-devel
103 BuildRequires: libsamplerate-devel
104 BuildRequires: libsmbclient-devel
105 BuildRequires: libssh-devel
106 BuildRequires: libtiff-devel
107 BuildRequires: libtool
108 BuildRequires: libva-devel
109 BuildRequires: libva-glx-devel
110 BuildRequires: libvdpau-devel
111 BuildRequires: libvorbis-devel
112 BuildRequires: libxslt-devel
113 BuildRequires: lzo-devel
114 BuildRequires: mysql-devel
118 BuildRequires: openssl-devel
119 BuildRequires: pcre-cxx-devel
120 BuildRequires: pkgconfig
121 BuildRequires: pulseaudio-devel
122 BuildRequires: python-devel >= 2.4
123 BuildRequires: rpm-pythonprov
124 BuildRequires: rpmbuild(macros) >= 1.566
125 BuildRequires: sed >= 4.0
126 BuildRequires: sqlite3-devel
128 BuildRequires: taglib-devel >= 1.8
129 BuildRequires: tinyxml-devel
130 BuildRequires: udev-devel
132 BuildRequires: xorg-lib-libX11-devel
133 BuildRequires: xorg-lib-libXext-devel
134 BuildRequires: xorg-lib-libXinerama-devel
135 BuildRequires: xorg-lib-libXmu-devel
136 BuildRequires: xorg-lib-libXrandr-devel
137 BuildRequires: xorg-lib-libXt-devel
138 BuildRequires: xorg-lib-libXtst-devel
139 BuildRequires: yajl-devel
142 BuildRequires: zlib-devel
143 #https://github.com/sahlberg/libnfs
144 #BuildRequires: libnfs-devel
145 #http://sites.google.com/site/alexthepuffin/home
146 #BuildRequires: afpfs-ng-devel
147 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
148 #https://github.com/albertz/shairport
149 #BuildRequires: libshairport
150 Requires: /usr/bin/glxinfo
151 Requires: SDL >= 1.2.14-5
152 Requires: lsb-release
153 Requires: xorg-app-xdpyinfo
154 # dlopened libraries:
155 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
160 Requires: libmpeg2-libs
164 Obsoletes: xbmc < 14.0
165 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
168 Kodi Entertainment Center (formerly XBMC) is a free and open-source
169 media player software developed by the XBMC Foundation, a non-profit
170 technology consortium. Kodi is available for multiple operating
171 systems and hardware platforms, with a software 10-foot user interface
172 for use with televisions and remote controls. It allows users to play
173 and view most videos, music, such as podcasts from the internet, and
174 all common digital media files from local and network storage media.
177 %setup -q -n xbmc-%{version}-%{codename}
180 %if %{with system_ffmpeg}
181 ln -s %{SOURCE1} tools/depends/target/ffmpeg
187 --disable-silent-rules \
190 --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
191 %{__enable_disable afpclient} \
192 %{__enable_disable airplay} \
193 %{__enable_disable airtunes} \
194 %{__enable_disable dvdcss} \
195 %{__enable_disable fishbmc} \
196 %{__enable_disable gl} \
197 %{__enable_disable goom} \
198 %{__enable_disable gtest} \
199 %{__enable_disable gtexturepacker} \
200 %{__enable_disable hal} \
201 %{__enable_disable joystick} \
202 %{__enable_disable libcap} \
203 %{__enable_disable libcec} \
204 %{__enable_disable libusb} \
205 %{__enable_disable mdnsembedded} \
206 %{__enable_disable nfs} \
207 %{__enable_disable openmax} \
208 %{__enable_disable projectm} \
209 %{__enable_disable pulse} \
210 %{__enable_disable rsxs} \
211 %{__enable_disable rtmp} \
212 %{__enable_disable sdl} \
213 %{__enable_disable spectrum} \
214 %{__enable_disable udev} \
215 %{__enable_disable vaapi} \
216 %{__enable_disable vdpau} \
217 %{__enable_disable vtbdecoder} \
218 %{__enable_disable waveform} \
219 %{__enable_disable x11} \
220 %{__enable_disable xrandr} \
226 rm -rf $RPM_BUILD_ROOT
228 DESTDIR=$RPM_BUILD_ROOT
230 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
232 # no -devel package yet
233 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
234 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
237 rm -rf $RPM_BUILD_ROOT
240 %defattr(644,root,root,755)
241 %doc README.md docs/README.linux
242 %attr(755,root,root) %{_bindir}/kodi
243 %attr(755,root,root) %{_bindir}/kodi-standalone
245 %attr(755,root,root) %{_libdir}/%{name}
246 %{_desktopdir}/kodi.desktop
247 %{_iconsdir}/hicolor/*/apps/%{name}.png
248 %{_datadir}/xsessions/kodi.desktop
250 # legacy xbmc compatibility links
251 %attr(755,root,root) %{_bindir}/xbmc
252 %attr(755,root,root) %{_bindir}/xbmc-standalone
255 %{_datadir}/xsessions/xbmc.desktop