]> git.pld-linux.org Git - packages/kodi.git/blame - kodi.spec
- rel 2
[packages/kodi.git] / kodi.spec
CommitLineData
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
1653c9fe
JP
44%ifarch %{x8664} x32
45%define kodi_arch x86_64-linux
46%endif
47%ifarch %{x86}
48%define kodi_arch i486-linux
49%endif
50%ifnarch %{x8664} %{x86} x32
51%define kodi_arch %{_target_base_arch}
52%endif
9ba2f18c 53
9a409828
JP
54%define dvdread_ver 6.1.3-Next-Nexus-Alpha2-2
55%define dvdcss_ver 1.4.3-Next-Nexus-Alpha2-2
56%define dvdnav_ver 6.1.1-Next-Nexus-Alpha2-2
57
a06c8c4d
JR
58%define codename Omega
59%define subver b1
d61811e9 60Summary: Kodi is a free and open source media-player and entertainment hub
92b53b2c 61Name: kodi
a06c8c4d 62Version: 21.0
211379a9 63Release: 0.%{subver}.2
68612b1e 64License: GPL v2+ and GPL v3+
18b90c81 65Group: Applications/Multimedia
caf463a3 66#Source0Download: https://github.com/xbmc/xbmc/releases
a06c8c4d
JR
67Source0: https://github.com/xbmc/xbmc/archive/%{version}%{subver}-%{codename}.tar.gz
68# Source0-md5: cdd5ca2a3e81180a87996377f042978c
9a409828
JP
69Source1: https://github.com/xbmc/libdvdread/archive/%{dvdread_ver}/libdvdread-%{dvdread_ver}.tar.gz
70# Source1-md5: 0d24c950abfef9dc02e231dda56912ac
71Source2: https://github.com/xbmc/libdvdcss/archive/%{dvdcss_ver}/libdvdcss-%{dvdcss_ver}.tar.gz
72# Source2-md5: 42dc3770ae928103e8033a18b007e79d
73Source3: https://github.com/xbmc/libdvdnav/archive/%{dvdnav_ver}/libdvdnav-%{dvdnav_ver}.tar.gz
74# Source3-md5: 2349cde54d950af21fa4936371ad3349
9ba2f18c 75Patch0: disable-static.patch
8a2a31f2 76Patch1: xbmc-libfmt.patch
0ac32cd1 77URL: https://kodi.tv/
a983002d 78BuildRequires: EGL-devel
9ba2f18c
JP
79%{?with_gbm:BuildRequires: Mesa-libgbm-devel}
80# for eglextchromium.h
81%{?with_x11:BuildRequires: Mesa-libEGL-devel}
82%if %{without gles}
8fa5c2e4 83BuildRequires: OpenGL-GLU-devel
b85db44b 84BuildRequires: OpenGL-devel
9ba2f18c
JP
85%if %{with x11}
86BuildRequires: OpenGL-GLX-devel
87%endif
88%endif
89%{?with_gles:BuildRequires: OpenGLES-devel}
90BuildRequires: alsa-lib-devel >= 1.0.27
9a409828
JP
91BuildRequires: autoconf
92BuildRequires: automake
18b90c81 93BuildRequires: avahi-devel
b85db44b 94BuildRequires: bluez-libs-devel >= 4.99
9a409828 95BuildRequires: cmake >= 3.12
c3c3c480 96BuildRequires: crossguid-devel
18b90c81 97BuildRequires: curl-devel
9de0d888 98%{!?with_system_ffmpeg:BuildRequires: dav1d-devel}
18b90c81 99BuildRequires: dbus-devel
9ba2f18c
JP
100# 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
101%{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 4.3}
60818254 102BuildRequires: flatbuffers-devel >= 1.9.0
18b90c81
SP
103BuildRequires: fontconfig-devel
104BuildRequires: freetype-devel
105BuildRequires: fribidi-devel
9ba2f18c 106BuildRequires: fstrcmp-devel >= 0.7
0747666f 107BuildRequires: gettext-tools
9ba2f18c 108BuildRequires: giflib-devel >= 5
9a409828 109BuildRequires: harfbuzz-devel
d9a0b984 110BuildRequires: jre
20c6d413 111BuildRequires: lcms2-devel
b85db44b 112BuildRequires: libass-devel
a7c53f4c 113BuildRequires: libatomic-devel
9ba2f18c 114BuildRequires: libbluray-devel >= 0.9.3
37fbe511 115BuildRequires: libcap-devel
9ba2f18c
JP
116BuildRequires: libcdio-c++-devel >= 2.1.0
117BuildRequires: libcdio-devel >= 2.1.0
118BuildRequires: libcec-devel >= 3.0.0
a06c8c4d 119BuildRequires: libdisplay-info-devel
9ba2f18c 120BuildRequires: libdrm-devel >= 2.4.95
9ba2f18c
JP
121BuildRequires: libfmt-devel >= 6.1.2
122%{?with_gbm:BuildRequires: libinput-devel}
18b90c81 123BuildRequires: libjpeg-devel
88da6d7b 124BuildRequires: libmicrohttpd-devel >= 0.9.40
9ba2f18c
JP
125BuildRequires: libnfs-devel
126BuildRequires: libplist-devel >= 2.0
5a2f2b01 127BuildRequires: libpng-devel
18b90c81 128BuildRequires: libsmbclient-devel
9ba2f18c 129BuildRequires: libstdc++-devel >= 6:5
9a409828 130BuildRequires: libtool
9ba2f18c 131BuildRequires: libudfread-devel >= 1.0.0
f99f2533 132BuildRequires: libuuid-devel
b85db44b 133BuildRequires: libva-devel
9ba2f18c
JP
134BuildRequires: libva-drm-devel
135%{?with_wayland:BuildRequires: libva-wayland-devel}
136%{?with_x11:BuildRequires: libva-x11-devel}
137%if %{with x11} && %{without gles}
5a2f2b01 138BuildRequires: libvdpau-devel
9ba2f18c 139%endif
8fa5c2e4 140BuildRequires: libxml2-devel >= 2.0
501e1d3e 141BuildRequires: libxslt-devel
9ba2f18c
JP
142BuildRequires: lirc-devel
143BuildRequires: lzo-devel >= 2
5a2f2b01 144BuildRequires: mysql-devel
9a409828 145BuildRequires: openssl-devel >= 1.1.0
63ff963e 146BuildRequires: pcre-cxx-devel
9a409828 147BuildRequires: pipewire-devel
5a2f2b01 148BuildRequires: pkgconfig
9ba2f18c
JP
149BuildRequires: pulseaudio-devel >= 11.0.0
150BuildRequires: python3-devel >= 1:3.8
151BuildRequires: rapidjson-devel >= 1.1.0
400c2356 152BuildRequires: rpm-build >= 4.6
3a71016a 153BuildRequires: rpm-pythonprov
9ba2f18c 154BuildRequires: rpmbuild(macros) >= 2.007
c462fd57 155BuildRequires: sed >= 4.0
9ba2f18c 156BuildRequires: spdlog-devel >= 1.5.0
18b90c81 157BuildRequires: sqlite3-devel
37fbe511 158BuildRequires: swig
9ba2f18c 159BuildRequires: taglib-devel >= 1.9.0
a06c8c4d 160BuildRequires: tinyxml2-devel
b85db44b 161BuildRequires: udev-devel
9ba2f18c
JP
162%if %{with wayland}
163BuildRequires: wayland-protocols >= 1.7
164BuildRequires: waylandpp-devel >= 0.2.2
165%endif
166%if %{with x11}
b85db44b
AF
167BuildRequires: xorg-lib-libX11-devel
168BuildRequires: xorg-lib-libXext-devel
18b90c81 169BuildRequires: xorg-lib-libXrandr-devel
9ba2f18c
JP
170%endif
171%if %{with gbm} || %{with wayland}
172BuildRequires: xorg-lib-libxkbcommon-devel >= 0.4.1
173%endif
18b90c81 174BuildRequires: zlib-devel
9ba2f18c 175Requires: %{name}-common = %{version}-%{release}
9ba2f18c
JP
176Requires: alsa-lib >= 1.0.27
177Requires: desktop-file-utils
178Requires: ffmpeg-libs >= 4.3
9ba2f18c
JP
179Requires: hicolor-icon-theme
180Requires: libbluray >= 0.9.3
181Requires: libcdio >= 2.1.0
182Requires: libcdio-c++ >= 2.1.0
183Requires: libcec >= 3.0.0
184Requires: libdrm >= 2.4.95
9ba2f18c
JP
185Requires: libfmt >= 6.1.2
186Requires: libmicrohttpd >= 0.9.40
187Requires: libplist >= 2.0
188Requires: libudfread >= 1.0.0
a58652d4 189Requires: lsb-release
9a409828 190Requires: openssl >= 1.1.0
9ba2f18c
JP
191Requires: pulseaudio-libs >= 11.0.0
192Requires: spdlog >= 1.5.0
193Requires: taglib >= 1.9.0
194Requires: tinyxml >= 2.6.2
195%{?with_wayland:Requires: waylandpp >= 0.2.2}
196%if %{with gbm} || %{with wayland}
197Requires: xorg-lib-libxkbcommon >= 0.4.1
198%endif
92b53b2c 199Obsoletes: xbmc < 14.0
18b90c81
SP
200BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
201
021fb2ec
JP
202# debug enabled causes oom on i686/x32
203%define _enable_debug_packages 0
204
18b90c81 205%description
d61811e9
ER
206Kodi Entertainment Center (formerly XBMC) is a free and open-source
207media player software developed by the XBMC Foundation, a non-profit
208technology consortium. Kodi is available for multiple operating
209systems and hardware platforms, with a software 10-foot user interface
210for use with televisions and remote controls. It allows users to play
211and view most videos, music, such as podcasts from the internet, and
212all common digital media files from local and network storage media.
18b90c81 213
9ba2f18c
JP
214%package common
215Summary: Common files for Kodi
9ba2f18c
JP
216
217%description common
218Common files for Kodi.
219
220%package devel
221Summary: Header files for Kodi
222Group: Development/Libraries
223Requires: %{name}-common = %{version}-%{release}
224
225%description devel
226Header files for Kodi.
227
18b90c81 228%prep
9a409828 229%setup -q -n xbmc-%{version}%{?subver}-%{codename} -a1 -a2 -a3
a06c8c4d
JR
230#%patch0 -p1
231#%patch1 -p1
18b90c81 232
8fa5c2e4 233%{__rm} -r lib/win32
5d47de93 234
72cf5436 235%if %{without system_ffmpeg}
c3c3c480 236#ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
928406b7
ER
237%endif
238
18b90c81 239%build
9a409828
JP
240grep -q '^VERSION=%{dvdread_ver}$' tools/depends/target/libdvdread/LIBDVDREAD-VERSION
241grep -q '^VERSION=%{dvdcss_ver}$' tools/depends/target/libdvdcss/LIBDVDCSS-VERSION
242grep -q '^VERSION=%{dvdnav_ver}$' tools/depends/target/libdvdnav/LIBDVDNAV-VERSION
243
9ba2f18c 244%cmake -B build \
13059bc3 245 -DHOST_CAN_EXECUTE_TARGET:BOOL=TRUE \
9a409828
JP
246 -DLIBDVDREAD_SOURCE_DIR=$(pwd)/libdvdread-%{dvdread_ver} \
247 -DLIBDVDCSS_SOURCE_DIR=$(pwd)/libdvdcss-%{dvdcss_ver} \
248 -DLIBDVDNAV_SOURCE_DIR=$(pwd)/libdvdnav-%{dvdnav_ver} \
9ba2f18c
JP
249 -DAPP_RENDER_SYSTEM=%{!?with_gles:gl}%{?with_gles:gles} \
250 -DCORE_PLATFORM_NAME="%{?with_gbm:GBM;}%{?with_x11:X11;}%{?with_wayland:WAYLAND;}" \
251 %{cmake_on_off airtunes ENABLE_AIRTUNES} \
252 %{cmake_on_off dvdcss ENABLE_DVDCSS} \
253 -DENABLE_INTERNAL_CROSSGUID:BOOL=OFF \
254 -DENABLE_INTERNAL_DAV1D:BOOL=OFF \
9b1af85b 255 -DENABLE_INTERNAL_FFMPEG:BOOL=%{?with_system_ffmpeg:OFF}%{!?with_system_ffmpeg:ON} \
9ba2f18c
JP
256 -DENABLE_INTERNAL_FLATBUFFERS:BOOL=OFF \
257 -DENABLE_INTERNAL_FMT:BOOL=OFF \
258 -DENABLE_INTERNAL_FSTRCMP:BOOL=OFF \
9a409828
JP
259 -DENABLE_INTERNAL_NFS:BOOL=OFF \
260 -DENABLE_INTERNAL_PCRE:BOOL=OFF \
9ba2f18c
JP
261 -DENABLE_INTERNAL_RapidJSON:BOOL=OFF \
262 -DENABLE_INTERNAL_SPDLOG:BOOL=OFF \
9a409828 263 -DENABLE_INTERNAL_TAGLIB:BOOL=OFF \
9ba2f18c 264 -DENABLE_INTERNAL_UDFREAD:BOOL=OFF \
9a409828 265 %{cmake_on_off gold ENABLE_GOLD} \
9ba2f18c
JP
266 -DENABLE_TESTING:BOOL=OFF \
267 %{cmake_on_off optical_drive ENABLE_OPTICAL} \
268 %{cmake_on_off upnp ENABLE_UPNP} \
269 %{cmake_on_off avx ENABLE_AVX} \
270 %{cmake_on_off avx2 ENABLE_AVX2} \
271 %{cmake_on_off neon ENABLE_NEON} \
272 %{cmake_on_off sse ENABLE_SSE} \
273 %{cmake_on_off sse2 ENABLE_SSE2} \
274 %{cmake_on_off sse3 ENABLE_SSE3} \
275 %{cmake_on_off ssse3 ENABLE_SSSE3} \
276 %{cmake_on_off sse41 ENABLE_SSE4_1} \
e5419751 277 %{cmake_on_off sse42 ENABLE_SSE4_2} \
1653c9fe 278 -DWITH_ARCH=%{kodi_arch} \
e5419751 279 -DWITH_CPU=%{_target_cpu}
68612b1e 280
9ba2f18c 281%{__make} -C build
18b90c81
SP
282
283%install
284rm -rf $RPM_BUILD_ROOT
9ba2f18c 285
f82242a8
JP
286install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/addons
287
be17bf9f 288%{__make} -C build install \
92b96980 289 DESTDIR=$RPM_BUILD_ROOT
18b90c81 290
005f83ba 291%{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md}
e36884e8
ER
292
293# not packaged
294%{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
25890c53 295
bb922e70
JR
296# same as kodi-TexturePacker
297%{__rm} $RPM_BUILD_ROOT%{_bindir}/TexturePacker
298
18b90c81
SP
299%clean
300rm -rf $RPM_BUILD_ROOT
301
9ba2f18c
JP
302%post
303%update_icon_cache hicolor
304%update_desktop_database
305
306%postun
307%update_icon_cache hicolor
308%update_desktop_database_postun
309
18b90c81
SP
310%files
311%defattr(644,root,root,755)
005f83ba 312%doc README.md docs/README.Linux.md
25890c53 313%attr(755,root,root) %{_bindir}/kodi
9a409828 314%attr(755,root,root) %{_bindir}/kodi-TexturePacker
25890c53 315%attr(755,root,root) %{_bindir}/kodi-standalone
9ba2f18c
JP
316%{_datadir}/%{name}/addons
317%{_datadir}/%{name}/media
318%{_datadir}/%{name}/privacy-policy.txt
319%{_datadir}/%{name}/system
320%{_datadir}/%{name}/userdata
58a47115
JP
321%attr(755,root,root) %{_libdir}/%{name}/%{name}.bin
322%{?with_x11:%attr(755,root,root) %{_libdir}/%{name}/%{name}-xrandr}
323%dir %{_libdir}/%{name}/addons
324%dir %{_libdir}/%{name}/system
325%dir %{_libdir}/%{name}/system/players
326%dir %{_libdir}/%{name}/system/players/VideoPlayer
9a409828 327%attr(755,root,root) %{_libdir}/%{name}/system/players/VideoPlayer/libdvdnav-%{kodi_arch}.so
25890c53
ER
328%{_desktopdir}/kodi.desktop
329%{_iconsdir}/hicolor/*/apps/%{name}.png
9ba2f18c 330%{_datadir}/metainfo/org.xbmc.kodi.metainfo.xml
25890c53 331%{_datadir}/xsessions/kodi.desktop
bb922e70 332%{_datadir}/wayland-sessions/kodi-gbm.desktop
9ba2f18c
JP
333
334%files common
335%defattr(644,root,root,755)
58a47115 336%dir %{_libdir}/%{name}
9ba2f18c
JP
337%dir %{_datadir}/%{name}
338
339%files devel
340%defattr(644,root,root,755)
341%{_includedir}/kodi
58a47115 342%{_libdir}/%{name}/cmake
9ba2f18c 343%{_datadir}/%{name}/cmake
This page took 0.469047 seconds and 4 git commands to generate.