]> git.pld-linux.org Git - packages/kodi.git/blobdiff - kodi.spec
BR dcadec-devel
[packages/kodi.git] / kodi.spec
index 9c3b1f9bec15c283e4ab4a6ef2f781e0a08b2f4d..75530133252bdca100a164610e0d5e67b670f43c 100644 (file)
--- a/kodi.spec
+++ b/kodi.spec
@@ -1,37 +1,76 @@
-#
 # TODO:
 #  - fix build flags - some files are compiled with -O3 and without rpm*flags
-#  - fix linking argument order
 #  - add and/or fix users/groups permissions
 #  - split to subpackages?
+# - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl!
 #
 # Conditional build:
-%bcond_without cec     # build without cec support
-%bcond_without dvdcss  # DVDCSS support
+# Features:
+%bcond_with    afpclient       # AFP support via libafpclient
+%bcond_without airplay         # AirPlay support
+%bcond_with    airtunes        # AirTunes support
+%bcond_without alsa            # ALSA support
+%bcond_without avahi           # Avahi support
+%bcond_without dbus            # DBUS support
+%bcond_without dvdcss          # DVDCSS support
 %bcond_without fishbmc         # FishBMC visualisation
 %bcond_without gl              # OpenGL rendering
 %bcond_without goom            # GOOM visualisation
-%bcond_with    gtest   # configure Google Test Framework
-%bcond_with    hal     # build with HAL
+%bcond_with    gtest           # configure Google Test Framework
 %bcond_without joystick        # SDL joystick support
+%bcond_without libcap          # libcap support
+%bcond_with    libcec          # libcec support
+%bcond_without libusb          # libusb support
+%bcond_with    mdnsembedded    # mDNSEmbedded support
+%bcond_without mysql           # MySQL
+%bcond_without nfs             # NFS support via libnfs
+%bcond_without non_free        # componentents with non-compliant licenses
+%bcond_with    openmax         # OpenMax decoding, requires OpenGLES
+%bcond_without optical_drive   # optical drive
 %bcond_without projectm        # ProjectM visualisation
+%bcond_without pulse           # PulseAudio support
 %bcond_without rsxs            # really slick X screensavers
+%bcond_without rtmp            # RTMP support via librtmp
+%bcond_without samba           # SAMBA support
+%bcond_without sdl             # SDL
 %bcond_without spectrum        # Spectrum visualisation
+%bcond_without ssh             # SSH SFTP support
 %bcond_without texturepacker   # texturepacker support
+%bcond_without udev            # udev support
+%bcond_without upnp            # UPnP support
+%bcond_without vaapi           # VAAPI decoding
+%bcond_without vdpau           # VDPAU decoding
+%bcond_with    vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
 %bcond_without waveform        # Waveform visualisation
+%bcond_without webserver       # webserver
 %bcond_without x11             # x11 'Linux Only'
 %bcond_without xrandr          # XRandR support
+%bcond_with    asap_codec      # ASAP ADPCM support
+%bcond_with    gles            # OpenGLES rendering
+%bcond_without libbluray       # libbluray support
+%bcond_without mid             # MID support
+%bcond_with    profiling       # gprof profiling
+%bcond_with    tegra           # Tegra2 arm
+%bcond_with    wayland         # wayland
+# System libs:
+%bcond_without system_ffmpeg   # build with system ffmpeg
+%bcond_without system_dvdread  # build with system dvdread
 
-%define        codename Helix
+%define        codename Jarvis
 Summary:       Kodi is a free and open source media-player and entertainment hub
 Name:          kodi
-Version:       14.0
-Release:       0.1
+Version:       16.1
+Release:       1
 License:       GPL v2+ and GPL v3+
 Group:         Applications/Multimedia
-Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
-# Source0-md5: 9717c539789789b8aeaf1dcfdb9f2c69
+#Source0:      http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
+Source0:       https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
+# Source0-md5: 79358ad5f77f42c5498a9412d5a78dd5
 Patch0:                jpeglib-boolean.patch
+Patch1:                disable-static.patch
+Patch2:                dvdread.patch
+Patch3:                ffmpeg3.patch
+Patch4:                gcc5.patch
 URL:           http://kodi.tv/
 BuildRequires: Mesa-libGLU-devel
 BuildRequires: OpenGL-devel
@@ -46,10 +85,12 @@ BuildRequires:      bluez-libs-devel >= 4.99
 BuildRequires: boost-devel
 BuildRequires: bzip2-devel
 BuildRequires: cmake
+BuildRequires: crossguid-devel
 BuildRequires: curl-devel
 BuildRequires: dbus-devel
+BuildRequires: dcadec-devel
 BuildRequires: doxygen
-BuildRequires: ffmpeg-devel
+%{?with_system_ffmpeg:BuildRequires:   ffmpeg-devel >= 2.4.4}
 BuildRequires: flac-devel
 BuildRequires: fontconfig-devel
 BuildRequires: freetype-devel
@@ -57,16 +98,17 @@ BuildRequires:      fribidi-devel
 BuildRequires: gawk
 BuildRequires: gettext-autopoint
 BuildRequires: gettext-tools
+BuildRequires: giflib-devel
 BuildRequires: glew-devel
 BuildRequires: gperf
-%{?with_hal:BuildRequires:     hal-devel}
 BuildRequires: jasper-devel
 BuildRequires: jre
 BuildRequires: libass-devel
 BuildRequires: libbluray-devel >= 0.2.1
 BuildRequires: libcap-devel
 BuildRequires: libcdio-devel
-%{?with_cec:BuildRequires:     libcec-devel}
+%{?with_libcec:BuildRequires:  libcec-devel}
+%{?with_system_dvdread:BuildRequires:  libdvdread-devel}
 %ifarch i686 pentium4 athlon %{x8664}
 BuildRequires: libcrystalhd-devel
 %endif
@@ -103,7 +145,6 @@ BuildRequires:      pulseaudio-devel
 BuildRequires: python-devel >= 2.4
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.566
-# used internally
 BuildRequires: sed >= 4.0
 BuildRequires: sqlite3-devel
 BuildRequires: swig
@@ -122,8 +163,10 @@ BuildRequires:     yajl-devel
 BuildRequires: yasm
 BuildRequires: zip
 BuildRequires: zlib-devel
+# kodi uses it's own, modified squish
+BuildConflicts:        squish-devel
 #https://github.com/sahlberg/libnfs
-#BuildRequires:        libnfs-devel
+BuildRequires: libnfs-devel
 #http://sites.google.com/site/alexthepuffin/home
 #BuildRequires:        afpfs-ng-devel
 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
@@ -158,37 +201,84 @@ all common digital media files from local and network storage media.
 %prep
 %setup -q -n xbmc-%{version}-%{codename}
 %patch0 -p1
+%patch1 -p1
+%{?with_system_dvdread:%patch2 -p1}
+%patch3 -p1
+#%patch4 -p1
+
+rm -r lib/cximage-6.0/zlib
+#rm -r lib/libhdhomerun
+rm -r lib/libmpeg2
+rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
+rm -r lib/libbluray
+rm -r lib/librtmp
+rm -r lib/win32
+%{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
+
+%if %{without system_ffmpeg}
+#ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
+%endif
 
 %build
+%{__make} -C tools/depends/native/libsquish-native \
+       CXX="%{__cxx}"
+
 ./bootstrap
 %configure \
+       ac_cv_type__Bool=yes \
        --disable-silent-rules \
        --disable-debug \
-       --disable-afpclient \
-       --disable-airtunes \
        --disable-ccache \
-       --disable-libusb \
-       --disable-nfs \
-       --enable-pulse \
-       --enable-udev \
+       --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
+       %{__enable_disable afpclient} \
+       %{__enable_disable airplay} \
+       %{__enable_disable airtunes} \
+       %{__enable_disable alsa} \
+       %{__enable_disable asap_codec asap-codec} \
+       %{__enable_disable avahi} \
+       %{__enable_disable dbus} \
        %{__enable_disable dvdcss} \
        %{__enable_disable fishbmc} \
+       %{__enable_disable gles} \
        %{__enable_disable gl} \
        %{__enable_disable goom} \
        %{__enable_disable gtest} \
-       %{__enable_disable gtexturepacker} \
-       %{__enable_disable hal} \
        %{__enable_disable joystick} \
+       %{__enable_disable libbluray} \
+       %{__enable_disable libcap} \
        %{__enable_disable libcec} \
+       %{__enable_disable libusb} \
+       %{__enable_disable mdnsembedded} \
+       %{__enable_disable mid} \
+       %{__enable_disable mysql} \
+       %{__enable_disable nfs} \
+       %{__enable_disable non_free non-free} \
+       %{__enable_disable openmax} \
+       %{__enable_disable optical_drive optical-drive} \
+       %{__enable_disable profiling} \
        %{__enable_disable projectm} \
+       %{__enable_disable pulse} \
        %{__enable_disable rsxs} \
+       %{__enable_disable rtmp} \
+       %{__enable_disable samba} \
+       %{__enable_disable sdl} \
        %{__enable_disable spectrum} \
+       %{__enable_disable ssh} \
+       %{__enable_disable tegra} \
+       %{__enable_disable texturepacker} \
+       %{__enable_disable udev} \
+       %{__enable_disable upnp} \
+       %{__enable_disable vaapi} \
+       %{__enable_disable vdpau} \
+       %{__enable_disable vtbdecoder} \
        %{__enable_disable waveform} \
+       %{__enable_disable wayland} \
+       %{__enable_disable webserver} \
        %{__enable_disable x11} \
        %{__enable_disable xrandr} \
        %{nil}
 
-%{__make}
+%{__make} V=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -201,6 +291,10 @@ rm -rf $RPM_BUILD_ROOT
 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
 
+# no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -218,6 +312,4 @@ rm -rf $RPM_BUILD_ROOT
 # legacy xbmc compatibility links
 %attr(755,root,root) %{_bindir}/xbmc
 %attr(755,root,root) %{_bindir}/xbmc-standalone
-%{_libdir}/xbmc
-%{_datadir}/xbmc
 %{_datadir}/xsessions/xbmc.desktop
This page took 0.151065 seconds and 4 git commands to generate.