diff --git a/fedora/SPECS/kodi.spec b/fedora/SPECS/kodi.spec index 874f601..e2e24b4 100644 --- a/fedora/SPECS/kodi.spec +++ b/fedora/SPECS/kodi.spec @@ -17,7 +17,11 @@ %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 @@ -30,7 +34,7 @@ %endif Name: kodi -Version: 18.3 +Version: 18.4 Release: 99.%{myRELEASE}.%{PRERELEASE}%{?dist} Summary: Media center @@ -53,27 +57,36 @@ Source2: kodi-libdvdnav-6.0.0-Leia-Alpha-3.tar.gz # wget -O kodi-libdvdread-6.0.0-Leia-Alpha-3.tar.gz https://github.com/xbmc/libdvdread/archive/6.0.0-Leia-Alpha-3.tar.gz Source3: kodi-libdvdread-6.0.0-Leia-Alpha-3.tar.gz %if %{with dvdcss} -# wget -O kodi-libdvdcss-1.4.1-Leia-Alpha-3.tar.gz https://github.com/xbmc/libdvdcss/archive/1.4.1-Leia-Alpha-3.tar.gz -Source4: kodi-libdvdcss-1.4.1-Leia-Alpha-3.tar.gz +# wget -O kodi-libdvdcss-1.4.2-Leia-Beta-5.tar.gz https://github.com/xbmc/libdvdcss/archive/1.4.2-Leia-Beta-5.tar.gz +Source4: kodi-libdvdcss-1.4.2-Leia-Beta-5.tar.gz %endif %if ! 0%{?_with_external_ffmpeg} -# wget -O ffmpeg-4.0.2-Leia-Alpha3.tar.gz https://github.com/xbmc/FFmpeg/archive/4.0.2-Leia-Alpha3.tar.gz -Source5: ffmpeg-4.0.2-Leia-Alpha3.tar.gz +# 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 -# fix assert at startup -Patch2: kodi-18a1-assert.patch +# Prevent trousers from being linked, which breaks Samba +Patch2: kodi-18-trousers.patch + +# Fix an annobin issue +Patch3: kodi-18-annobin-workaround.patch + +# Python 3 support +# https://github.com/xbmc/xbmc/commits/feature_python3 +# https://github.com/xbmc/xbmc/issues/16560 +Patch4: kodi-18-python3-0001.patch +Patch5: kodi-18-python3-0002.patch %ifarch x86_64 i686 %global _with_crystalhd 1 %endif # Upstream does not support ppc64 -ExcludeArch: %{power64} ppc64le +ExcludeArch: %{power64} BuildRequires: SDL2-devel BuildRequires: SDL_image-devel @@ -83,7 +96,7 @@ BuildRequires: avahi-devel BuildRequires: bluez-libs-devel BuildRequires: boost-devel BuildRequires: bzip2-devel -BuildRequires: cmake +BuildRequires: cmake3 BuildRequires: crossguid-devel %if 0%{?_with_cwiid} BuildRequires: cwiid-devel @@ -97,6 +110,8 @@ BuildRequires: faad2-devel BuildRequires: firewalld-filesystem %if 0%{?_with_external_ffmpeg} BuildRequires: ffmpeg-devel +%else +BuildRequires: trousers-devel %endif BuildRequires: flac-devel BuildRequires: flatbuffers-devel @@ -170,6 +185,7 @@ BuildRequires: libssh-devel %endif BuildRequires: libtiff-devel BuildRequires: libtool +BuildRequires: libunistring-devel BuildRequires: libuuid-devel BuildRequires: libva-devel BuildRequires: libvdpau-devel @@ -179,17 +195,24 @@ BuildRequires: libxkbcommon-devel %endif BuildRequires: libxml2-devel BuildRequires: libxslt-devel +BuildRequires: lirc-devel BuildRequires: lzo-devel BuildRequires: mariadb-devel BuildRequires: mesa-libEGL-devel BuildRequires: mesa-libGLES-devel BuildRequires: mesa-libgbm-devel BuildRequires: nasm +BuildRequires: ninja-build BuildRequires: pcre-devel BuildRequires: pixman-devel BuildRequires: pulseaudio-libs-devel +%if 0%{?fedora} > 31 +BuildRequires: python3-devel +BuildRequires: python3-pillow +%else BuildRequires: python2-devel BuildRequires: python2-pillow +%endif BuildRequires: /usr/bin/pathfix.py BuildRequires: rapidjson-devel BuildRequires: sqlite-devel @@ -198,13 +221,11 @@ BuildRequires: systemd-devel BuildRequires: taglib-devel >= 1.10 BuildRequires: tinyxml-devel BuildRequires: tre-devel -BuildRequires: trousers-devel BuildRequires: wavpack-devel %if 0%{?_with_wayland} BuildRequires: wayland-protocols-devel BuildRequires: waylandpp-devel %endif -BuildRequires: libunistring-devel BuildRequires: yajl-devel BuildRequires: zlib-devel @@ -254,7 +275,11 @@ Requires: xorg-x11-utils # This is just symlinked to, but needed both at build-time # and for installation +%if 0%{?fedora} > 31 +Requires: python3-pillow%{?_isa} +%else Requires: python2-pillow%{?_isa} +%endif %description common Common Kodi files and binaries @@ -331,10 +356,24 @@ This package contains the Kodi binary for X11 servers. %prep %setup -q -n %{name}-%{DIRVERSION} -#%patch1 -p1 -b.versioning -#%patch2 -p1 -b.assert +%patch1 -p1 -b.versioning +%patch2 -p1 -b.trousers + +%if 0%{?fedora} > 29 +%patch3 -p1 -b.innobinfix +%endif + +%if 0%{?fedora} > 31 +%patch4 -p1 -b.python3-0001 +%patch5 -p1 -b.python3-0002 +%endif + # Fix up Python shebangs +%if 0%{?fedora} > 31 +pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ +%else pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \ +%endif tools/EventClients/lib/python/zeroconf.py \ tools/EventClients/Clients/PS3BDRemote/ps3_remote.py \ tools/EventClients/lib/python/ps3/sixaxis.py \ @@ -350,7 +389,7 @@ mkdir {fedora-gbm,fedora-wayland,fedora-x11} for BACKEND in %{kodi_backends} do pushd fedora-$BACKEND -%cmake \ +%cmake3 \ %if %{with dvdcss} -DLIBDVDCSS_URL=%{SOURCE4} \ %else @@ -359,12 +398,18 @@ do %if ! 0%{?_with_external_ffmpeg} -DFFMPEG_URL=%{SOURCE5} \ %endif + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -GNinja \ -DENABLE_EVENTCLIENTS=ON \ -DENABLE_INTERNAL_CROSSGUID=OFF \ -DLIRC_DEVICE=/var/run/lirc/lircd \ -DLIBDVDNAV_URL=%{SOURCE2} \ -DLIBDVDREAD_URL=%{SOURCE3} \ +%if 0%{?fedora} > 31 + -DPYTHON_EXECUTABLE=%{__python3} \ +%else -DPYTHON_EXECUTABLE=%{__python2} \ +%endif -DCORE_PLATFORM_NAME=$BACKEND \ %ifarch x86_64 i686 -DWAYLAND_RENDER_SYSTEM=gl \ @@ -374,7 +419,7 @@ do -DGBM_RENDER_SYSTEM=gles \ %endif ../ - cmake --build . -- VERBOSE=1 %{?_smp_mflags} + %ninja_build popd done @@ -383,7 +428,7 @@ done for BACKEND in %{kodi_backends} do pushd fedora-$BACKEND - make DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags} install + %ninja_install popd done @@ -400,7 +445,11 @@ rm -f $RPM_BUILD_ROOT/%{_datadir}/xsessions/xbmc.desktop # Normally we are expected to build these manually. But since we are using # the system Python interpreter, we also want to use the system libraries install -d $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib +%if 0%{?fedora} > 31 +ln -s %{python3_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL +%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 @@ -411,6 +460,11 @@ ln -sf %{_fontbasedir}/dejavu/DejaVuSans-Bold.ttf ${RPM_BUILD_ROOT}%{_datadir}/k mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/ mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/ +# Remove wiiremote man page if support was disabled +%if ! 0%{?_with_cwiid} +rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/kodi-wiiremote.1 +%endif + %post firewalld %firewalld_reload @@ -443,15 +497,23 @@ mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/ %files eventclients %license LICENSE.md LICENSES/ +%if 0%{?fedora} > 31 +%{python3_sitelib}/kodi +%else %{python2_sitelib}/kodi +%endif %dir %{_datadir}/pixmaps/kodi %{_datadir}/pixmaps/kodi/*.png %{_bindir}/kodi-ps3remote %{_bindir}/kodi-send +%if 0%{?_with_cwiid} %{_bindir}/kodi-wiiremote +%endif %{_mandir}/man1/kodi-ps3remote.1.gz %{_mandir}/man1/kodi-send.1.gz +%if 0%{?_with_cwiid} %{_mandir}/man1/kodi-wiiremote.1.gz +%endif %files eventclients-devel @@ -479,6 +541,9 @@ mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/ %changelog +* Sat Sep 14 2019 Daniel Steiner +- Update to 18.4 + * Wed Jun 19 2019 Daniel Steiner - Update to 18.3