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 airtunes # AirTunes support
10 %bcond_without dvdcss # DVDCSS support
11 %bcond_without gbm # GBM platform
12 %bcond_without optical_drive # optical drive
13 %bcond_without upnp # UPnP support
14 %bcond_without x11 # X11 platform
15 %ifarch %{arm} aarch64
16 %bcond_without gles # OpenGL rendering
18 %bcond_with gles # OpenGLES rendering
20 %bcond_without wayland # Wayland platform
22 %bcond_without system_ffmpeg # build with system ffmpeg
24 %bcond_with avx # use AVX instructions
25 %bcond_with avx2 # use AVX2 instructions
26 %bcond_with neon # use NEON instructions
27 %bcond_with sse # use SSE instructions
28 %bcond_with sse2 # use SSE2 instructions
29 %bcond_with sse3 # use SSE3 instructions
30 %bcond_with ssse3 # use SSSE3 instructions
31 %bcond_with sse41 # use SSE4.1 instructions
32 %bcond_with sse42 # use SSE4.2 instructions
34 %ifarch %{arm_with_neon}
37 %ifarch %{x86_with_sse}
40 %ifarch %{x86_with_sse2}
44 %define codename Matrix
46 Summary: Kodi is a free and open source media-player and entertainment hub
50 License: GPL v2+ and GPL v3+
51 Group: Applications/Multimedia
52 #Source0Download: https://github.com/xbmc/xbmc/releases
53 Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
54 # Source0-md5: 623583e6eac14668468d6c5628b8f1c5
55 Patch0: disable-static.patch
58 BuildRequires: EGL-devel
59 %{?with_gbm:BuildRequires: Mesa-libgbm-devel}
60 # for eglextchromium.h
61 %{?with_x11:BuildRequires: Mesa-libEGL-devel}
63 BuildRequires: OpenGL-GLU-devel
64 BuildRequires: OpenGL-devel
66 BuildRequires: OpenGL-GLX-devel
69 %{?with_gles:BuildRequires: OpenGLES-devel}
70 BuildRequires: alsa-lib-devel >= 1.0.27
71 BuildRequires: avahi-devel
72 BuildRequires: bluez-libs-devel >= 4.99
73 BuildRequires: cmake >= 3.4
74 BuildRequires: crossguid-devel
75 BuildRequires: curl-devel
76 BuildRequires: dav1d-devel
77 BuildRequires: dbus-devel
78 # libavcodec >= 58.91.100 libavfilter >= 7.85.100 libavformat >= 58.45.100 libavutil >= 56.51.100 libpostproc >= 55.7.100 libswscale >= 5.7.100 libswresample >= 3.7.100
79 %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 4.3}
80 BuildRequires: flatbuffers-devel >= 1.9.0
81 BuildRequires: fontconfig-devel
82 BuildRequires: freetype-devel
83 BuildRequires: fribidi-devel
84 BuildRequires: fstrcmp-devel >= 0.7
85 BuildRequires: gettext-tools
86 BuildRequires: giflib-devel >= 5
87 BuildRequires: lcms2-devel
88 BuildRequires: libass-devel
89 BuildRequires: libatomic-devel
90 BuildRequires: libbluray-devel >= 0.9.3
91 BuildRequires: libcap-devel
92 BuildRequires: libcdio-c++-devel >= 2.1.0
93 BuildRequires: libcdio-devel >= 2.1.0
94 BuildRequires: libcec-devel >= 3.0.0
95 BuildRequires: libdrm-devel >= 2.4.95
96 %{?with_dvdcss:BuildRequires: libdvdcss-devel >= 1.4.1}
97 BuildRequires: libdvdnav-devel
98 BuildRequires: libdvdread-devel
99 BuildRequires: libfmt-devel >= 6.1.2
100 %{?with_gbm:BuildRequires: libinput-devel}
101 BuildRequires: libjpeg-devel
102 BuildRequires: libmicrohttpd-devel >= 0.9.40
103 BuildRequires: libnfs-devel
104 BuildRequires: libplist-devel >= 2.0
105 BuildRequires: libpng-devel
106 BuildRequires: libsmbclient-devel
107 BuildRequires: libstdc++-devel >= 6:5
108 BuildRequires: libudfread-devel >= 1.0.0
109 BuildRequires: libuuid-devel
110 BuildRequires: libva-devel
111 BuildRequires: libva-drm-devel
112 %{?with_wayland:BuildRequires: libva-wayland-devel}
113 %{?with_x11:BuildRequires: libva-x11-devel}
114 %if %{with x11} && %{without gles}
115 BuildRequires: libvdpau-devel
117 BuildRequires: libxml2-devel >= 2.0
118 BuildRequires: libxslt-devel
119 BuildRequires: lirc-devel
120 BuildRequires: lzo-devel >= 2
121 BuildRequires: mysql-devel
122 BuildRequires: openssl-devel >= 1.0.2
123 BuildRequires: pcre-cxx-devel
124 BuildRequires: pkgconfig
125 BuildRequires: pulseaudio-devel >= 11.0.0
126 BuildRequires: python3-devel >= 1:3.8
127 BuildRequires: rapidjson-devel >= 1.1.0
128 BuildRequires: rpm-pythonprov
129 BuildRequires: rpmbuild(macros) >= 2.007
130 BuildRequires: sed >= 4.0
131 BuildRequires: spdlog-devel >= 1.5.0
132 BuildRequires: sqlite3-devel
134 BuildRequires: taglib-devel >= 1.9.0
135 BuildRequires: tinyxml-devel >= 2.6.2
136 BuildRequires: udev-devel
138 BuildRequires: wayland-protocols >= 1.7
139 BuildRequires: waylandpp-devel >= 0.2.2
142 BuildRequires: xorg-lib-libX11-devel
143 BuildRequires: xorg-lib-libXext-devel
144 BuildRequires: xorg-lib-libXrandr-devel
146 %if %{with gbm} || %{with wayland}
147 BuildRequires: xorg-lib-libxkbcommon-devel >= 0.4.1
149 BuildRequires: zlib-devel
150 Requires: %{name}-common = %{version}-%{release}
151 Requires: /usr/bin/glxinfo
152 Requires: alsa-lib >= 1.0.27
153 Requires: desktop-file-utils
154 Requires: ffmpeg-libs >= 4.3
155 Requires: flatbuffers >= 1.9.0
156 Requires: hicolor-icon-theme
157 Requires: libbluray >= 0.9.3
158 Requires: libcdio >= 2.1.0
159 Requires: libcdio-c++ >= 2.1.0
160 Requires: libcec >= 3.0.0
161 Requires: libdrm >= 2.4.95
162 %{?with_dvdcss:Requires: libdvdcss >= 1.4.1}
163 Requires: libfmt >= 6.1.2
164 Requires: libmicrohttpd >= 0.9.40
165 Requires: libplist >= 2.0
166 Requires: libudfread >= 1.0.0
167 Requires: lsb-release
168 Requires: openssl >= 1.0.2
169 Requires: pulseaudio-libs >= 11.0.0
170 Requires: spdlog >= 1.5.0
171 Requires: taglib >= 1.9.0
172 Requires: tinyxml >= 2.6.2
173 %{?with_wayland:Requires: waylandpp >= 0.2.2}
174 %if %{with gbm} || %{with wayland}
175 Requires: xorg-lib-libxkbcommon >= 0.4.1
177 Obsoletes: xbmc < 14.0
178 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
181 Kodi Entertainment Center (formerly XBMC) is a free and open-source
182 media player software developed by the XBMC Foundation, a non-profit
183 technology consortium. Kodi is available for multiple operating
184 systems and hardware platforms, with a software 10-foot user interface
185 for use with televisions and remote controls. It allows users to play
186 and view most videos, music, such as podcasts from the internet, and
187 all common digital media files from local and network storage media.
190 Summary: Common files for Kodi
194 Common files for Kodi.
197 Summary: Header files for Kodi
198 Group: Development/Libraries
199 Requires: %{name}-common = %{version}-%{release}
202 Header files for Kodi.
205 %setup -q -n xbmc-%{version}%{?subver}-%{codename}
211 %if %{without system_ffmpeg}
212 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
217 -DAPP_RENDER_SYSTEM=%{!?with_gles:gl}%{?with_gles:gles} \
218 -DCORE_PLATFORM_NAME="%{?with_gbm:GBM;}%{?with_x11:X11;}%{?with_wayland:WAYLAND;}" \
219 %{cmake_on_off airtunes ENABLE_AIRTUNES} \
220 %{cmake_on_off dvdcss ENABLE_DVDCSS} \
221 -DENABLE_INTERNAL_CROSSGUID:BOOL=OFF \
222 -DENABLE_INTERNAL_DAV1D:BOOL=OFF \
223 -DENABLE_INTERNAL_FFMPEG:BOOLD=%{?with_system_ffmpeg:OFF}%{!?with_system_ffmpeg:ON} \
224 -DENABLE_INTERNAL_FLATBUFFERS:BOOL=OFF \
225 -DENABLE_INTERNAL_FMT:BOOL=OFF \
226 -DENABLE_INTERNAL_FSTRCMP:BOOL=OFF \
227 -DENABLE_INTERNAL_LIBDVD:BOOL=OFF \
228 -DENABLE_INTERNAL_RapidJSON:BOOL=OFF \
229 -DENABLE_INTERNAL_SPDLOG:BOOL=OFF \
230 -DENABLE_INTERNAL_UDFREAD:BOOL=OFF \
231 -DENABLE_LDGOLD:BOOL=OFF \
232 -DENABLE_TESTING:BOOL=OFF \
233 %{cmake_on_off optical_drive ENABLE_OPTICAL} \
234 %{cmake_on_off upnp ENABLE_UPNP} \
235 %{cmake_on_off avx ENABLE_AVX} \
236 %{cmake_on_off avx2 ENABLE_AVX2} \
237 %{cmake_on_off neon ENABLE_NEON} \
238 %{cmake_on_off sse ENABLE_SSE} \
239 %{cmake_on_off sse2 ENABLE_SSE2} \
240 %{cmake_on_off sse3 ENABLE_SSE3} \
241 %{cmake_on_off ssse3 ENABLE_SSSE3} \
242 %{cmake_on_off sse41 ENABLE_SSE4_1} \
243 %{cmake_on_off sse42 ENABLE_SSE4_2}
248 rm -rf $RPM_BUILD_ROOT
250 %{__make} -C build install \
251 DESTDIR=$RPM_BUILD_ROOT
253 %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md}
256 %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
259 rm -rf $RPM_BUILD_ROOT
262 %update_icon_cache hicolor
263 %update_desktop_database
266 %update_icon_cache hicolor
267 %update_desktop_database_postun
270 %defattr(644,root,root,755)
271 %doc README.md docs/README.Linux.md
272 %attr(755,root,root) %{_bindir}/JsonSchemaBuilder
273 %attr(755,root,root) %{_bindir}/TexturePacker
274 %attr(755,root,root) %{_bindir}/kodi
275 %attr(755,root,root) %{_bindir}/kodi-standalone
276 %{_datadir}/%{name}/addons
277 %{_datadir}/%{name}/media
278 %{_datadir}/%{name}/privacy-policy.txt
279 %{_datadir}/%{name}/system
280 %{_datadir}/%{name}/userdata
281 %attr(755,root,root) %{_libdir}/%{name}
282 %{_desktopdir}/kodi.desktop
283 %{_iconsdir}/hicolor/*/apps/%{name}.png
284 %{_datadir}/metainfo/org.xbmc.kodi.metainfo.xml
285 %{_datadir}/xsessions/kodi.desktop
288 %defattr(644,root,root,755)
289 %dir %{_datadir}/%{name}
292 %defattr(644,root,root,755)
294 %{_datadir}/%{name}/cmake