Merge branch 'fedora-28' of ssh://dev.daniel-steiner.org/srv/git/rpms into fedora-28

This commit is contained in:
2018-10-28 14:12:44 +01:00

View File

@@ -1,16 +1,16 @@
#global PRERELEASE rc4
%global DIRVERSION %{version}
%global PRERELEASE b4
#global DIRVERSION %{version}
#global GITCOMMIT Gotham_r2-ge988513
# use the line below for pre-releases
#global DIRVERSION %{version}%{PRERELEASE}
%global DIRVERSION %{version}%{PRERELEASE}
%global _hardened_build 1
# We support hte following options:
# --with,
# * dvd - Include optical drive support and DVD decryption
# * dvdcss - Include DVD decryption support
#
# Default: Do not ship DVD decryption for legal reasons
%bcond_with dvd
%bcond_with dvdcss
# Optional deps (not in EPEL)
%if 0%{?fedora}
@@ -20,12 +20,17 @@
%global _with_libssh 1
%global _with_libcec 1
%global _with_external_ffmpeg 1
%global _with_wayland 0
%global _with_wayland 1
%endif
%if 0%{?_with_wayland}
%global kodi_backends x11 wayland gbm
%else
%global kodi_backends x11 gbm
%endif
Name: kodi
Version: 17.6
Release: 9%{?dist}
Version: 18.0
Release: 0.10.b4%{?dist}
Summary: Media center
License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
@@ -41,46 +46,33 @@ Source0: %{name}-%{DIRVERSION}-patched.tar.xz
# ./kodi-generate-tarball-xz.sh
Source1: kodi-generate-tarball-xz.sh
%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
# wget -O kodi-libdvdread-master.tar.gz https://github.com/xbmc/libdvdread/archive/master.tar.gz
Source3: kodi-libdvdread-master.tar.gz
# wget -O kodi-libdvdcss-master.tar.gz https://github.com/xbmc/libdvdcss/archive/master.tar.gz
Source4: kodi-libdvdcss-master.tar.gz
# wget -O kodi-libdvdnav-6.0.0-Leia-Alpha-3.tar.gz https://github.com/xbmc/libdvdnav/archive/6.0.0-Leia-Alpha-3.tar.gz
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
%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
# 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
%endif
# Set program version parameters
Patch1: kodi-16.0-versioning.patch
Patch1: kodi-18.0-versioning.patch
%if ! %{with dvd}
# Drop DVD library support
Patch2: kodi-17a2-libdvd.patch
%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
# fix assert at startup
Patch2: kodi-18a1-assert.patch
%ifarch x86_64 i686
%global _with_crystalhd 1
%endif
# Upstream does not support ppc64
# ARM support is restricted to one GPU per build
ExclusiveArch: i686 x86_64
ExcludeArch: %{power64} ppc64le
BuildRequires: SDL2-devel
BuildRequires: SDL_image-devel
@@ -101,22 +93,27 @@ BuildRequires: e2fsprogs-devel
BuildRequires: enca-devel
BuildRequires: expat-devel
BuildRequires: faad2-devel
BuildRequires: firewalld-filesystem
%if 0%{?_with_external_ffmpeg}
BuildRequires: ffmpeg-devel
%else
BuildRequires: libidn2-devel
%endif
BuildRequires: flac-devel
BuildRequires: flatbuffers-devel
BuildRequires: flex
BuildRequires: fmt-devel
BuildRequires: fontconfig-devel
BuildRequires: fontpackages-devel
BuildRequires: freetype-devel
BuildRequires: fribidi-devel
BuildRequires: fstrcmp-devel
%if 0%{?el6}
BuildRequires: gettext-devel
%else
BuildRequires: gettext-autopoint
%endif
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: giflib-devel
BuildRequires: glew-devel
BuildRequires: glib2-devel
BuildRequires: gperf
@@ -145,6 +142,8 @@ BuildRequires: libcrystalhd-devel
%endif
BuildRequires: libcurl-devel
BuildRequires: libdca-devel
BuildRequires: libidn2-devel
BuildRequires: libinput-devel
%if 0%{?el6}
BuildRequires: libjpeg-devel
%else
@@ -171,29 +170,27 @@ BuildRequires: libssh-devel
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: libuuid-devel
%ifnarch %{arm}
BuildRequires: libva-devel
BuildRequires: libvdpau-devel
%endif
BuildRequires: libvorbis-devel
%if 0%{?_with_wayland}
BuildRequires: libwayland-client-devel
BuildRequires: libxkbcommon-devel
%endif
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: lzo-devel
BuildRequires: mariadb-devel
# ARM uses GLES
%ifarch %{arm}
BuildRequires: mesa-libEGL-devel
BuildRequires: mesa-libGLES-devel
%endif
BuildRequires: mesa-libgbm-devel
BuildRequires: nasm
BuildRequires: pcre-devel
BuildRequires: pixman-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: python2-devel
BuildRequires: python2-pillow
BuildRequires: /usr/bin/pathfix.py
BuildRequires: rapidjson-devel
BuildRequires: sqlite-devel
BuildRequires: swig
BuildRequires: systemd-devel
@@ -203,11 +200,30 @@ BuildRequires: tre-devel
BuildRequires: trousers-devel
BuildRequires: wavpack-devel
%if 0%{?_with_wayland}
BuildRequires: weston-devel
BuildRequires: wayland-protocols-devel
BuildRequires: waylandpp-devel
%endif
BuildRequires: yajl-devel
BuildRequires: zlib-devel
# Install major backends, users can remove them individually
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)
%description
Kodi is a free cross-platform media-player jukebox and entertainment hub.
Kodi can play a spectrum of of multimedia formats, and featuring playlist,
audio visualizations, slideshow, and weather forecast functions, together
third-party plugins.
This is a meta package.
%package common
Summary: Common Kodi files and binaries
Requires: dejavu-sans-fonts
# need explicit requires for these packages
# as they are dynamically loaded via XBMC's arcane
@@ -238,17 +254,12 @@ Requires: xorg-x11-utils
# and for installation
Requires: python2-pillow%{?_isa}
%description
Kodi is a free cross-platform media-player jukebox and entertainment hub.
Kodi can play a spectrum of of multimedia formats, and featuring playlist,
audio visualizations, slideshow, and weather forecast functions, together
third-party plugins.
%description common
Common Kodi files and binaries
%package devel
Summary: Development files needed to compile C programs against kodi
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: xbmc-devel < 14.0
Provides: xbmc-devel = %{version}
@@ -280,81 +291,100 @@ This package contains the development header files for the eventclients
library.
%package firewalld
Summary: FirewallD metadata files for Kodi
Requires: firewalld-filesystem
Requires(post): firewalld-filesystem
%description firewalld
This package contains FirewallD files for Kodi.
%package gbm
Summary: Kodi binary for Generic Buffer Management
Requires: %{name}-common = %{version}-%{release}
%description gbm
This package contains the Kodi binary for Generic Buffer Management.
%package wayland
Summary: Kodi binary for Wayland compositors
Requires: %{name}-common = %{version}-%{release}
%description wayland
This package contains the Kodi binary for Wayland compositors.
%package x11
Summary: Kodi binary for X11 servers
Requires: %{name}-common = %{version}-%{release}
%description x11
This package contains the Kodi binary for X11 servers.
%prep
%setup -q -n %{name}-%{DIRVERSION}
%patch1 -p1 -b.versioning
%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
%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
#%patch1 -p1 -b.versioning
#%patch2 -p1 -b.assert
# Fix up Python shebangs
pathfix.py -pni "%{__python2} %{py2_shbang_opts}" \
tools/EventClients/lib/python/zeroconf.py \
tools/EventClients/Clients/PS3BDRemote/ps3_remote.py \
tools/EventClients/lib/python/ps3/sixaxis.py \
tools/EventClients/lib/python/ps3/sixpair.py \
tools/EventClients/lib/python/ps3/sixwatch.py \
tools/EventClients/Clients/KodiSend/kodi-send.py \
tools/EventClients/lib/python/xbmcclient.py
%build
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}
mkdir {fedora-gbm,fedora-wayland,fedora-x11}
./configure \
--prefix=%{_prefix} --bindir=%{_bindir} --includedir=%{_includedir} \
--libdir=%{_libdir} --datadir=%{_datadir} \
--with-lirc-device=/var/run/lirc/lircd \
%if 0%{?_with_external_ffmpeg}
--with-ffmpeg=shared \
%endif
%if 0%{?_with_wayland}
--enable-wayland \
%endif
--enable-pulse \
%if 0%{?_with_libcec}
--enable-libcec \
for BACKEND in %{kodi_backends}
do
pushd fedora-$BACKEND
%cmake \
%if %{with dvdcss}
-DLIBDVDCSS_URL=%{SOURCE4} \
%else
--disable-libcec \
-DENABLE_DVDCSS=OFF \
%endif
%if 0%{?_with_libssh}
--enable-ssh \
%if ! 0%{?_with_external_ffmpeg}
-DFFMPEG_URL=%{SOURCE5} \
%endif
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_INTERNAL_CROSSGUID=OFF \
-DLIRC_DEVICE=/var/run/lirc/lircd \
-DLIBDVDNAV_URL=%{SOURCE2} \
-DLIBDVDREAD_URL=%{SOURCE3} \
-DPYTHON_EXECUTABLE=%{__python2} \
-DCORE_PLATFORM_NAME=$BACKEND \
%ifarch x86_64 i686
-DWAYLAND_RENDER_SYSTEM=gl \
-DGBM_RENDER_SYSTEM=gl \
%else
--disable-ssh \
-DWAYLAND_RENDER_SYSTEM=gles \
-DGBM_RENDER_SYSTEM=gles \
%endif
%if ! %{with dvd}
--disable-optical-drive \
%endif
--disable-optimizations --disable-debug \
%ifnarch %{arm}
--enable-gl \
--disable-gles \
--enable-vdpau \
%else
--enable-gles \
--disable-vdpau \
--disable-vaapi \
%ifarch armv7hl \
--enable-tegra \
%endif
%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="`echo "$RPM_LD_FLAGS -fPIC" | sed -e 's/-Wl,-z,defs//'`" \
ASFLAGS=-fPIC
make %{?_smp_mflags} V=1
../
cmake --build . -- VERBOSE=1 %{?_smp_mflags}
popd
done
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
make -C tools/EventClients DESTDIR=$RPM_BUILD_ROOT install
for BACKEND in %{kodi_backends}
do
pushd fedora-$BACKEND
make DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags} install
popd
done
# remove the doc files from unversioned /usr/share/doc/xbmc, they should be in versioned docdir
rm -r $RPM_BUILD_ROOT/%{_datadir}/doc/
@@ -368,9 +398,9 @@ 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
ln -s %{python_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL
ln -s %{python2_sitearch}/PIL $RPM_BUILD_ROOT%{_libdir}/kodi/addons/script.module.pil/lib/PIL
#install -d $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib
#ln -s %{python_sitearch}/pysqlite2 $RPM_BUILD_ROOT%{_libdir}/xbmc/addons/script.module.pysqlite/lib/pysqlite2
#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/
@@ -380,36 +410,23 @@ mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/
mv docs/manpages ${RPM_BUILD_ROOT}%{_mandir}/man1/
%posttrans
if [ ! -L %{_libdir}/xbmc ] ; then
if [ -d %{_libdir}/xbmc ] ; then
rmdir %{_libdir}/xbmc %{_datadir}/xbmc
fi
ln -s kodi ${RPM_BUILD_ROOT}%{_libdir}/xbmc
ln -s kodi ${RPM_BUILD_ROOT}%{_datadir}/xbmc
fi
%posttrans devel
if [ ! -L %{_includedir}/xbmc ] ; then
if [ -d %{_includedir}/xbmc ] ; then
rmdir %{_includedir}/xbmc
fi
ln -s kodi ${RPM_BUILD_ROOT}%{_includedir}/xbmc
fi
%post firewalld
%firewalld_reload
%files
%license copying.txt LICENSE.GPL
%doc CONTRIBUTING.md README.md docs
%files common
%license LICENSE.md LICENSES/
%doc README.md docs
%{_bindir}/kodi
%{_bindir}/kodi-standalone
%{_bindir}/xbmc
%{_bindir}/xbmc-standalone
%{_libdir}/kodi
%ghost %{_libdir}/xbmc
%{_datadir}/kodi
%ghost %{_datadir}/xbmc
%{_bindir}/TexturePacker
%dir %{_libdir}/kodi/
%{_libdir}/kodi/addons/
%{_libdir}/kodi/system/
%{_datadir}/kodi/
%{_datadir}/xsessions/kodi.desktop
%{_datadir}/applications/kodi.desktop
%{_datadir}/icons/hicolor/*/*/*.png
@@ -420,21 +437,18 @@ fi
%files devel
%{_includedir}/kodi
%ghost %{_includedir}/xbmc
%files eventclients
%license copying.txt LICENSE.GPL
%license LICENSE.md LICENSES/
%{python2_sitelib}/kodi
%dir %{_datadir}/pixmaps/kodi
%{_datadir}/pixmaps/kodi/*.png
%{_bindir}/kodi-ps3d
%{_bindir}/kodi-ps3remote
%{_bindir}/kodi-send
%{_bindir}/kodi-wiiremote
%{_mandir}/man1/kodi-ps3remote.1.gz
%{_mandir}/man1/kodi-send.1.gz
%{_mandir}/man1/kodi-standalone.1.gz
%{_mandir}/man1/kodi-wiiremote.1.gz
@@ -442,12 +456,62 @@ fi
%{_includedir}/kodi/xbmcclient.h
%changelog
* Thu May 03 2018 Michael Cronenworth <mike@cchtml.com> - 17.6-9
- Add patch for audio skipping (RFBZ#4882)
%files firewalld
%license LICENSE.md LICENSES/
%{_prefix}/lib/firewalld/services/kodi-eventserver.xml
%{_prefix}/lib/firewalld/services/kodi-http.xml
%{_prefix}/lib/firewalld/services/kodi-jsonrpc.xml
* Mon Apr 23 2018 Michael Cronenworth <mike@cchtml.com> - 17.6-8
- Add patch for crash on startup (RFBZ#4863)
%files gbm
%{_libdir}/kodi/kodi-gbm
%files wayland
%{_libdir}/kodi/kodi-wayland
%files x11
%{_libdir}/kodi/kodi-x11
%{_libdir}/kodi/kodi-xrandr
%changelog
* Thu Oct 11 2018 Nicolas Chauvet <kwizart@gmail.com> - 18.0-0.10.b3
- Update to beta3
- Enable arm build
- Build EGL/GLES everywhere
- Add firewalld sub-package when relevant
* Thu Sep 27 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.9.b2
- Kodi 18.0 beta 2
* Fri Aug 31 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.8.b1
- Fix Requires and versioning in new split packages
* Thu Aug 30 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.7.b1
- Update Requires for new split packages
* Tue Aug 28 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.6.b1
- Build wayland and GBM binaries
* Tue Aug 28 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.5.b1
- Kodi 18.0 beta 1 v2
* Sun Aug 19 2018 Leigh Scott <leigh123linux@googlemail.com> - 18.0-0.4.a2
- Rebuilt for Fedora 29 Mass Rebuild binutils issue
* Thu Jul 26 2018 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 18.0-0.3.a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Jun 24 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.2.a2
- Kodi 18.0 alpha 2
* Thu May 03 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.1.a1
- Add patch to fix assert on start.
* Fri Mar 16 2018 Michael Cronenworth <mike@cchtml.com> - 18.0-0.0.a1
- Kodi 18.0 alpha 1
* Thu Mar 08 2018 RPM Fusion Release Engineering <leigh123linux@googlemail.com> - 17.6-7
- Rebuilt for new ffmpeg snapshot
@@ -601,12 +665,6 @@ fi
* Tue Sep 02 2014 Michael Cronenworth <mike@cchtml.com> - 14.0-0.2.alpha3
- Update to 14.0 alpha 3
<<<<<<< HEAD
* Tue Jul 18 2017 Daniel Steiner <dsteiner@redhat.com> - 17.3-1
- Kodi 17.3 final for Fedora 26
=======
* Sun Aug 24 2014 Michael Cronenworth <mike@cchtml.com> - 14.0-0.1.alpha2
- Update to 14.0 alpha 2
- Renamed XBMC to Kodi
>>>>>>> 28f9d02e7a6b75386b6824444b2146115015b591