]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
fix build with new microhttpd and libfmt; rel 5
[packages/kodi.git] / kodi.spec
1 # TODO:
2 #  - fix build flags - some files are compiled with -O3 and without rpm*flags
3 #  - add and/or fix users/groups permissions
4 #  - split to subpackages?
5 # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl!
6 #
7 # Conditional build:
8 # Features:
9 %bcond_with     afpclient       # AFP support via libafpclient
10 %bcond_without  airplay         # AirPlay support
11 %bcond_with     airtunes        # AirTunes support
12 %bcond_without  alsa            # ALSA support
13 %bcond_without  avahi           # Avahi support
14 %bcond_without  dbus            # DBUS support
15 %bcond_without  dvdcss          # DVDCSS support
16 %bcond_without  opengl          # OpenGL rendering
17 %bcond_with     gtest           # configure Google Test Framework
18 %bcond_without  joystick        # SDL joystick support
19 %bcond_without  libcap          # libcap support
20 %bcond_with     libcec          # libcec support
21 %bcond_without  gif             # GIF support via giflib
22 %bcond_without  libusb          # libusb support
23 %bcond_with     mdnsembedded    # mDNSEmbedded support
24 %bcond_without  mysql           # MySQL
25 %bcond_without  nfs             # NFS support via libnfs
26 %bcond_without  non_free        # componentents with non-compliant licenses
27 %bcond_with     openmax         # OpenMax decoding, requires OpenGLES
28 %bcond_without  optical_drive   # optical drive
29 %bcond_without  projectm        # ProjectM visualisation
30 %bcond_without  pulse           # PulseAudio support
31 %bcond_without  rtmp            # RTMP support via librtmp
32 %bcond_without  samba           # SAMBA support
33 %bcond_without  sdl             # SDL
34 %bcond_without  ssh             # SSH SFTP support
35 %bcond_without  texturepacker   # texturepacker support
36 %bcond_without  udev            # udev support
37 %bcond_without  upnp            # UPnP support
38 %bcond_without  vaapi           # VAAPI decoding
39 %bcond_without  vdpau           # VDPAU decoding
40 %bcond_with     vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
41 %bcond_without  webserver       # webserver
42 %bcond_without  x11             # x11 'Linux Only'
43 %bcond_without  xrandr          # XRandR support
44 %bcond_with     asap_codec      # ASAP ADPCM support
45 %bcond_with     gles            # OpenGLES rendering
46 %bcond_without  libbluray       # libbluray support
47 %bcond_without  mid             # MID support
48 %bcond_with     profiling       # gprof profiling
49 %bcond_with     tegra           # Tegra2 arm
50 %bcond_with     wayland         # wayland
51 # System libs:
52 %bcond_without  system_ffmpeg   # build with system ffmpeg
53 %bcond_with     system_dvdread  # build with system dvdread
54
55 %define codename Leia
56 #define subver  rc1
57 Summary:        Kodi is a free and open source media-player and entertainment hub
58 Name:           kodi
59 Version:        18.4
60 Release:        5
61 License:        GPL v2+ and GPL v3+
62 Group:          Applications/Multimedia
63 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
64 # Source0-md5:  5e5e1e2527c2619785597b04e35fda6c
65 Patch0:         jpeglib-boolean.patch
66 Patch1:         disable-static.patch
67 Patch2:         dvdread.patch
68 Patch3:         ffmpeg3.patch
69 Patch4:         gcc5.patch
70 Patch5:         libdvd.patch
71 Patch6:         microhttpd.patch
72 Patch7:         assert.patch
73 URL:            https://kodi.tv/
74 BuildRequires:  Mesa-libEGL-devel
75 BuildRequires:  OpenGL-GLU-devel
76 BuildRequires:  OpenGL-devel
77 BuildRequires:  SDL2-devel
78 BuildRequires:  alsa-lib-devel
79 BuildRequires:  avahi-devel
80 BuildRequires:  bluez-libs-devel >= 4.99
81 BuildRequires:  bzip2-devel
82 BuildRequires:  cmake >= 3.4
83 BuildRequires:  crossguid-devel
84 BuildRequires:  curl-devel
85 BuildRequires:  dbus-devel
86 BuildRequires:  libfmt-devel >= 3.0.1
87 BuildRequires:  rapidjson-devel >= 1.1.0
88 # libavcodec >= 56.26.100 libavfilter >= 5.11.102 libavformat >= 56.25.101 libavutil >= 54.20.100 libpostproc >= 53.3.100 libswscale >= 3.1.101 libswresample >= 1.1.100
89 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
90 BuildRequires:  flac-devel
91 BuildRequires:  flatbuffers-devel >= 1.9.0
92 BuildRequires:  fontconfig-devel
93 BuildRequires:  freetype-devel
94 BuildRequires:  fribidi-devel
95 BuildRequires:  gawk
96 BuildRequires:  gettext-autopoint
97 BuildRequires:  gettext-tools
98 %{?with_gif:BuildRequires:      giflib-devel}
99 BuildRequires:  gperf
100 BuildRequires:  jre
101 BuildRequires:  lcms2-devel
102 BuildRequires:  libass-devel
103 BuildRequires:  libatomic-devel
104 BuildRequires:  libbluray-devel >= 0.7.0
105 BuildRequires:  libcap-devel
106 BuildRequires:  libcdio-devel
107 %{?with_libcec:BuildRequires:   libcec-devel >= 3.0.0}
108 BuildRequires:  libdrm-devel
109 BuildRequires:  libdvdcss-devel >= 1.4.1
110 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
111 BuildRequires:  libgcrypt-devel
112 BuildRequires:  libjpeg-devel
113 BuildRequires:  libltdl-devel
114 BuildRequires:  libmicrohttpd-devel >= 0.9.40
115 BuildRequires:  libogg-devel
116 BuildRequires:  libplist-devel
117 BuildRequires:  libpng-devel
118 BuildRequires:  librtmp-devel
119 BuildRequires:  libsmbclient-devel
120 BuildRequires:  libssh-devel
121 BuildRequires:  libstdc++-devel
122 BuildRequires:  libtool
123 BuildRequires:  libuuid-devel
124 BuildRequires:  libva-devel
125 BuildRequires:  libva-x11-devel
126 BuildRequires:  libvdpau-devel
127 BuildRequires:  libvorbis-devel
128 BuildRequires:  libxml2-devel >= 2.0
129 BuildRequires:  libxslt-devel
130 BuildRequires:  lzo-devel
131 BuildRequires:  mysql-devel
132 %ifarch %{ix86}
133 BuildRequires:  nasm
134 %endif
135 BuildRequires:  fstrcmp-devel >= 0.7
136 BuildRequires:  openssl-devel
137 BuildRequires:  pcre-cxx-devel
138 BuildRequires:  pkgconfig
139 BuildRequires:  pulseaudio-devel >= 1.0
140 BuildRequires:  python-devel >= 1:2.6
141 BuildRequires:  rpm-pythonprov
142 BuildRequires:  rpmbuild(macros) >= 1.566
143 BuildRequires:  sed >= 4.0
144 BuildRequires:  sqlite3-devel
145 BuildRequires:  swig
146 BuildRequires:  taglib-devel >= 1.8
147 BuildRequires:  tinyxml-devel >= 2.6.2
148 BuildRequires:  udev-devel
149 BuildRequires:  unzip
150 BuildRequires:  xorg-lib-libX11-devel
151 BuildRequires:  xorg-lib-libXext-devel
152 BuildRequires:  xorg-lib-libXrandr-devel
153 BuildRequires:  yajl-devel >= 2
154 BuildRequires:  zip
155 BuildRequires:  zlib-devel
156 # kodi uses it's own, modified squish
157 BuildConflicts: squish-devel
158 #https://github.com/sahlberg/libnfs
159 BuildRequires:  libnfs-devel
160 #http://sites.google.com/site/alexthepuffin/home
161 #BuildRequires: afpfs-ng-devel
162 #BuildRequires: shairplay-devel
163 Requires:       /usr/bin/glxinfo
164 Requires:       SDL >= 1.2.14-5
165 Requires:       lsb-release
166 Requires:       xorg-app-xdpyinfo
167 # dlopened libraries:
168 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
169 Requires:       curl-libs
170 Requires:       libass
171 Requires:       libbluray
172 Requires:       libmodplug
173 Requires:       libmpeg2-libs
174 Requires:       libogg
175 Requires:       libplist
176 Requires:       libvorbis
177 Obsoletes:      xbmc < 14.0
178 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
179
180 # extracting debug info from /home/users/glen/tmp/kodi-18.0-root-glen/usr/lib64/kodi/kodi-x11
181 # /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
182 %define         _noautostrip    kodi-x11
183 %define         _enable_debug_packages  0
184
185 %description
186 Kodi Entertainment Center (formerly XBMC) is a free and open-source
187 media player software developed by the XBMC Foundation, a non-profit
188 technology consortium. Kodi is available for multiple operating
189 systems and hardware platforms, with a software 10-foot user interface
190 for use with televisions and remote controls. It allows users to play
191 and view most videos, music, such as podcasts from the internet, and
192 all common digital media files from local and network storage media.
193
194 %prep
195 %setup -q -n xbmc-%{version}%{?subver}-%{codename}
196 #%patch0 -p1
197 %patch1 -p1
198 %{?with_system_dvdread:%patch2 -p1}
199 #%patch3 -p1
200 #%patch4 -p1
201 %patch5 -p1
202 %patch6 -p1
203 %patch7 -p1
204
205 #%{__rm} -r lib/cximage-6.0/zlib
206 #%{__rm} -r lib/libhdhomerun
207 #%{__rm} -r lib/libmpeg2
208 #%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
209 #%{__rm} -r lib/libbluray
210 #%{__rm} -r lib/librtmp
211 %{__rm} -r lib/win32
212 #%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
213
214 %if %{without system_ffmpeg}
215 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
216 %endif
217
218 %build
219 install -d build
220 cd build
221 # cmake not picking up include path from pkgconfig
222 # https://trac.kodi.tv/ticket/16861
223 %define specflags -I/usr/include/freetype2
224 %cmake \
225         -DENABLE_INTERNAL_LIBDVD=OFF \
226         -DENABLE_INTERNAL_CROSSGUID=OFF \
227         -DENABLE_DVDCSS=%{__true_false dvdcss} \
228         -DENABLE_UPNP=%{__true_false upnp} \
229         -DENABLE_AIRTUNES=%{__true_false airtunes} \
230         -DENABLE_OPTICAL=%{__true_false optical_drive} \
231         -DENABLE_INTERNAL_FFMPEG=%{!?with_system_ffmpeg:ON}%{?with_system_ffmpeg:OFF} \
232         ..
233 %if 0
234 %configure \
235         ac_cv_type__Bool=yes \
236         --disable-silent-rules \
237         --disable-debug \
238         --disable-ccache \
239         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
240         %{__enable_disable afpclient} \
241         %{__enable_disable airplay} \
242         %{__enable_disable alsa} \
243         %{__enable_disable asap_codec asap-codec} \
244         %{__enable_disable avahi} \
245         %{__enable_disable dbus} \
246         %{__enable_disable gles} \
247         %{__enable_disable opengl gl} \
248         %{__enable_disable gtest} \
249         %{__enable_disable joystick} \
250         %{__enable_disable libbluray} \
251         %{__enable_disable libcap} \
252         %{__enable_disable libcec} \
253         %{__enable_disable gif libgif} \
254         %{__enable_disable libusb} \
255         %{__enable_disable mdnsembedded} \
256         %{__enable_disable mid} \
257         %{__enable_disable mysql} \
258         %{__enable_disable nfs} \
259         %{__enable_disable non_free non-free} \
260         %{__enable_disable openmax} \
261         %{__enable_disable profiling} \
262         %{__enable_disable pulse} \
263         %{__enable_disable rtmp} \
264         %{__enable_disable samba} \
265         %{__enable_disable sdl} \
266         %{__enable_disable ssh} \
267         %{__enable_disable tegra} \
268         %{__enable_disable texturepacker} \
269         %{__enable_disable udev} \
270         %{__enable_disable upnp} \
271         %{__enable_disable vaapi} \
272         %{__enable_disable vdpau} \
273         %{__enable_disable vtbdecoder} \
274         %{__enable_disable wayland} \
275         %{__enable_disable webserver} \
276         %{__enable_disable x11} \
277         %{__enable_disable xrandr} \
278         %{nil}
279 %endif
280
281 %{__make}
282
283 %install
284 rm -rf $RPM_BUILD_ROOT
285 %{__make} -C build install \
286         DESTDIR=$RPM_BUILD_ROOT
287
288 %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md}
289
290 # not packaged
291 %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
292
293 # no -devel package yet
294 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
295
296 %clean
297 rm -rf $RPM_BUILD_ROOT
298
299 %files
300 %defattr(644,root,root,755)
301 %doc README.md docs/README.Linux.md
302 %attr(755,root,root) %{_bindir}/TexturePacker
303 %attr(755,root,root) %{_bindir}/kodi
304 %attr(755,root,root) %{_bindir}/kodi-standalone
305 %{_datadir}/%{name}
306 %attr(755,root,root) %{_libdir}/%{name}
307 %{_desktopdir}/kodi.desktop
308 %{_iconsdir}/hicolor/*/apps/%{name}.png
309 %{_datadir}/xsessions/kodi.desktop
This page took 0.110606 seconds and 4 git commands to generate.