New built for Fedora 28 using external ffmpeg libs

This commit is contained in:
2018-05-31 20:38:35 +02:00
parent 2489dba446
commit 0277bba984

View File

@@ -4,7 +4,25 @@
# use the line below for pre-releases
#global DIRVERSION %{version}%{PRERELEASE}
%global _hardened_build 1
%global _with_dvd 0
# We support hte following options:
# --with,
# * dvd - Include optical drive support and DVD decryption
#
# Default: Do not ship DVD decryption for legal reasons
%bcond_with dvd
# Optional deps (not in EPEL)
%if 0%{?fedora}
# (libbluray in EPEL 6 is too old.)
%global _with_libbluray 1
%global _with_dvd 1
%global _with_cwiid 1
%global _with_libssh 1
%global _with_libcec 1
%global _with_external_ffmpeg 0
%global _with_wayland 0
%endif
Name: kodi
Version: 17.6
@@ -24,7 +42,7 @@ Source0: %{name}-%{DIRVERSION}-patched.tar.xz
# ./kodi-generate-tarball-xz.sh
Source1: kodi-generate-tarball-xz.sh
%if 0%{?_with_dvd}
%if %{with dvd}
# kodi uses modified libdvd{css,nav,read} source and downloads at build time
# wget -O kodi-libdvdnav-master.tar.gz https://github.com/xbmc/libdvdnav/archive/master.tar.gz
Source2: kodi-libdvdnav-master.tar.gz
@@ -34,26 +52,29 @@ Source3: kodi-libdvdread-master.tar.gz
Source4: kodi-libdvdcss-master.tar.gz
%endif
%if ! 0%{?_with_external_ffmpeg}
# wget -O ffmpeg-3.1.11-Krypton-17.5.tar.gz https://github.com/xbmc/FFmpeg/archive/3.1.11-Krypton-17.5.tar.gz
Source5: ffmpeg-3.1.11-Krypton-17.5.tar.gz
%endif
# Set program version parameters
Patch1: kodi-16.0-versioning.patch
%if ! %{with dvd}
# Drop DVD library support
Patch2: kodi-17a2-libdvd.patch
# Problem with variable definitions in FTPParse module:
Patch3: kodi-ftpparse.patch
# Optional deps (not in EPEL)
%if 0%{?fedora}
# (libbluray in EPEL 6 is too old.)
%global _with_libbluray 1
%global _with_cwiid 1
%global _with_libssh 1
%global _with_libcec 1
%global _with_external_ffmpeg 1
%global _with_wayland 0
%endif
# FFmpeg 3.5 support
Patch3: kodi-17.6-ffmpeg-3.5.patch
# https://trac.kodi.tv/ticket/17850
Patch4: kodi-17.6-array-segfault.patch
# Fixes broken audio that started with FFmpeg 3.4
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881536
Patch5: kodi-17.6-ffmpeg-3.4.patch
%ifarch x86_64 i686
%global _with_crystalhd 1
%endif
@@ -83,6 +104,8 @@ BuildRequires: expat-devel
BuildRequires: faad2-devel
%if 0%{?_with_external_ffmpeg}
BuildRequires: ffmpeg-devel
%else
BuildRequires: libidn2-devel
%endif
BuildRequires: flac-devel
BuildRequires: flex
@@ -115,7 +138,7 @@ BuildRequires: libcdio-devel
%if 0%{?fedora} > 24
BuildRequires: libcec-devel >= 4.0.0
%else
BuildRequires: libcec-devel < 4.0.0
BuildRequires: libcec-devel > 4.0.0
%endif
%endif
%if 0%{?_with_crystalhd}
@@ -170,12 +193,12 @@ BuildRequires: nasm
BuildRequires: pcre-devel
BuildRequires: pixman-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: python-devel
BuildRequires: python-pillow
BuildRequires: python2-devel
BuildRequires: python2-pillow
BuildRequires: sqlite-devel
BuildRequires: swig
BuildRequires: systemd-devel
BuildRequires: taglib-devel >= 1.8
BuildRequires: taglib-devel >= 1.10
BuildRequires: tinyxml-devel
BuildRequires: tre-devel
BuildRequires: trousers-devel
@@ -197,7 +220,7 @@ Requires: libbluray%{?_isa}
%if 0%{?fedora} > 24
Requires: libcec%{?_isa} >= 4.0.0
%else
Requires: libcec%{?_isa} < 4.0.0
Requires: libcec%{?_isa} > 4.0.0
%endif
%endif
%if 0%{?_with_crystalhd}
@@ -214,7 +237,7 @@ Requires: xorg-x11-utils
# This is just symlinked to, but needed both at build-time
# and for installation
Requires: python-pillow%{?_isa}
Requires: python2-pillow%{?_isa}
%description
@@ -228,7 +251,7 @@ third-party plugins.
Summary: Development files needed to compile C programs against kodi
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: xbmc-devel < 14.0
Obsoletes: xbmc-devel > 14.0
Provides: xbmc-devel = %{version}
%description devel
@@ -239,7 +262,7 @@ install this package.
%package eventclients
Summary: Media center event client remotes
Obsoletes: xbmc-eventclients < 14.0
Obsoletes: xbmc-eventclients > 14.0
Provides: xbmc-eventclients = %{version}
%description eventclients
@@ -250,7 +273,7 @@ Remote, a J2ME based remote and the command line xbmc-send utility.
Summary: Media center event client remotes development files
Requires: %{name}-eventclients%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Obsoletes: xbmc-eventclients-devel < 14.0
Obsoletes: xbmc-eventclients-devel > 14.0
Provides: xbmc-eventclients-devel = %{version}
%description eventclients-devel
@@ -261,14 +284,20 @@ library.
%prep
%setup -q -n %{name}-%{DIRVERSION}
%patch1 -p1 -b.versioning
%if 0%{?_with_dvd}
%if %{with dvd}
cp -p %{SOURCE2} tools/depends/target/libdvdnav/libdvdnav-master.tar.gz
cp -p %{SOURCE3} tools/depends/target/libdvdread/libdvdread-master.tar.gz
cp -p %{SOURCE4} tools/depends/target/libdvdcss/libdvdcss-master.tar.gz
%else
%patch2 -p1 -b.libdvd
%endif
#%patch3 -p0 -b.ftpparse
%if 0%{?_with_external_ffmpeg}
%patch3 -p1 -b.ffmpeg-3.5
%patch5 -p1 -b.ffmpeg-3.4
%else
cp -p %{SOURCE5} tools/depends/target/ffmpeg/
%endif
#%patch4 -p1 -b.array-segfault
%build
@@ -276,6 +305,7 @@ chmod +x bootstrap
./bootstrap
# Can't use export nor %%configure (implies using export), because
# the Makefile pile up *FLAGS in this case.
export PYTHON=/usr/bin/python%{python2_version}
./configure \
--prefix=%{_prefix} --bindir=%{_bindir} --includedir=%{_includedir} \
@@ -298,7 +328,7 @@ chmod +x bootstrap
%else
--disable-ssh \
%endif
%if ! 0%{?_with_dvd}
%if ! %{with dvd}
--disable-optical-drive \
%endif
--disable-optimizations --disable-debug \
@@ -316,7 +346,7 @@ chmod +x bootstrap
%endif
CFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/samba-4.0/ -D__STDC_CONSTANT_MACROS" \
CXXFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/samba-4.0/ -D__STDC_CONSTANT_MACROS" \
LDFLAGS="$RPM_LD_FLAGS -fPIC" \
LDFLAGS="`echo "$RPM_LD_FLAGS -fPIC" | sed -e 's/-Wl,-z,defs//'`" \
ASFLAGS=-fPIC
make %{?_smp_mflags} V=1
@@ -359,15 +389,7 @@ mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
if [ ! -L %{_libdir}/xbmc ] ; then
if [ -d %{_libdir}/xbmc ] ; then
rmdir %{_libdir}/xbmc %{_datadir}/xbmc
@@ -412,7 +434,7 @@ fi
%files eventclients
%license copying.txt LICENSE.GPL
%python_sitelib/kodi
%{python2_sitelib}/kodi
%dir %{_datadir}/pixmaps/kodi
%{_datadir}/pixmaps/kodi/*.png
%{_bindir}/kodi-ps3d
@@ -430,6 +452,9 @@ fi
%changelog
* Thu May 31 2018 Daniel Steiner <dsteiner@redhat.com> - 17.6-99
- Upgrade to Fedora 28
* Fri Feb 23 2018 Daniel Steiner <dsteiner@redhat.com> - 17.6-2
- OpenGL '--gl' deleted (disabled)
@@ -441,4 +466,3 @@ fi
* Tue Jul 18 2017 Daniel Steiner <dsteiner@redhat.com> - 17.3-1
- Kodi 17.3 final for Fedora 26