]>
Commit | Line | Data |
---|---|---|
18b90c81 | 1 | # TODO: |
3a71016a | 2 | # - fix build flags - some files are compiled with -O3 and without rpm*flags |
92b96980 | 3 | # - add and/or fix users/groups permissions |
63ff963e | 4 | # - split to subpackages? |
928406b7 | 5 | # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl! |
18b90c81 | 6 | # |
92b96980 | 7 | # Conditional build: |
ceb94d36 | 8 | # Features: |
c0d69361 | 9 | %bcond_with airtunes # AirTunes support |
ceb94d36 | 10 | %bcond_without dvdcss # DVDCSS support |
9ba2f18c | 11 | %bcond_without gbm # GBM platform |
ceb94d36 | 12 | %bcond_without optical_drive # optical drive |
e148a10d | 13 | %bcond_without upnp # UPnP support |
9ba2f18c | 14 | %bcond_without x11 # X11 platform |
3b778467 JP |
15 | %ifarch %{arm} aarch64 |
16 | %bcond_without gles # OpenGL rendering | |
17 | %else | |
e148a10d | 18 | %bcond_with gles # OpenGLES rendering |
3b778467 | 19 | %endif |
b99e5c75 | 20 | %bcond_with gold # Use gold linker |
9ba2f18c | 21 | %bcond_without wayland # Wayland platform |
ceb94d36 | 22 | # System libs: |
6e5f6f0e | 23 | %bcond_without system_ffmpeg # build with system ffmpeg |
9ba2f18c JP |
24 | # CPU instructions |
25 | %bcond_with avx # use AVX instructions | |
26 | %bcond_with avx2 # use AVX2 instructions | |
27 | %bcond_with neon # use NEON instructions | |
28 | %bcond_with sse # use SSE instructions | |
29 | %bcond_with sse2 # use SSE2 instructions | |
30 | %bcond_with sse3 # use SSE3 instructions | |
31 | %bcond_with ssse3 # use SSSE3 instructions | |
32 | %bcond_with sse41 # use SSE4.1 instructions | |
33 | %bcond_with sse42 # use SSE4.2 instructions | |
92b96980 | 34 | |
9ba2f18c JP |
35 | %ifarch %{arm_with_neon} |
36 | %define with_neon 1 | |
37 | %endif | |
38 | %ifarch %{x86_with_sse} | |
39 | %define with_sse 1 | |
40 | %endif | |
41 | %ifarch %{x86_with_sse2} | |
42 | %define with_sse2 1 | |
43 | %endif | |
44 | ||
45 | %define codename Matrix | |
0ac32cd1 | 46 | #define subver rc1 |
d61811e9 | 47 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c | 48 | Name: kodi |
2b9660bc | 49 | Version: 19.4 |
7b066a35 | 50 | Release: 3 |
68612b1e | 51 | License: GPL v2+ and GPL v3+ |
18b90c81 | 52 | Group: Applications/Multimedia |
caf463a3 | 53 | #Source0Download: https://github.com/xbmc/xbmc/releases |
0ac32cd1 | 54 | Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz |
2b9660bc | 55 | # Source0-md5: a668854505eff3ca5ed9f33e3ac91c80 |
9ba2f18c JP |
56 | Patch0: disable-static.patch |
57 | Patch1: libdvd.patch | |
0ac32cd1 | 58 | URL: https://kodi.tv/ |
a983002d | 59 | BuildRequires: EGL-devel |
9ba2f18c JP |
60 | %{?with_gbm:BuildRequires: Mesa-libgbm-devel} |
61 | # for eglextchromium.h | |
62 | %{?with_x11:BuildRequires: Mesa-libEGL-devel} | |
63 | %if %{without gles} | |
8fa5c2e4 | 64 | BuildRequires: OpenGL-GLU-devel |
b85db44b | 65 | BuildRequires: OpenGL-devel |
9ba2f18c JP |
66 | %if %{with x11} |
67 | BuildRequires: OpenGL-GLX-devel | |
68 | %endif | |
69 | %endif | |
70 | %{?with_gles:BuildRequires: OpenGLES-devel} | |
71 | BuildRequires: alsa-lib-devel >= 1.0.27 | |
18b90c81 | 72 | BuildRequires: avahi-devel |
b85db44b | 73 | BuildRequires: bluez-libs-devel >= 4.99 |
be17bf9f | 74 | BuildRequires: cmake >= 3.4 |
c3c3c480 | 75 | BuildRequires: crossguid-devel |
18b90c81 | 76 | BuildRequires: curl-devel |
9de0d888 | 77 | %{!?with_system_ffmpeg:BuildRequires: dav1d-devel} |
18b90c81 | 78 | BuildRequires: dbus-devel |
9ba2f18c JP |
79 | # 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 |
80 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 4.3} | |
60818254 | 81 | BuildRequires: flatbuffers-devel >= 1.9.0 |
18b90c81 SP |
82 | BuildRequires: fontconfig-devel |
83 | BuildRequires: freetype-devel | |
84 | BuildRequires: fribidi-devel | |
9ba2f18c | 85 | BuildRequires: fstrcmp-devel >= 0.7 |
0747666f | 86 | BuildRequires: gettext-tools |
9ba2f18c | 87 | BuildRequires: giflib-devel >= 5 |
d9a0b984 | 88 | BuildRequires: jre |
20c6d413 | 89 | BuildRequires: lcms2-devel |
b85db44b | 90 | BuildRequires: libass-devel |
a7c53f4c | 91 | BuildRequires: libatomic-devel |
9ba2f18c | 92 | BuildRequires: libbluray-devel >= 0.9.3 |
37fbe511 | 93 | BuildRequires: libcap-devel |
9ba2f18c JP |
94 | BuildRequires: libcdio-c++-devel >= 2.1.0 |
95 | BuildRequires: libcdio-devel >= 2.1.0 | |
96 | BuildRequires: libcec-devel >= 3.0.0 | |
97 | BuildRequires: libdrm-devel >= 2.4.95 | |
98 | %{?with_dvdcss:BuildRequires: libdvdcss-devel >= 1.4.1} | |
99 | BuildRequires: libdvdnav-devel | |
100 | BuildRequires: libdvdread-devel | |
101 | BuildRequires: libfmt-devel >= 6.1.2 | |
102 | %{?with_gbm:BuildRequires: libinput-devel} | |
18b90c81 | 103 | BuildRequires: libjpeg-devel |
88da6d7b | 104 | BuildRequires: libmicrohttpd-devel >= 0.9.40 |
9ba2f18c JP |
105 | BuildRequires: libnfs-devel |
106 | BuildRequires: libplist-devel >= 2.0 | |
5a2f2b01 | 107 | BuildRequires: libpng-devel |
18b90c81 | 108 | BuildRequires: libsmbclient-devel |
9ba2f18c JP |
109 | BuildRequires: libstdc++-devel >= 6:5 |
110 | BuildRequires: libudfread-devel >= 1.0.0 | |
f99f2533 | 111 | BuildRequires: libuuid-devel |
b85db44b | 112 | BuildRequires: libva-devel |
9ba2f18c JP |
113 | BuildRequires: libva-drm-devel |
114 | %{?with_wayland:BuildRequires: libva-wayland-devel} | |
115 | %{?with_x11:BuildRequires: libva-x11-devel} | |
116 | %if %{with x11} && %{without gles} | |
5a2f2b01 | 117 | BuildRequires: libvdpau-devel |
9ba2f18c | 118 | %endif |
8fa5c2e4 | 119 | BuildRequires: libxml2-devel >= 2.0 |
501e1d3e | 120 | BuildRequires: libxslt-devel |
9ba2f18c JP |
121 | BuildRequires: lirc-devel |
122 | BuildRequires: lzo-devel >= 2 | |
5a2f2b01 | 123 | BuildRequires: mysql-devel |
9ba2f18c | 124 | BuildRequires: openssl-devel >= 1.0.2 |
63ff963e | 125 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 126 | BuildRequires: pkgconfig |
9ba2f18c JP |
127 | BuildRequires: pulseaudio-devel >= 11.0.0 |
128 | BuildRequires: python3-devel >= 1:3.8 | |
129 | BuildRequires: rapidjson-devel >= 1.1.0 | |
400c2356 | 130 | BuildRequires: rpm-build >= 4.6 |
3a71016a | 131 | BuildRequires: rpm-pythonprov |
9ba2f18c | 132 | BuildRequires: rpmbuild(macros) >= 2.007 |
c462fd57 | 133 | BuildRequires: sed >= 4.0 |
9ba2f18c | 134 | BuildRequires: spdlog-devel >= 1.5.0 |
18b90c81 | 135 | BuildRequires: sqlite3-devel |
37fbe511 | 136 | BuildRequires: swig |
9ba2f18c | 137 | BuildRequires: taglib-devel >= 1.9.0 |
8fa5c2e4 | 138 | BuildRequires: tinyxml-devel >= 2.6.2 |
b85db44b | 139 | BuildRequires: udev-devel |
9ba2f18c JP |
140 | %if %{with wayland} |
141 | BuildRequires: wayland-protocols >= 1.7 | |
142 | BuildRequires: waylandpp-devel >= 0.2.2 | |
143 | %endif | |
144 | %if %{with x11} | |
b85db44b AF |
145 | BuildRequires: xorg-lib-libX11-devel |
146 | BuildRequires: xorg-lib-libXext-devel | |
18b90c81 | 147 | BuildRequires: xorg-lib-libXrandr-devel |
9ba2f18c JP |
148 | %endif |
149 | %if %{with gbm} || %{with wayland} | |
150 | BuildRequires: xorg-lib-libxkbcommon-devel >= 0.4.1 | |
151 | %endif | |
18b90c81 | 152 | BuildRequires: zlib-devel |
9ba2f18c | 153 | Requires: %{name}-common = %{version}-%{release} |
9ba2f18c JP |
154 | Requires: alsa-lib >= 1.0.27 |
155 | Requires: desktop-file-utils | |
156 | Requires: ffmpeg-libs >= 4.3 | |
157 | Requires: flatbuffers >= 1.9.0 | |
158 | Requires: hicolor-icon-theme | |
159 | Requires: libbluray >= 0.9.3 | |
160 | Requires: libcdio >= 2.1.0 | |
161 | Requires: libcdio-c++ >= 2.1.0 | |
162 | Requires: libcec >= 3.0.0 | |
163 | Requires: libdrm >= 2.4.95 | |
164 | %{?with_dvdcss:Requires: libdvdcss >= 1.4.1} | |
165 | Requires: libfmt >= 6.1.2 | |
166 | Requires: libmicrohttpd >= 0.9.40 | |
167 | Requires: libplist >= 2.0 | |
168 | Requires: libudfread >= 1.0.0 | |
a58652d4 | 169 | Requires: lsb-release |
9ba2f18c JP |
170 | Requires: openssl >= 1.0.2 |
171 | Requires: pulseaudio-libs >= 11.0.0 | |
172 | Requires: spdlog >= 1.5.0 | |
173 | Requires: taglib >= 1.9.0 | |
174 | Requires: tinyxml >= 2.6.2 | |
175 | %{?with_wayland:Requires: waylandpp >= 0.2.2} | |
176 | %if %{with gbm} || %{with wayland} | |
177 | Requires: xorg-lib-libxkbcommon >= 0.4.1 | |
178 | %endif | |
92b53b2c | 179 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
180 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
181 | ||
021fb2ec JP |
182 | # debug enabled causes oom on i686/x32 |
183 | %define _enable_debug_packages 0 | |
184 | ||
18b90c81 | 185 | %description |
d61811e9 ER |
186 | Kodi Entertainment Center (formerly XBMC) is a free and open-source |
187 | media player software developed by the XBMC Foundation, a non-profit | |
188 | technology consortium. Kodi is available for multiple operating | |
189 | systems and hardware platforms, with a software 10-foot user interface | |
190 | for use with televisions and remote controls. It allows users to play | |
191 | and view most videos, music, such as podcasts from the internet, and | |
192 | all common digital media files from local and network storage media. | |
18b90c81 | 193 | |
9ba2f18c JP |
194 | %package common |
195 | Summary: Common files for Kodi | |
196 | BuildArch: noarch | |
197 | ||
198 | %description common | |
199 | Common files for Kodi. | |
200 | ||
201 | %package devel | |
202 | Summary: Header files for Kodi | |
203 | Group: Development/Libraries | |
204 | Requires: %{name}-common = %{version}-%{release} | |
205 | ||
206 | %description devel | |
207 | Header files for Kodi. | |
208 | ||
18b90c81 | 209 | %prep |
2d334bbb | 210 | %setup -q -n xbmc-%{version}%{?subver}-%{codename} |
9ba2f18c | 211 | %patch0 -p1 |
af2a7b89 | 212 | %patch1 -p1 |
18b90c81 | 213 | |
8fa5c2e4 | 214 | %{__rm} -r lib/win32 |
5d47de93 | 215 | |
72cf5436 | 216 | %if %{without system_ffmpeg} |
c3c3c480 | 217 | #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz |
928406b7 ER |
218 | %endif |
219 | ||
18b90c81 | 220 | %build |
9ba2f18c JP |
221 | %cmake -B build \ |
222 | -DAPP_RENDER_SYSTEM=%{!?with_gles:gl}%{?with_gles:gles} \ | |
223 | -DCORE_PLATFORM_NAME="%{?with_gbm:GBM;}%{?with_x11:X11;}%{?with_wayland:WAYLAND;}" \ | |
224 | %{cmake_on_off airtunes ENABLE_AIRTUNES} \ | |
225 | %{cmake_on_off dvdcss ENABLE_DVDCSS} \ | |
226 | -DENABLE_INTERNAL_CROSSGUID:BOOL=OFF \ | |
227 | -DENABLE_INTERNAL_DAV1D:BOOL=OFF \ | |
9b1af85b | 228 | -DENABLE_INTERNAL_FFMPEG:BOOL=%{?with_system_ffmpeg:OFF}%{!?with_system_ffmpeg:ON} \ |
9ba2f18c JP |
229 | -DENABLE_INTERNAL_FLATBUFFERS:BOOL=OFF \ |
230 | -DENABLE_INTERNAL_FMT:BOOL=OFF \ | |
231 | -DENABLE_INTERNAL_FSTRCMP:BOOL=OFF \ | |
232 | -DENABLE_INTERNAL_LIBDVD:BOOL=OFF \ | |
233 | -DENABLE_INTERNAL_RapidJSON:BOOL=OFF \ | |
234 | -DENABLE_INTERNAL_SPDLOG:BOOL=OFF \ | |
235 | -DENABLE_INTERNAL_UDFREAD:BOOL=OFF \ | |
b99e5c75 | 236 | %{cmake_on_off gold ENABLE_LDGOLD} \ |
9ba2f18c JP |
237 | -DENABLE_TESTING:BOOL=OFF \ |
238 | %{cmake_on_off optical_drive ENABLE_OPTICAL} \ | |
239 | %{cmake_on_off upnp ENABLE_UPNP} \ | |
240 | %{cmake_on_off avx ENABLE_AVX} \ | |
241 | %{cmake_on_off avx2 ENABLE_AVX2} \ | |
242 | %{cmake_on_off neon ENABLE_NEON} \ | |
243 | %{cmake_on_off sse ENABLE_SSE} \ | |
244 | %{cmake_on_off sse2 ENABLE_SSE2} \ | |
245 | %{cmake_on_off sse3 ENABLE_SSE3} \ | |
246 | %{cmake_on_off ssse3 ENABLE_SSSE3} \ | |
247 | %{cmake_on_off sse41 ENABLE_SSE4_1} \ | |
248 | %{cmake_on_off sse42 ENABLE_SSE4_2} | |
68612b1e | 249 | |
9ba2f18c | 250 | %{__make} -C build |
18b90c81 SP |
251 | |
252 | %install | |
253 | rm -rf $RPM_BUILD_ROOT | |
9ba2f18c | 254 | |
f82242a8 JP |
255 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/addons |
256 | ||
be17bf9f | 257 | %{__make} -C build install \ |
92b96980 | 258 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 259 | |
005f83ba | 260 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md} |
e36884e8 ER |
261 | |
262 | # not packaged | |
263 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml | |
25890c53 | 264 | |
18b90c81 SP |
265 | %clean |
266 | rm -rf $RPM_BUILD_ROOT | |
267 | ||
9ba2f18c JP |
268 | %post |
269 | %update_icon_cache hicolor | |
270 | %update_desktop_database | |
271 | ||
272 | %postun | |
273 | %update_icon_cache hicolor | |
274 | %update_desktop_database_postun | |
275 | ||
18b90c81 SP |
276 | %files |
277 | %defattr(644,root,root,755) | |
005f83ba | 278 | %doc README.md docs/README.Linux.md |
9ba2f18c | 279 | %attr(755,root,root) %{_bindir}/JsonSchemaBuilder |
e36884e8 | 280 | %attr(755,root,root) %{_bindir}/TexturePacker |
25890c53 ER |
281 | %attr(755,root,root) %{_bindir}/kodi |
282 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
9ba2f18c JP |
283 | %{_datadir}/%{name}/addons |
284 | %{_datadir}/%{name}/media | |
285 | %{_datadir}/%{name}/privacy-policy.txt | |
286 | %{_datadir}/%{name}/system | |
287 | %{_datadir}/%{name}/userdata | |
92b96980 | 288 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
289 | %{_desktopdir}/kodi.desktop |
290 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
9ba2f18c | 291 | %{_datadir}/metainfo/org.xbmc.kodi.metainfo.xml |
25890c53 | 292 | %{_datadir}/xsessions/kodi.desktop |
9ba2f18c JP |
293 | |
294 | %files common | |
295 | %defattr(644,root,root,755) | |
296 | %dir %{_datadir}/%{name} | |
297 | ||
298 | %files devel | |
299 | %defattr(644,root,root,755) | |
300 | %{_includedir}/kodi | |
301 | %{_datadir}/%{name}/cmake |