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