]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
up to 16.x-Järvis; builds and startups so rel 1
[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  fishbmc         # FishBMC visualisation
17 %bcond_without  gl              # OpenGL rendering
18 %bcond_without  goom            # GOOM visualisation
19 %bcond_with     gtest           # configure Google Test Framework
20 %bcond_without  joystick        # SDL joystick support
21 %bcond_without  libcap          # libcap support
22 %bcond_with     libcec          # libcec support
23 %bcond_without  libusb          # libusb support
24 %bcond_with     mdnsembedded    # mDNSEmbedded support
25 %bcond_without  mysql           # MySQL
26 %bcond_without  nfs             # NFS support via libnfs
27 %bcond_without  non_free        # componentents with non-compliant licenses
28 %bcond_with     openmax         # OpenMax decoding, requires OpenGLES
29 %bcond_without  optical_drive   # optical drive
30 %bcond_without  projectm        # ProjectM visualisation
31 %bcond_without  pulse           # PulseAudio support
32 %bcond_without  rsxs            # really slick X screensavers
33 %bcond_without  rtmp            # RTMP support via librtmp
34 %bcond_without  samba           # SAMBA support
35 %bcond_without  sdl             # SDL
36 %bcond_without  spectrum        # Spectrum visualisation
37 %bcond_without  ssh             # SSH SFTP support
38 %bcond_without  texturepacker   # texturepacker support
39 %bcond_without  udev            # udev support
40 %bcond_without  upnp            # UPnP support
41 %bcond_without  vaapi           # VAAPI decoding
42 %bcond_without  vdpau           # VDPAU decoding
43 %bcond_with     vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
44 %bcond_without  waveform        # Waveform visualisation
45 %bcond_without  webserver       # webserver
46 %bcond_without  x11             # x11 'Linux Only'
47 %bcond_without  xrandr          # XRandR support
48 %bcond_with     asap_codec      # ASAP ADPCM support
49 %bcond_with     gles            # OpenGLES rendering
50 %bcond_without  libbluray       # libbluray support
51 %bcond_without  mid             # MID support
52 %bcond_with     profiling       # gprof profiling
53 %bcond_with     tegra           # Tegra2 arm
54 %bcond_with     wayland         # wayland
55 # System libs:
56 %bcond_without  system_ffmpeg   # build with system ffmpeg
57 %bcond_without  system_dvdread  # build with system dvdread
58
59 %define codename Jarvis
60 Summary:        Kodi is a free and open source media-player and entertainment hub
61 Name:           kodi
62 Version:        16.1
63 Release:        1
64 License:        GPL v2+ and GPL v3+
65 Group:          Applications/Multimedia
66 #Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
67 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
68 # Source0-md5:  79358ad5f77f42c5498a9412d5a78dd5
69 Patch0:         jpeglib-boolean.patch
70 Patch1:         disable-static.patch
71 Patch2:         dvdread.patch
72 Patch3:         ffmpeg3.patch
73 Patch4:         gcc5.patch
74 URL:            http://kodi.tv/
75 BuildRequires:  Mesa-libGLU-devel
76 BuildRequires:  OpenGL-devel
77 BuildRequires:  SDL2-devel
78 BuildRequires:  SDL_image-devel
79 BuildRequires:  SDL_mixer-devel
80 BuildRequires:  alsa-lib-devel
81 BuildRequires:  autoconf
82 BuildRequires:  automake
83 BuildRequires:  avahi-devel
84 BuildRequires:  bluez-libs-devel >= 4.99
85 BuildRequires:  boost-devel
86 BuildRequires:  bzip2-devel
87 BuildRequires:  cmake
88 BuildRequires:  crossguid-devel
89 BuildRequires:  curl-devel
90 BuildRequires:  dbus-devel
91 BuildRequires:  doxygen
92 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
93 BuildRequires:  flac-devel
94 BuildRequires:  fontconfig-devel
95 BuildRequires:  freetype-devel
96 BuildRequires:  fribidi-devel
97 BuildRequires:  gawk
98 BuildRequires:  gettext-autopoint
99 BuildRequires:  gettext-tools
100 BuildRequires:  giflib-devel
101 BuildRequires:  glew-devel
102 BuildRequires:  gperf
103 BuildRequires:  jasper-devel
104 BuildRequires:  jre
105 BuildRequires:  libass-devel
106 BuildRequires:  libbluray-devel >= 0.2.1
107 BuildRequires:  libcap-devel
108 BuildRequires:  libcdio-devel
109 %{?with_libcec:BuildRequires:   libcec-devel}
110 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
111 %ifarch i686 pentium4 athlon %{x8664}
112 BuildRequires:  libcrystalhd-devel
113 %endif
114 BuildRequires:  libgcrypt-devel
115 BuildRequires:  libjpeg-devel
116 BuildRequires:  libltdl-devel
117 BuildRequires:  libmad-devel
118 BuildRequires:  libmicrohttpd-devel
119 BuildRequires:  libmodplug-devel
120 BuildRequires:  libmpeg2-devel
121 BuildRequires:  libogg-devel
122 BuildRequires:  libplist-devel
123 BuildRequires:  libpng-devel
124 BuildRequires:  librtmp-devel
125 BuildRequires:  libsamplerate-devel
126 BuildRequires:  libsmbclient-devel
127 BuildRequires:  libssh-devel
128 BuildRequires:  libtiff-devel
129 BuildRequires:  libtool
130 BuildRequires:  libva-devel
131 BuildRequires:  libva-glx-devel
132 BuildRequires:  libvdpau-devel
133 BuildRequires:  libvorbis-devel
134 BuildRequires:  libxslt-devel
135 BuildRequires:  lzo-devel
136 BuildRequires:  mysql-devel
137 %ifarch %{ix86}
138 BuildRequires:  nasm
139 %endif
140 BuildRequires:  openssl-devel
141 BuildRequires:  pcre-cxx-devel
142 BuildRequires:  pkgconfig
143 BuildRequires:  pulseaudio-devel
144 BuildRequires:  python-devel >= 2.4
145 BuildRequires:  rpm-pythonprov
146 BuildRequires:  rpmbuild(macros) >= 1.566
147 BuildRequires:  sed >= 4.0
148 BuildRequires:  sqlite3-devel
149 BuildRequires:  swig
150 BuildRequires:  taglib-devel >= 1.8
151 BuildRequires:  tinyxml-devel
152 BuildRequires:  udev-devel
153 BuildRequires:  unzip
154 BuildRequires:  xorg-lib-libX11-devel
155 BuildRequires:  xorg-lib-libXext-devel
156 BuildRequires:  xorg-lib-libXinerama-devel
157 BuildRequires:  xorg-lib-libXmu-devel
158 BuildRequires:  xorg-lib-libXrandr-devel
159 BuildRequires:  xorg-lib-libXt-devel
160 BuildRequires:  xorg-lib-libXtst-devel
161 BuildRequires:  yajl-devel
162 BuildRequires:  yasm
163 BuildRequires:  zip
164 BuildRequires:  zlib-devel
165 # kodi uses it's own, modified squish
166 BuildConflicts: squish-devel
167 #https://github.com/sahlberg/libnfs
168 BuildRequires:  libnfs-devel
169 #http://sites.google.com/site/alexthepuffin/home
170 #BuildRequires: afpfs-ng-devel
171 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
172 #https://github.com/albertz/shairport
173 #BuildRequires: libshairport
174 Requires:       /usr/bin/glxinfo
175 Requires:       SDL >= 1.2.14-5
176 Requires:       lsb-release
177 Requires:       xorg-app-xdpyinfo
178 # dlopened libraries:
179 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
180 Requires:       curl-libs
181 Requires:       libass
182 Requires:       libbluray
183 Requires:       libmodplug
184 Requires:       libmpeg2-libs
185 Requires:       libogg
186 Requires:       libplist
187 Requires:       libvorbis
188 Obsoletes:      xbmc < 14.0
189 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
190
191 %description
192 Kodi Entertainment Center (formerly XBMC) is a free and open-source
193 media player software developed by the XBMC Foundation, a non-profit
194 technology consortium. Kodi is available for multiple operating
195 systems and hardware platforms, with a software 10-foot user interface
196 for use with televisions and remote controls. It allows users to play
197 and view most videos, music, such as podcasts from the internet, and
198 all common digital media files from local and network storage media.
199
200 %prep
201 %setup -q -n xbmc-%{version}-%{codename}
202 %patch0 -p1
203 %patch1 -p1
204 %{?with_system_dvdread:%patch2 -p1}
205 %patch3 -p1
206 #%patch4 -p1
207
208 rm -r lib/cximage-6.0/zlib
209 #rm -r lib/libhdhomerun
210 rm -r lib/libmpeg2
211 rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
212 rm -r lib/libbluray
213 rm -r lib/librtmp
214 rm -r lib/win32
215 %{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
216
217 %if %{without system_ffmpeg}
218 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
219 %endif
220
221 %build
222 %{__make} -C tools/depends/native/libsquish-native \
223         CXX="%{__cxx}"
224
225 ./bootstrap
226 %configure \
227         ac_cv_type__Bool=yes \
228         --disable-silent-rules \
229         --disable-debug \
230         --disable-ccache \
231         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
232         %{__enable_disable afpclient} \
233         %{__enable_disable airplay} \
234         %{__enable_disable airtunes} \
235         %{__enable_disable alsa} \
236         %{__enable_disable asap_codec asap-codec} \
237         %{__enable_disable avahi} \
238         %{__enable_disable dbus} \
239         %{__enable_disable dvdcss} \
240         %{__enable_disable fishbmc} \
241         %{__enable_disable gles} \
242         %{__enable_disable gl} \
243         %{__enable_disable goom} \
244         %{__enable_disable gtest} \
245         %{__enable_disable joystick} \
246         %{__enable_disable libbluray} \
247         %{__enable_disable libcap} \
248         %{__enable_disable libcec} \
249         %{__enable_disable libusb} \
250         %{__enable_disable mdnsembedded} \
251         %{__enable_disable mid} \
252         %{__enable_disable mysql} \
253         %{__enable_disable nfs} \
254         %{__enable_disable non_free non-free} \
255         %{__enable_disable openmax} \
256         %{__enable_disable optical_drive optical-drive} \
257         %{__enable_disable profiling} \
258         %{__enable_disable projectm} \
259         %{__enable_disable pulse} \
260         %{__enable_disable rsxs} \
261         %{__enable_disable rtmp} \
262         %{__enable_disable samba} \
263         %{__enable_disable sdl} \
264         %{__enable_disable spectrum} \
265         %{__enable_disable ssh} \
266         %{__enable_disable tegra} \
267         %{__enable_disable texturepacker} \
268         %{__enable_disable udev} \
269         %{__enable_disable upnp} \
270         %{__enable_disable vaapi} \
271         %{__enable_disable vdpau} \
272         %{__enable_disable vtbdecoder} \
273         %{__enable_disable waveform} \
274         %{__enable_disable wayland} \
275         %{__enable_disable webserver} \
276         %{__enable_disable x11} \
277         %{__enable_disable xrandr} \
278         %{nil}
279
280 %{__make} V=1
281
282 %install
283 rm -rf $RPM_BUILD_ROOT
284 %{__make} install \
285         DESTDIR=$RPM_BUILD_ROOT
286
287 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
288
289 # no -devel package yet
290 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
291 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
292
293 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
294 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
295 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
296
297 %clean
298 rm -rf $RPM_BUILD_ROOT
299
300 %files
301 %defattr(644,root,root,755)
302 %doc README.md docs/README.linux
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
310
311 # legacy xbmc compatibility links
312 %attr(755,root,root) %{_bindir}/xbmc
313 %attr(755,root,root) %{_bindir}/xbmc-standalone
314 %{_datadir}/xsessions/xbmc.desktop
This page took 0.0599 seconds and 4 git commands to generate.