diff --git a/fedora/SPECS/kodi.spec b/fedora/SPECS/kodi.spec index 638bd0f..04a01d3 100644 --- a/fedora/SPECS/kodi.spec +++ b/fedora/SPECS/kodi.spec @@ -1,8 +1,8 @@ %global PRERELEASE r %global myRELEASE 1 +%global DIRVERSION %{version} #global GITCOMMIT Gotham_r2-ge988513 # use the line below for pre-releases -%global DIRVERSION %{version} %global _hardened_build 1 # We support hte following options: @@ -16,12 +16,15 @@ %if 0%{?fedora} # (libbluray in EPEL 6 is too old.) %global _with_libbluray 1 +%if 0%{?fedora} < 31 %global _with_cwiid 1 +%else +%global _with_cwiid 0 +%endif %global _with_libssh 1 %global _with_libcec 1 +%global _with_external_ffmpeg 1 %global _with_wayland 1 -# only enable it, if you have a nvidia gpu! -%global _with_nvidia_ffmpeg 0 %endif %if 0%{?_with_wayland} %global kodi_backends x11 wayland gbm @@ -31,7 +34,7 @@ Name: kodi Version: 18.6 -Release: 101.%{myRELEASE}.%{PRERELEASE}%{?dist} +Release: 102.%{myRELEASE}.%{PRERELEASE}%{?dist} Summary: Media center License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT @@ -57,6 +60,11 @@ Source3: kodi-libdvdread-6.0.0-Leia-Alpha-3.tar.gz Source4: kodi-libdvdcss-1.4.2-Leia-Beta-5.tar.gz %endif +%if ! 0%{?_with_external_ffmpeg} +# wget -O ffmpeg-4.0.4-Leia-18.4.tar.gz https://github.com/xbmc/FFmpeg/archive/4.0.4-Leia-18.4.tar.gz +Source5: ffmpeg-4.0.4-Leia-18.4.tar.gz +%endif + # Set program version parameters Patch1: kodi-18.0-versioning.patch @@ -72,6 +80,12 @@ Patch3: kodi-18-annobin-workaround.patch Patch4: kodi-18-python3-0001.patch Patch5: kodi-18-python3-0002.patch +# Fix missing include (gcc requirement) +Patch6: kodi-18-assert.patch + +# Workaround for brp-mangle-shebangs behavior (RHBZ#1787088) +Patch7: kodi-18-brp-mangle-shebangs.patch + %ifarch x86_64 i686 %global _with_crystalhd 1 %endif @@ -79,8 +93,6 @@ Patch5: kodi-18-python3-0002.patch # Upstream does not support ppc64 ExcludeArch: %{power64} -BuildRequires: SDL2-devel -BuildRequires: SDL_image-devel BuildRequires: a52dec-devel BuildRequires: afpfs-ng-devel BuildRequires: alsa-lib-devel @@ -100,10 +112,10 @@ BuildRequires: enca-devel BuildRequires: expat-devel BuildRequires: faad2-devel BuildRequires: firewalld-filesystem -%if 0%{?_with_nvidia_ffmpeg} -BuildRequires: ffmpeg-nvidia-devel -%else +%if 0%{?_with_external_ffmpeg} BuildRequires: ffmpeg-devel +%else +BuildRequires: trousers-devel %endif BuildRequires: flac-devel BuildRequires: flatbuffers-devel @@ -151,6 +163,7 @@ BuildRequires: libcrystalhd-devel %endif BuildRequires: libcurl-devel BuildRequires: libdca-devel +BuildRequires: libdrm-devel BuildRequires: libidn2-devel BuildRequires: libinput-devel %if 0%{?el6} @@ -227,14 +240,6 @@ Requires: %{name}-common = %{version}-%{release} Requires: (%{name}-wayland = %{version}-%{release} if libwayland-server) Requires: (%{name}-x11 = %{version}-%{release} if xorg-x11-server-Xorg) Requires: (%{name}-firewalld = %{version}-%{release} if firewalld) -%if 0%{?_with_nvidia_ffmpeg} -Requires: ffmpeg-nvidia -Requires: ffmpeg-nvidia-libs -%else -Requires: ffmpeg -Requires: ffmpeg-libs -%endif - %description @@ -369,6 +374,9 @@ This package contains the Kodi binary for X11 servers. %patch5 -p1 -b.python3-0002 %endif +%patch6 -p1 -b.assert +%patch7 -p1 -b.brp-mangle-shebangs + # Fix up Python shebangs %if 0%{?fedora} > 31 pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ @@ -400,8 +408,12 @@ do -DLIBDVDCSS_URL=%{SOURCE4} \ %else -DENABLE_DVDCSS=OFF \ +%endif +%if ! 0%{?_with_external_ffmpeg} + -DFFMPEG_URL=%{SOURCE5} \ %endif -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DENABLE_DEBUGFISSION=OFF \ -GNinja \ -DENABLE_EVENTCLIENTS=ON \ -DENABLE_INTERNAL_CROSSGUID=OFF \ @@ -438,9 +450,6 @@ done # remove the doc files from unversioned /usr/share/doc/xbmc, they should be in versioned docdir rm -r $RPM_BUILD_ROOT/%{_datadir}/doc/ -#rm -f ${RPM_BUILD_ROOT}%{_libdir}/debug/usr/bin/*.debug -#/usr/lib/debug/usr/bin/kodi-wiiremote-18.4-99.1.r.fc31.x86_64.debug - desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ $RPM_BUILD_ROOT%{_datadir}/applications/kodi.desktop @@ -456,6 +465,8 @@ ln -s %{python3_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.modul %else ln -s %{python2_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL %endif +#install -d $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib +#ln -s %{python2_sitearch}/pysqlite2 $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib/pysqlite2 # Use external font files instead of bundled ones ln -sf %{_fontbasedir}/dejavu/DejaVuSans-Bold.ttf ${RPM_BUILD_ROOT}%{_datadir}/kodi/addons/skin.estouchy/fonts/