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