]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
system ffmpeg devel BR adjust
[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
53 %define codename Helix
54 Summary:        Kodi is a free and open source media-player and entertainment hub
55 Name:           kodi
56 Version:        14.0
57 Release:        0.1
58 License:        GPL v2+ and GPL v3+
59 Group:          Applications/Multimedia
60 Source0:        http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
61 # Source0-md5:  9717c539789789b8aeaf1dcfdb9f2c69
62 Source1:        https://github.com/xbmc/FFmpeg/archive/2.4.4-%{codename}.tar.gz
63 # Source1-md5:  19b5d29ef6b5a6fc202c652fe3905d9b
64 Patch0:         jpeglib-boolean.patch
65 Patch1:         dvddemux-ffmpeg.patch
66 URL:            http://kodi.tv/
67 BuildRequires:  Mesa-libGLU-devel
68 BuildRequires:  OpenGL-devel
69 BuildRequires:  SDL2-devel
70 BuildRequires:  SDL_image-devel
71 BuildRequires:  SDL_mixer-devel
72 BuildRequires:  alsa-lib-devel
73 BuildRequires:  autoconf
74 BuildRequires:  automake
75 BuildRequires:  avahi-devel
76 BuildRequires:  bluez-libs-devel >= 4.99
77 BuildRequires:  boost-devel
78 BuildRequires:  bzip2-devel
79 BuildRequires:  cmake
80 BuildRequires:  curl-devel
81 BuildRequires:  dbus-devel
82 BuildRequires:  doxygen
83 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
84 BuildRequires:  flac-devel
85 BuildRequires:  fontconfig-devel
86 BuildRequires:  freetype-devel
87 BuildRequires:  fribidi-devel
88 BuildRequires:  gawk
89 BuildRequires:  gettext-autopoint
90 BuildRequires:  gettext-tools
91 BuildRequires:  glew-devel
92 BuildRequires:  gperf
93 BuildRequires:  jasper-devel
94 BuildRequires:  jre
95 BuildRequires:  libass-devel
96 BuildRequires:  libbluray-devel >= 0.2.1
97 BuildRequires:  libcap-devel
98 BuildRequires:  libcdio-devel
99 %{?with_libcec:BuildRequires:   libcec-devel}
100 %ifarch i686 pentium4 athlon %{x8664}
101 BuildRequires:  libcrystalhd-devel
102 %endif
103 BuildRequires:  libgcrypt-devel
104 BuildRequires:  libjpeg-devel
105 BuildRequires:  libltdl-devel
106 BuildRequires:  libmad-devel
107 BuildRequires:  libmicrohttpd-devel
108 BuildRequires:  libmodplug-devel
109 BuildRequires:  libmpeg2-devel
110 BuildRequires:  libogg-devel
111 BuildRequires:  libplist-devel
112 BuildRequires:  libpng-devel
113 BuildRequires:  librtmp-devel
114 BuildRequires:  libsamplerate-devel
115 BuildRequires:  libsmbclient-devel
116 BuildRequires:  libssh-devel
117 BuildRequires:  libtiff-devel
118 BuildRequires:  libtool
119 BuildRequires:  libva-devel
120 BuildRequires:  libva-glx-devel
121 BuildRequires:  libvdpau-devel
122 BuildRequires:  libvorbis-devel
123 BuildRequires:  libxslt-devel
124 BuildRequires:  lzo-devel
125 BuildRequires:  mysql-devel
126 %ifarch %{ix86}
127 BuildRequires:  nasm
128 %endif
129 BuildRequires:  openssl-devel
130 BuildRequires:  pcre-cxx-devel
131 BuildRequires:  pkgconfig
132 BuildRequires:  pulseaudio-devel
133 BuildRequires:  python-devel >= 2.4
134 BuildRequires:  rpm-pythonprov
135 BuildRequires:  rpmbuild(macros) >= 1.566
136 BuildRequires:  sed >= 4.0
137 BuildRequires:  sqlite3-devel
138 BuildRequires:  swig
139 BuildRequires:  taglib-devel >= 1.8
140 BuildRequires:  tinyxml-devel
141 BuildRequires:  udev-devel
142 BuildRequires:  unzip
143 BuildRequires:  xorg-lib-libX11-devel
144 BuildRequires:  xorg-lib-libXext-devel
145 BuildRequires:  xorg-lib-libXinerama-devel
146 BuildRequires:  xorg-lib-libXmu-devel
147 BuildRequires:  xorg-lib-libXrandr-devel
148 BuildRequires:  xorg-lib-libXt-devel
149 BuildRequires:  xorg-lib-libXtst-devel
150 BuildRequires:  yajl-devel
151 BuildRequires:  yasm
152 BuildRequires:  zip
153 BuildRequires:  zlib-devel
154 #https://github.com/sahlberg/libnfs
155 #BuildRequires: libnfs-devel
156 #http://sites.google.com/site/alexthepuffin/home
157 #BuildRequires: afpfs-ng-devel
158 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
159 #https://github.com/albertz/shairport
160 #BuildRequires: libshairport
161 Requires:       /usr/bin/glxinfo
162 Requires:       SDL >= 1.2.14-5
163 Requires:       lsb-release
164 Requires:       xorg-app-xdpyinfo
165 # dlopened libraries:
166 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
167 Requires:       curl-libs
168 Requires:       libass
169 Requires:       libbluray
170 Requires:       libmodplug
171 Requires:       libmpeg2-libs
172 Requires:       libogg
173 Requires:       libplist
174 Requires:       libvorbis
175 Obsoletes:      xbmc < 14.0
176 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
177
178 %description
179 Kodi Entertainment Center (formerly XBMC) is a free and open-source
180 media player software developed by the XBMC Foundation, a non-profit
181 technology consortium. Kodi is available for multiple operating
182 systems and hardware platforms, with a software 10-foot user interface
183 for use with televisions and remote controls. It allows users to play
184 and view most videos, music, such as podcasts from the internet, and
185 all common digital media files from local and network storage media.
186
187 %prep
188 %setup -q -n xbmc-%{version}-%{codename}
189 %patch0 -p1
190 %patch1 -p0
191
192 %if %{without system_ffmpeg}
193 ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
194 %endif
195
196 %build
197 ./bootstrap
198 %configure \
199         --disable-silent-rules \
200         --disable-debug \
201         --disable-ccache \
202         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
203         %{__enable_disable afpclient} \
204         %{__enable_disable airplay} \
205         %{__enable_disable airtunes} \
206         %{__enable_disable alsa} \
207         %{__enable_disable avahi} \
208         %{__enable_disable dbus} \
209         %{__enable_disable dvdcss} \
210         %{__enable_disable fishbmc} \
211         %{__enable_disable gl} \
212         %{__enable_disable goom} \
213         %{__enable_disable gtest} \
214         %{__enable_disable texturepacker} \
215         %{__enable_disable joystick} \
216         %{__enable_disable libcap} \
217         %{__enable_disable libcec} \
218         %{__enable_disable libusb} \
219         %{__enable_disable mdnsembedded} \
220         %{__enable_disable mysql} \
221         %{__enable_disable nfs} \
222         %{__enable_disable non_free non-free} \
223         %{__enable_disable openmax} \
224         %{__enable_disable optical_drive optical-drive} \
225         %{__enable_disable projectm} \
226         %{__enable_disable pulse} \
227         %{__enable_disable rsxs} \
228         %{__enable_disable rtmp} \
229         %{__enable_disable samba} \
230         %{__enable_disable sdl} \
231         %{__enable_disable spectrum} \
232         %{__enable_disable ssh} \
233         %{__enable_disable udev} \
234         %{__enable_disable upnp} \
235         %{__enable_disable vaapi} \
236         %{__enable_disable vdpau} \
237         %{__enable_disable vtbdecoder} \
238         %{__enable_disable waveform} \
239         %{__enable_disable webserver} \
240         %{__enable_disable x11} \
241         %{__enable_disable xrandr} \
242         %{nil}
243
244 %{__make}
245
246 %install
247 rm -rf $RPM_BUILD_ROOT
248 %{__make} install \
249         DESTDIR=$RPM_BUILD_ROOT
250
251 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
252
253 # no -devel package yet
254 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
255 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
256
257 %clean
258 rm -rf $RPM_BUILD_ROOT
259
260 %files
261 %defattr(644,root,root,755)
262 %doc README.md docs/README.linux
263 %attr(755,root,root) %{_bindir}/kodi
264 %attr(755,root,root) %{_bindir}/kodi-standalone
265 %{_datadir}/%{name}
266 %attr(755,root,root) %{_libdir}/%{name}
267 %{_desktopdir}/kodi.desktop
268 %{_iconsdir}/hicolor/*/apps/%{name}.png
269 %{_datadir}/xsessions/kodi.desktop
270
271 # legacy xbmc compatibility links
272 %attr(755,root,root) %{_bindir}/xbmc
273 %attr(755,root,root) %{_bindir}/xbmc-standalone
274 %{_libdir}/xbmc
275 %{_datadir}/xbmc
276 %{_datadir}/xsessions/xbmc.desktop
This page took 0.048424 seconds and 4 git commands to generate.