]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
BR, Mesa-libEGL-devel, libatomic-devel
[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 Krypton
56 Summary:        Kodi is a free and open source media-player and entertainment hub
57 Name:           kodi
58 Version:        17.6
59 Release:        1
60 License:        GPL v2+ and GPL v3+
61 Group:          Applications/Multimedia
62 #Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
63 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
64 # Source0-md5:  a64c2fc56ddc41b9b0dded55eaabf170
65 Patch0:         jpeglib-boolean.patch
66 Patch1:         disable-static.patch
67 Patch2:         dvdread.patch
68 Patch3:         ffmpeg3.patch
69 Patch4:         gcc5.patch
70 URL:            http://kodi.tv/
71 BuildRequires:  Mesa-libEGL-devel
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:  libatomic-devel
105 BuildRequires:  libbluray-devel >= 0.7.0
106 BuildRequires:  libcap-devel
107 BuildRequires:  libcdio-devel
108 %{?with_libcec:BuildRequires:   libcec-devel >= 3.0.0}
109 BuildRequires:  libdrm-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:  libmicrohttpd-devel
118 BuildRequires:  libmodplug-devel
119 BuildRequires:  libmpeg2-devel
120 BuildRequires:  libogg-devel
121 BuildRequires:  libplist-devel
122 BuildRequires:  libpng-devel
123 BuildRequires:  librtmp-devel
124 BuildRequires:  libsamplerate-devel
125 BuildRequires:  libsmbclient-devel
126 BuildRequires:  libssh-devel
127 BuildRequires:  libstdc++-devel
128 BuildRequires:  libtiff-devel
129 BuildRequires:  libtool
130 BuildRequires:  libuuid-devel
131 BuildRequires:  libva-devel
132 BuildRequires:  libva-x11-devel
133 BuildRequires:  libvdpau-devel
134 BuildRequires:  libvorbis-devel
135 BuildRequires:  libxml2-devel >= 2.0
136 BuildRequires:  libxslt-devel
137 BuildRequires:  lzo-devel
138 BuildRequires:  mysql-devel
139 %ifarch %{ix86}
140 BuildRequires:  nasm
141 %endif
142 BuildRequires:  openssl-devel
143 BuildRequires:  pcre-cxx-devel
144 BuildRequires:  pkgconfig
145 BuildRequires:  pulseaudio-devel >= 1.0
146 BuildRequires:  python-devel >= 1:2.6
147 BuildRequires:  rpm-pythonprov
148 BuildRequires:  rpmbuild(macros) >= 1.566
149 BuildRequires:  sed >= 4.0
150 BuildRequires:  sqlite3-devel
151 BuildRequires:  swig
152 BuildRequires:  taglib-devel >= 1.8
153 BuildRequires:  tinyxml-devel >= 2.6.2
154 BuildRequires:  udev-devel
155 BuildRequires:  unzip
156 BuildRequires:  xorg-lib-libX11-devel
157 BuildRequires:  xorg-lib-libXext-devel
158 BuildRequires:  xorg-lib-libXrandr-devel
159 BuildRequires:  yajl-devel >= 2
160 BuildRequires:  zip
161 BuildRequires:  zlib-devel
162 # kodi uses it's own, modified squish
163 BuildConflicts: squish-devel
164 #https://github.com/sahlberg/libnfs
165 BuildRequires:  libnfs-devel
166 #http://sites.google.com/site/alexthepuffin/home
167 #BuildRequires: afpfs-ng-devel
168 #BuildRequires: shairplay-devel
169 Requires:       /usr/bin/glxinfo
170 Requires:       SDL >= 1.2.14-5
171 Requires:       lsb-release
172 Requires:       xorg-app-xdpyinfo
173 # dlopened libraries:
174 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
175 Requires:       curl-libs
176 Requires:       libass
177 Requires:       libbluray
178 Requires:       libmodplug
179 Requires:       libmpeg2-libs
180 Requires:       libogg
181 Requires:       libplist
182 Requires:       libvorbis
183 Obsoletes:      xbmc < 14.0
184 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
185
186 %description
187 Kodi Entertainment Center (formerly XBMC) is a free and open-source
188 media player software developed by the XBMC Foundation, a non-profit
189 technology consortium. Kodi is available for multiple operating
190 systems and hardware platforms, with a software 10-foot user interface
191 for use with televisions and remote controls. It allows users to play
192 and view most videos, music, such as podcasts from the internet, and
193 all common digital media files from local and network storage media.
194
195 %prep
196 %setup -q -n xbmc-%{version}-%{codename}
197 #%patch0 -p1
198 %patch1 -p1
199 #%{?with_system_dvdread:%patch2 -p1}
200 #%patch3 -p1
201 #%patch4 -p1
202
203 #%{__rm} -r lib/cximage-6.0/zlib
204 #%{__rm} -r lib/libhdhomerun
205 #%{__rm} -r lib/libmpeg2
206 #%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
207 #%{__rm} -r lib/libbluray
208 #%{__rm} -r lib/librtmp
209 %{__rm} -r lib/win32
210 #%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
211
212 %if %{without system_ffmpeg}
213 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
214 %endif
215
216 %build
217 #%{__make} -C tools/depends/native/libsquish-native \
218 #       CXX="%{__cxx}"
219
220 ./bootstrap
221 %configure \
222         ac_cv_type__Bool=yes \
223         --disable-silent-rules \
224         --disable-debug \
225         --disable-ccache \
226         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
227         %{__enable_disable afpclient} \
228         %{__enable_disable airplay} \
229         %{__enable_disable airtunes} \
230         %{__enable_disable alsa} \
231         %{__enable_disable asap_codec asap-codec} \
232         %{__enable_disable avahi} \
233         %{__enable_disable dbus} \
234         %{__enable_disable dvdcss} \
235         %{__enable_disable gles} \
236         %{__enable_disable gl} \
237         %{__enable_disable gtest} \
238         %{__enable_disable joystick} \
239         %{__enable_disable libbluray} \
240         %{__enable_disable libcap} \
241         %{__enable_disable libcec} \
242         %{__enable_disable libgif} \
243         %{__enable_disable libusb} \
244         %{__enable_disable mdnsembedded} \
245         %{__enable_disable mid} \
246         %{__enable_disable mysql} \
247         %{__enable_disable nfs} \
248         %{__enable_disable non_free non-free} \
249         %{__enable_disable openmax} \
250         %{__enable_disable optical_drive optical-drive} \
251         %{__enable_disable profiling} \
252         %{__enable_disable pulse} \
253         %{__enable_disable rtmp} \
254         %{__enable_disable samba} \
255         %{__enable_disable sdl} \
256         %{__enable_disable ssh} \
257         %{__enable_disable tegra} \
258         %{__enable_disable texturepacker} \
259         %{__enable_disable udev} \
260         %{__enable_disable upnp} \
261         %{__enable_disable vaapi} \
262         %{__enable_disable vdpau} \
263         %{__enable_disable vtbdecoder} \
264         %{__enable_disable wayland} \
265         %{__enable_disable webserver} \
266         %{__enable_disable x11} \
267         %{__enable_disable xrandr} \
268         %{nil}
269
270 %{__make} V=1
271
272 %install
273 rm -rf $RPM_BUILD_ROOT
274 %{__make} install \
275         DESTDIR=$RPM_BUILD_ROOT
276
277 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
278
279 # no -devel package yet
280 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
281 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
282
283 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
284 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
285 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
286
287 %clean
288 rm -rf $RPM_BUILD_ROOT
289
290 %files
291 %defattr(644,root,root,755)
292 %doc README.md docs/README.linux
293 %attr(755,root,root) %{_bindir}/kodi
294 %attr(755,root,root) %{_bindir}/kodi-standalone
295 %{_datadir}/%{name}
296 %attr(755,root,root) %{_libdir}/%{name}
297 %{_desktopdir}/kodi.desktop
298 %{_iconsdir}/hicolor/*/apps/%{name}.png
299 %{_datadir}/xsessions/kodi.desktop
300
301 # legacy xbmc compatibility links
302 %attr(755,root,root) %{_bindir}/xbmc
303 %attr(755,root,root) %{_bindir}/xbmc-standalone
304 %{_datadir}/xsessions/xbmc.desktop
This page took 0.095064 seconds and 4 git commands to generate.