]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
fix system ffmpeg build, enable it
[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_with     hal             # build with HAL
23 %bcond_without  joystick        # SDL joystick support
24 %bcond_without  libcap          # libcap support
25 %bcond_with     libcec          # libcec support
26 %bcond_with     libusb          # libusb support
27 %bcond_with     mdnsembedded    # mDNSEmbedded support
28 %bcond_without  mysql           # MySQL
29 %bcond_with     nfs             # NFS support via libnfs
30 %bcond_without  non_free        # componentents with non-compliant licenses
31 %bcond_with     openmax         # OpenMax decoding, requires OpenGLES
32 %bcond_without  optical_drive   # optical drive
33 %bcond_without  projectm        # ProjectM visualisation
34 %bcond_without  pulse           # PulseAudio support
35 %bcond_without  rsxs            # really slick X screensavers
36 %bcond_without  rtmp            # RTMP support via librtmp
37 %bcond_without  samba           # SAMBA support (default is enabled)
38 %bcond_without  sdl             # SDL
39 %bcond_without  spectrum        # Spectrum visualisation
40 %bcond_without  ssh             # SSH SFTP support (default is enabled)
41 %bcond_without  texturepacker   # texturepacker support
42 %bcond_without  udev            # udev support
43 %bcond_without  upnp            # UPnP support (default is enabled)
44 %bcond_without  vaapi           # VAAPI decoding
45 %bcond_without  vdpau           # VDPAU decoding
46 %bcond_with     vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
47 %bcond_without  waveform        # Waveform visualisation
48 %bcond_without  webserver       # webserver
49 %bcond_without  x11             # x11 'Linux Only'
50 %bcond_without  xrandr          # XRandR support
51 # System libs:
52 %bcond_without  system_ffmpeg   # build with system ffmpeg
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 URL:            http://kodi.tv/
68 BuildRequires:  Mesa-libGLU-devel
69 BuildRequires:  OpenGL-devel
70 BuildRequires:  SDL2-devel
71 BuildRequires:  SDL_image-devel
72 BuildRequires:  SDL_mixer-devel
73 BuildRequires:  alsa-lib-devel
74 BuildRequires:  autoconf
75 BuildRequires:  automake
76 BuildRequires:  avahi-devel
77 BuildRequires:  bluez-libs-devel >= 4.99
78 BuildRequires:  boost-devel
79 BuildRequires:  bzip2-devel
80 BuildRequires:  cmake
81 BuildRequires:  curl-devel
82 BuildRequires:  dbus-devel
83 BuildRequires:  doxygen
84 BuildRequires:  ffmpeg-devel
85 BuildRequires:  flac-devel
86 BuildRequires:  fontconfig-devel
87 BuildRequires:  freetype-devel
88 BuildRequires:  fribidi-devel
89 BuildRequires:  gawk
90 BuildRequires:  gettext-autopoint
91 BuildRequires:  gettext-tools
92 BuildRequires:  glew-devel
93 BuildRequires:  gperf
94 %{?with_hal:BuildRequires:      hal-devel}
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 %ifarch i686 pentium4 athlon %{x8664}
103 BuildRequires:  libcrystalhd-devel
104 %endif
105 BuildRequires:  libgcrypt-devel
106 BuildRequires:  libjpeg-devel
107 BuildRequires:  libltdl-devel
108 BuildRequires:  libmad-devel
109 BuildRequires:  libmicrohttpd-devel
110 BuildRequires:  libmodplug-devel
111 BuildRequires:  libmpeg2-devel
112 BuildRequires:  libogg-devel
113 BuildRequires:  libplist-devel
114 BuildRequires:  libpng-devel
115 BuildRequires:  librtmp-devel
116 BuildRequires:  libsamplerate-devel
117 BuildRequires:  libsmbclient-devel
118 BuildRequires:  libssh-devel
119 BuildRequires:  libtiff-devel
120 BuildRequires:  libtool
121 BuildRequires:  libva-devel
122 BuildRequires:  libva-glx-devel
123 BuildRequires:  libvdpau-devel
124 BuildRequires:  libvorbis-devel
125 BuildRequires:  libxslt-devel
126 BuildRequires:  lzo-devel
127 BuildRequires:  mysql-devel
128 %ifarch %{ix86}
129 BuildRequires:  nasm
130 %endif
131 BuildRequires:  openssl-devel
132 BuildRequires:  pcre-cxx-devel
133 BuildRequires:  pkgconfig
134 BuildRequires:  pulseaudio-devel
135 BuildRequires:  python-devel >= 2.4
136 BuildRequires:  rpm-pythonprov
137 BuildRequires:  rpmbuild(macros) >= 1.566
138 BuildRequires:  sed >= 4.0
139 BuildRequires:  sqlite3-devel
140 BuildRequires:  swig
141 BuildRequires:  taglib-devel >= 1.8
142 BuildRequires:  tinyxml-devel
143 BuildRequires:  udev-devel
144 BuildRequires:  unzip
145 BuildRequires:  xorg-lib-libX11-devel
146 BuildRequires:  xorg-lib-libXext-devel
147 BuildRequires:  xorg-lib-libXinerama-devel
148 BuildRequires:  xorg-lib-libXmu-devel
149 BuildRequires:  xorg-lib-libXrandr-devel
150 BuildRequires:  xorg-lib-libXt-devel
151 BuildRequires:  xorg-lib-libXtst-devel
152 BuildRequires:  yajl-devel
153 BuildRequires:  yasm
154 BuildRequires:  zip
155 BuildRequires:  zlib-devel
156 #https://github.com/sahlberg/libnfs
157 #BuildRequires: libnfs-devel
158 #http://sites.google.com/site/alexthepuffin/home
159 #BuildRequires: afpfs-ng-devel
160 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
161 #https://github.com/albertz/shairport
162 #BuildRequires: libshairport
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 %description
181 Kodi Entertainment Center (formerly XBMC) is a free and open-source
182 media player software developed by the XBMC Foundation, a non-profit
183 technology consortium. Kodi is available for multiple operating
184 systems and hardware platforms, with a software 10-foot user interface
185 for use with televisions and remote controls. It allows users to play
186 and view most videos, music, such as podcasts from the internet, and
187 all common digital media files from local and network storage media.
188
189 %prep
190 %setup -q -n xbmc-%{version}-%{codename}
191 %patch0 -p1
192 %patch1 -p0
193
194 %if %{without system_ffmpeg}
195 ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
196 %endif
197
198 %build
199 ./bootstrap
200 %configure \
201         --disable-silent-rules \
202         --disable-debug \
203         --disable-ccache \
204         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
205         %{__enable_disable afpclient} \
206         %{__enable_disable airplay} \
207         %{__enable_disable airtunes} \
208         %{__enable_disable alsa} \
209         %{__enable_disable avahi} \
210         %{__enable_disable dbus} \
211         %{__enable_disable dvdcss} \
212         %{__enable_disable fishbmc} \
213         %{__enable_disable gl} \
214         %{__enable_disable goom} \
215         %{__enable_disable gtest} \
216         %{__enable_disable gtexturepacker} \
217         %{__enable_disable hal} \
218         %{__enable_disable joystick} \
219         %{__enable_disable libcap} \
220         %{__enable_disable libcec} \
221         %{__enable_disable libusb} \
222         %{__enable_disable mdnsembedded} \
223         %{__enable_disable mysql} \
224         %{__enable_disable nfs} \
225         %{__enable_disable non_free non-free} \
226         %{__enable_disable openmax} \
227         %{__enable_disable optical_drive optical-drive} \
228         %{__enable_disable projectm} \
229         %{__enable_disable pulse} \
230         %{__enable_disable rsxs} \
231         %{__enable_disable rtmp} \
232         %{__enable_disable samba} \
233         %{__enable_disable sdl} \
234         %{__enable_disable spectrum} \
235         %{__enable_disable ssh} \
236         %{__enable_disable udev} \
237         %{__enable_disable upnp} \
238         %{__enable_disable vaapi} \
239         %{__enable_disable vdpau} \
240         %{__enable_disable vtbdecoder} \
241         %{__enable_disable waveform} \
242         %{__enable_disable webserver} \
243         %{__enable_disable x11} \
244         %{__enable_disable xrandr} \
245         %{nil}
246
247 %{__make}
248
249 %install
250 rm -rf $RPM_BUILD_ROOT
251 %{__make} install \
252         DESTDIR=$RPM_BUILD_ROOT
253
254 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
255
256 # no -devel package yet
257 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
258 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
259
260 %clean
261 rm -rf $RPM_BUILD_ROOT
262
263 %files
264 %defattr(644,root,root,755)
265 %doc README.md docs/README.linux
266 %attr(755,root,root) %{_bindir}/kodi
267 %attr(755,root,root) %{_bindir}/kodi-standalone
268 %{_datadir}/%{name}
269 %attr(755,root,root) %{_libdir}/%{name}
270 %{_desktopdir}/kodi.desktop
271 %{_iconsdir}/hicolor/*/apps/%{name}.png
272 %{_datadir}/xsessions/kodi.desktop
273
274 # legacy xbmc compatibility links
275 %attr(755,root,root) %{_bindir}/xbmc
276 %attr(755,root,root) %{_bindir}/xbmc-standalone
277 %{_libdir}/xbmc
278 %{_datadir}/xbmc
279 %{_datadir}/xsessions/xbmc.desktop
This page took 0.041815 seconds and 4 git commands to generate.