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