]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
enable nfs and libusb
[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  fishbmc         # FishBMC visualisation
17 %bcond_without  gl              # OpenGL rendering
18 %bcond_without  goom            # GOOM visualisation
19 %bcond_with     gtest           # configure Google Test Framework
20 %bcond_without  joystick        # SDL joystick support
21 %bcond_without  libcap          # libcap support
22 %bcond_with     libcec          # libcec support
23 %bcond_without  libusb          # libusb support
24 %bcond_with     mdnsembedded    # mDNSEmbedded support
25 %bcond_without  mysql           # MySQL
26 %bcond_without  nfs             # NFS support via libnfs
27 %bcond_without  non_free        # componentents with non-compliant licenses
28 %bcond_with     openmax         # OpenMax decoding, requires OpenGLES
29 %bcond_without  optical_drive   # optical drive
30 %bcond_without  projectm        # ProjectM visualisation
31 %bcond_without  pulse           # PulseAudio support
32 %bcond_without  rsxs            # really slick X screensavers
33 %bcond_without  rtmp            # RTMP support via librtmp
34 %bcond_without  samba           # SAMBA support
35 %bcond_without  sdl             # SDL
36 %bcond_without  spectrum        # Spectrum visualisation
37 %bcond_without  ssh             # SSH SFTP support
38 %bcond_without  texturepacker   # texturepacker support
39 %bcond_without  udev            # udev support
40 %bcond_without  upnp            # UPnP support
41 %bcond_without  vaapi           # VAAPI decoding
42 %bcond_without  vdpau           # VDPAU decoding
43 %bcond_with     vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
44 %bcond_without  waveform        # Waveform visualisation
45 %bcond_without  webserver       # webserver
46 %bcond_without  x11             # x11 'Linux Only'
47 %bcond_without  xrandr          # XRandR support
48 %bcond_with     asap_codec      # ASAP ADPCM support
49 %bcond_with     gles            # OpenGLES rendering
50 %bcond_without  libbluray       # libbluray support
51 %bcond_without  mid             # MID support
52 %bcond_with     profiling       # gprof profiling
53 %bcond_with     tegra           # Tegra2 arm
54 %bcond_with     wayland         # wayland
55 # System libs:
56 %bcond_without  system_ffmpeg   # build with system ffmpeg
57 %bcond_without  system_dvdread  # build with system dvdread
58
59 %define codename Helix
60 Summary:        Kodi is a free and open source media-player and entertainment hub
61 Name:           kodi
62 Version:        14.0
63 Release:        0.3
64 License:        GPL v2+ and GPL v3+
65 Group:          Applications/Multimedia
66 Source0:        http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
67 # Source0-md5:  9717c539789789b8aeaf1dcfdb9f2c69
68 Source1:        https://github.com/xbmc/FFmpeg/archive/2.4.4-%{codename}.tar.gz
69 # Source1-md5:  19b5d29ef6b5a6fc202c652fe3905d9b
70 Patch0:         jpeglib-boolean.patch
71 Patch1:         dvddemux-ffmpeg.patch
72 Patch2:         dvdread.patch
73 URL:            http://kodi.tv/
74 BuildRequires:  Mesa-libGLU-devel
75 BuildRequires:  OpenGL-devel
76 BuildRequires:  SDL2-devel
77 BuildRequires:  SDL_image-devel
78 BuildRequires:  SDL_mixer-devel
79 BuildRequires:  alsa-lib-devel
80 BuildRequires:  autoconf
81 BuildRequires:  automake
82 BuildRequires:  avahi-devel
83 BuildRequires:  bluez-libs-devel >= 4.99
84 BuildRequires:  boost-devel
85 BuildRequires:  bzip2-devel
86 BuildRequires:  cmake
87 BuildRequires:  curl-devel
88 BuildRequires:  dbus-devel
89 BuildRequires:  doxygen
90 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
91 BuildRequires:  flac-devel
92 BuildRequires:  fontconfig-devel
93 BuildRequires:  freetype-devel
94 BuildRequires:  fribidi-devel
95 BuildRequires:  gawk
96 BuildRequires:  gettext-autopoint
97 BuildRequires:  gettext-tools
98 BuildRequires:  glew-devel
99 BuildRequires:  gperf
100 BuildRequires:  jasper-devel
101 BuildRequires:  jre
102 BuildRequires:  libass-devel
103 BuildRequires:  libbluray-devel >= 0.2.1
104 BuildRequires:  libcap-devel
105 BuildRequires:  libcdio-devel
106 %{?with_libcec:BuildRequires:   libcec-devel}
107 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
108 %ifarch i686 pentium4 athlon %{x8664}
109 BuildRequires:  libcrystalhd-devel
110 %endif
111 BuildRequires:  libgcrypt-devel
112 BuildRequires:  libjpeg-devel
113 BuildRequires:  libltdl-devel
114 BuildRequires:  libmad-devel
115 BuildRequires:  libmicrohttpd-devel
116 BuildRequires:  libmodplug-devel
117 BuildRequires:  libmpeg2-devel
118 BuildRequires:  libogg-devel
119 BuildRequires:  libplist-devel
120 BuildRequires:  libpng-devel
121 BuildRequires:  librtmp-devel
122 BuildRequires:  libsamplerate-devel
123 BuildRequires:  libsmbclient-devel
124 BuildRequires:  libssh-devel
125 BuildRequires:  libtiff-devel
126 BuildRequires:  libtool
127 BuildRequires:  libva-devel
128 BuildRequires:  libva-glx-devel
129 BuildRequires:  libvdpau-devel
130 BuildRequires:  libvorbis-devel
131 BuildRequires:  libxslt-devel
132 BuildRequires:  lzo-devel
133 BuildRequires:  mysql-devel
134 %ifarch %{ix86}
135 BuildRequires:  nasm
136 %endif
137 BuildRequires:  openssl-devel
138 BuildRequires:  pcre-cxx-devel
139 BuildRequires:  pkgconfig
140 BuildRequires:  pulseaudio-devel
141 BuildRequires:  python-devel >= 2.4
142 BuildRequires:  rpm-pythonprov
143 BuildRequires:  rpmbuild(macros) >= 1.566
144 BuildRequires:  sed >= 4.0
145 BuildRequires:  sqlite3-devel
146 BuildRequires:  swig
147 BuildRequires:  taglib-devel >= 1.8
148 BuildRequires:  tinyxml-devel
149 BuildRequires:  udev-devel
150 BuildRequires:  unzip
151 BuildRequires:  xorg-lib-libX11-devel
152 BuildRequires:  xorg-lib-libXext-devel
153 BuildRequires:  xorg-lib-libXinerama-devel
154 BuildRequires:  xorg-lib-libXmu-devel
155 BuildRequires:  xorg-lib-libXrandr-devel
156 BuildRequires:  xorg-lib-libXt-devel
157 BuildRequires:  xorg-lib-libXtst-devel
158 BuildRequires:  yajl-devel
159 BuildRequires:  yasm
160 BuildRequires:  zip
161 BuildRequires:  zlib-devel
162 #https://github.com/sahlberg/libnfs
163 #BuildRequires: libnfs-devel
164 #http://sites.google.com/site/alexthepuffin/home
165 #BuildRequires: afpfs-ng-devel
166 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
167 #https://github.com/albertz/shairport
168 #BuildRequires: libshairport
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 %{?with_system_ffmpeg:%patch1 -p0}
199 %{?with_system_dvdread:%patch2 -p1}
200
201 rm -r lib/cximage-6.0/zlib
202 #rm -r lib/libhdhomerun
203 rm -r lib/libmpeg2
204 rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
205 rm -r lib/enca
206 rm -r lib/libbluray
207 rm -r lib/libmicrohttpd
208 rm -r lib/libmodplug
209 rm -r lib/librtmp
210 rm -r lib/win32
211 %{?with_system_dvdread:rm -r lib/libdvd/libdvdread}
212
213 %if %{without system_ffmpeg}
214 ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
215 %endif
216
217 %build
218 ./bootstrap
219 %configure \
220         --disable-silent-rules \
221         --disable-debug \
222         --disable-ccache \
223         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
224         %{__enable_disable afpclient} \
225         %{__enable_disable airplay} \
226         %{__enable_disable airtunes} \
227         %{__enable_disable alsa} \
228         %{__enable_disable asap_codec asap-codec} \
229         %{__enable_disable avahi} \
230         %{__enable_disable dbus} \
231         %{__enable_disable dvdcss} \
232         %{__enable_disable fishbmc} \
233         %{__enable_disable gles} \
234         %{__enable_disable gl} \
235         %{__enable_disable goom} \
236         %{__enable_disable gtest} \
237         %{__enable_disable joystick} \
238         %{__enable_disable libbluray} \
239         %{__enable_disable libcap} \
240         %{__enable_disable libcec} \
241         %{__enable_disable libusb} \
242         %{__enable_disable mdnsembedded} \
243         %{__enable_disable mid} \
244         %{__enable_disable mysql} \
245         %{__enable_disable nfs} \
246         %{__enable_disable non_free non-free} \
247         %{__enable_disable openmax} \
248         %{__enable_disable optical_drive optical-drive} \
249         %{__enable_disable profiling} \
250         %{__enable_disable projectm} \
251         %{__enable_disable pulse} \
252         %{__enable_disable rsxs} \
253         %{__enable_disable rtmp} \
254         %{__enable_disable samba} \
255         %{__enable_disable sdl} \
256         %{__enable_disable spectrum} \
257         %{__enable_disable ssh} \
258         %{__enable_disable tegra} \
259         %{__enable_disable texturepacker} \
260         %{__enable_disable udev} \
261         %{__enable_disable upnp} \
262         %{__enable_disable vaapi} \
263         %{__enable_disable vdpau} \
264         %{__enable_disable vtbdecoder} \
265         %{__enable_disable waveform} \
266         %{__enable_disable wayland} \
267         %{__enable_disable webserver} \
268         %{__enable_disable x11} \
269         %{__enable_disable xrandr} \
270         %{nil}
271
272 %{__make} V=1
273
274 %install
275 rm -rf $RPM_BUILD_ROOT
276 %{__make} install \
277         DESTDIR=$RPM_BUILD_ROOT
278
279 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
280
281 # no -devel package yet
282 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
283 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
284
285 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
286 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
287 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
288
289 %clean
290 rm -rf $RPM_BUILD_ROOT
291
292 %files
293 %defattr(644,root,root,755)
294 %doc README.md docs/README.linux
295 %attr(755,root,root) %{_bindir}/kodi
296 %attr(755,root,root) %{_bindir}/kodi-standalone
297 %{_datadir}/%{name}
298 %attr(755,root,root) %{_libdir}/%{name}
299 %{_desktopdir}/kodi.desktop
300 %{_iconsdir}/hicolor/*/apps/%{name}.png
301 %{_datadir}/xsessions/kodi.desktop
302
303 # legacy xbmc compatibility links
304 %attr(755,root,root) %{_bindir}/xbmc
305 %attr(755,root,root) %{_bindir}/xbmc-standalone
306 %{_datadir}/xsessions/xbmc.desktop
This page took 0.058264 seconds and 4 git commands to generate.