]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
add note about unfinished update branch
[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  gl              # 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  libgif          # gif support via libgif
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_without  system_dvdread  # build with system dvdread
54
55 %define codename Jarvis
56 Summary:        Kodi is a free and open source media-player and entertainment hub
57 Name:           kodi
58 # for 17.x see dev-17.6 branch
59 Version:        16.1
60 Release:        3
61 License:        GPL v2+ and GPL v3+
62 Group:          Applications/Multimedia
63 #Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
64 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
65 # Source0-md5:  79358ad5f77f42c5498a9412d5a78dd5
66 Patch0:         jpeglib-boolean.patch
67 Patch1:         disable-static.patch
68 Patch2:         dvdread.patch
69 Patch3:         ffmpeg3.patch
70 Patch4:         gcc5.patch
71 URL:            http://kodi.tv/
72 BuildRequires:  OpenGL-GLU-devel
73 BuildRequires:  OpenGL-devel
74 BuildRequires:  SDL2-devel
75 BuildRequires:  alsa-lib-devel
76 BuildRequires:  autoconf >= 2.59
77 BuildRequires:  automake
78 BuildRequires:  avahi-devel
79 BuildRequires:  bluez-libs-devel >= 4.99
80 BuildRequires:  boost-devel
81 BuildRequires:  bzip2-devel
82 BuildRequires:  cmake
83 BuildRequires:  crossguid-devel
84 BuildRequires:  curl-devel
85 BuildRequires:  dbus-devel
86 BuildRequires:  dcadec-devel
87 BuildRequires:  doxygen
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:  fontconfig-devel
92 BuildRequires:  freetype-devel
93 BuildRequires:  fribidi-devel
94 BuildRequires:  gawk
95 BuildRequires:  gettext-autopoint
96 BuildRequires:  gettext-tools
97 BuildRequires:  giflib-devel
98 %{?with_libgif:BuildRequires:   giflib-devel}
99 BuildRequires:  glew-devel
100 BuildRequires:  gperf
101 BuildRequires:  jasper-devel
102 BuildRequires:  jre
103 BuildRequires:  libass-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 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
110 %ifarch i686 pentium4 athlon %{x8664}
111 BuildRequires:  libcrystalhd-devel
112 %endif
113 BuildRequires:  libgcrypt-devel
114 BuildRequires:  libjpeg-devel
115 BuildRequires:  libltdl-devel
116 BuildRequires:  libmicrohttpd-devel
117 BuildRequires:  libmodplug-devel
118 BuildRequires:  libmpeg2-devel
119 BuildRequires:  libogg-devel
120 BuildRequires:  libplist-devel
121 BuildRequires:  libpng-devel
122 BuildRequires:  librtmp-devel
123 BuildRequires:  libsamplerate-devel
124 BuildRequires:  libsmbclient-devel
125 BuildRequires:  libssh-devel
126 BuildRequires:  libstdc++-devel
127 BuildRequires:  libtiff-devel
128 BuildRequires:  libtool
129 BuildRequires:  libuuid-devel
130 BuildRequires:  libva-devel
131 BuildRequires:  libva-x11-devel
132 BuildRequires:  libvdpau-devel
133 BuildRequires:  libvorbis-devel
134 BuildRequires:  libxml2-devel >= 2.0
135 BuildRequires:  libxslt-devel
136 BuildRequires:  lzo-devel
137 BuildRequires:  mysql-devel
138 %ifarch %{ix86}
139 BuildRequires:  nasm
140 %endif
141 BuildRequires:  openssl-devel
142 BuildRequires:  pcre-cxx-devel
143 BuildRequires:  pkgconfig
144 BuildRequires:  pulseaudio-devel >= 1.0
145 BuildRequires:  python-devel >= 1:2.6
146 BuildRequires:  rpm-pythonprov
147 BuildRequires:  rpmbuild(macros) >= 1.566
148 BuildRequires:  sed >= 4.0
149 BuildRequires:  sqlite3-devel
150 BuildRequires:  swig
151 BuildRequires:  taglib-devel >= 1.8
152 BuildRequires:  tinyxml-devel >= 2.6.2
153 BuildRequires:  udev-devel
154 BuildRequires:  unzip
155 BuildRequires:  xorg-lib-libX11-devel
156 BuildRequires:  xorg-lib-libXext-devel
157 BuildRequires:  xorg-lib-libXrandr-devel
158 BuildRequires:  yajl-devel >= 2
159 BuildRequires:  zip
160 BuildRequires:  zlib-devel
161 # kodi uses it's own, modified squish
162 BuildConflicts: squish-devel
163 #https://github.com/sahlberg/libnfs
164 BuildRequires:  libnfs-devel
165 #http://sites.google.com/site/alexthepuffin/home
166 #BuildRequires: afpfs-ng-devel
167 #BuildRequires: shairplay-devel
168 Requires:       /usr/bin/glxinfo
169 Requires:       SDL >= 1.2.14-5
170 Requires:       lsb-release
171 Requires:       xorg-app-xdpyinfo
172 # dlopened libraries:
173 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
174 Requires:       curl-libs
175 Requires:       libass
176 Requires:       libbluray
177 Requires:       libmodplug
178 Requires:       libmpeg2-libs
179 Requires:       libogg
180 Requires:       libplist
181 Requires:       libvorbis
182 Obsoletes:      xbmc < 14.0
183 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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}-%{codename}
196 %patch0 -p1
197 %patch1 -p1
198 %{?with_system_dvdread:%patch2 -p1}
199 %patch3 -p1
200 %patch4 -p1
201
202 %{__rm} -r lib/cximage-6.0/zlib
203 #%{__rm} -r lib/libhdhomerun
204 %{__rm} -r lib/libmpeg2
205 %{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
206 %{__rm} -r lib/libbluray
207 %{__rm} -r lib/librtmp
208 %{__rm} -r lib/win32
209 %{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
210
211 %if %{without system_ffmpeg}
212 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
213 %endif
214
215 %build
216 %{__make} -C tools/depends/native/libsquish-native \
217         CXX="%{__cxx}"
218
219 ./bootstrap
220 %configure \
221         ac_cv_type__Bool=yes \
222         --disable-silent-rules \
223         --disable-debug \
224         --disable-ccache \
225         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
226         %{__enable_disable afpclient} \
227         %{__enable_disable airplay} \
228         %{__enable_disable airtunes} \
229         %{__enable_disable alsa} \
230         %{__enable_disable asap_codec asap-codec} \
231         %{__enable_disable avahi} \
232         %{__enable_disable dbus} \
233         %{__enable_disable dvdcss} \
234         %{__enable_disable gles} \
235         %{__enable_disable gl} \
236         %{__enable_disable gtest} \
237         %{__enable_disable joystick} \
238         %{__enable_disable libbluray} \
239         %{__enable_disable libcap} \
240         %{__enable_disable libcec} \
241         %{__enable_disable libgif} \
242         %{__enable_disable libusb} \
243         %{__enable_disable mdnsembedded} \
244         %{__enable_disable mid} \
245         %{__enable_disable mysql} \
246         %{__enable_disable nfs} \
247         %{__enable_disable non_free non-free} \
248         %{__enable_disable openmax} \
249         %{__enable_disable optical_drive optical-drive} \
250         %{__enable_disable profiling} \
251         %{__enable_disable pulse} \
252         %{__enable_disable rtmp} \
253         %{__enable_disable samba} \
254         %{__enable_disable sdl} \
255         %{__enable_disable ssh} \
256         %{__enable_disable tegra} \
257         %{__enable_disable texturepacker} \
258         %{__enable_disable udev} \
259         %{__enable_disable upnp} \
260         %{__enable_disable vaapi} \
261         %{__enable_disable vdpau} \
262         %{__enable_disable vtbdecoder} \
263         %{__enable_disable wayland} \
264         %{__enable_disable webserver} \
265         %{__enable_disable x11} \
266         %{__enable_disable xrandr} \
267         %{nil}
268
269 %{__make} V=1
270
271 %install
272 rm -rf $RPM_BUILD_ROOT
273 %{__make} install \
274         DESTDIR=$RPM_BUILD_ROOT
275
276 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
277
278 # no -devel package yet
279 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
280 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
281
282 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
283 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
284 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
285
286 %clean
287 rm -rf $RPM_BUILD_ROOT
288
289 %files
290 %defattr(644,root,root,755)
291 %doc README.md docs/README.linux
292 %attr(755,root,root) %{_bindir}/kodi
293 %attr(755,root,root) %{_bindir}/kodi-standalone
294 %{_datadir}/%{name}
295 %attr(755,root,root) %{_libdir}/%{name}
296 %{_desktopdir}/kodi.desktop
297 %{_iconsdir}/hicolor/*/apps/%{name}.png
298 %{_datadir}/xsessions/kodi.desktop
299
300 # legacy xbmc compatibility links
301 %attr(755,root,root) %{_bindir}/xbmc
302 %attr(755,root,root) %{_bindir}/xbmc-standalone
303 %{_datadir}/xsessions/xbmc.desktop
This page took 0.055927 seconds and 4 git commands to generate.