]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
cleanup todo
[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 (only for linux/freebsd)
13 %bcond_without  avahi           # Avahi support (default is enabled if libavahi-common and libavahi-client is found)
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_with     libusb          # libusb support
24 %bcond_with     mdnsembedded    # mDNSEmbedded support
25 %bcond_without  mysql           # MySQL
26 %bcond_with     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 (default is enabled)
35 %bcond_without  sdl             # SDL
36 %bcond_without  spectrum        # Spectrum visualisation
37 %bcond_without  ssh             # SSH SFTP support (default is enabled)
38 %bcond_without  texturepacker   # texturepacker support
39 %bcond_without  udev            # udev support
40 %bcond_without  upnp            # UPnP support (default is enabled)
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 # System libs:
49 %bcond_without  system_ffmpeg   # build with system ffmpeg
50 %bcond_without  system_dvdread  # build with system dvdread
51
52 %define codename Helix
53 Summary:        Kodi is a free and open source media-player and entertainment hub
54 Name:           kodi
55 Version:        14.0
56 Release:        0.2
57 License:        GPL v2+ and GPL v3+
58 Group:          Applications/Multimedia
59 Source0:        http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
60 # Source0-md5:  9717c539789789b8aeaf1dcfdb9f2c69
61 Source1:        https://github.com/xbmc/FFmpeg/archive/2.4.4-%{codename}.tar.gz
62 # Source1-md5:  19b5d29ef6b5a6fc202c652fe3905d9b
63 Patch0:         jpeglib-boolean.patch
64 Patch1:         dvddemux-ffmpeg.patch
65 Patch2:         dvdread.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 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
101 %ifarch i686 pentium4 athlon %{x8664}
102 BuildRequires:  libcrystalhd-devel
103 %endif
104 BuildRequires:  libgcrypt-devel
105 BuildRequires:  libjpeg-devel
106 BuildRequires:  libltdl-devel
107 BuildRequires:  libmad-devel
108 BuildRequires:  libmicrohttpd-devel
109 BuildRequires:  libmodplug-devel
110 BuildRequires:  libmpeg2-devel
111 BuildRequires:  libogg-devel
112 BuildRequires:  libplist-devel
113 BuildRequires:  libpng-devel
114 BuildRequires:  librtmp-devel
115 BuildRequires:  libsamplerate-devel
116 BuildRequires:  libsmbclient-devel
117 BuildRequires:  libssh-devel
118 BuildRequires:  libtiff-devel
119 BuildRequires:  libtool
120 BuildRequires:  libva-devel
121 BuildRequires:  libva-glx-devel
122 BuildRequires:  libvdpau-devel
123 BuildRequires:  libvorbis-devel
124 BuildRequires:  libxslt-devel
125 BuildRequires:  lzo-devel
126 BuildRequires:  mysql-devel
127 %ifarch %{ix86}
128 BuildRequires:  nasm
129 %endif
130 BuildRequires:  openssl-devel
131 BuildRequires:  pcre-cxx-devel
132 BuildRequires:  pkgconfig
133 BuildRequires:  pulseaudio-devel
134 BuildRequires:  python-devel >= 2.4
135 BuildRequires:  rpm-pythonprov
136 BuildRequires:  rpmbuild(macros) >= 1.566
137 BuildRequires:  sed >= 4.0
138 BuildRequires:  sqlite3-devel
139 BuildRequires:  swig
140 BuildRequires:  taglib-devel >= 1.8
141 BuildRequires:  tinyxml-devel
142 BuildRequires:  udev-devel
143 BuildRequires:  unzip
144 BuildRequires:  xorg-lib-libX11-devel
145 BuildRequires:  xorg-lib-libXext-devel
146 BuildRequires:  xorg-lib-libXinerama-devel
147 BuildRequires:  xorg-lib-libXmu-devel
148 BuildRequires:  xorg-lib-libXrandr-devel
149 BuildRequires:  xorg-lib-libXt-devel
150 BuildRequires:  xorg-lib-libXtst-devel
151 BuildRequires:  yajl-devel
152 BuildRequires:  yasm
153 BuildRequires:  zip
154 BuildRequires:  zlib-devel
155 #https://github.com/sahlberg/libnfs
156 #BuildRequires: libnfs-devel
157 #http://sites.google.com/site/alexthepuffin/home
158 #BuildRequires: afpfs-ng-devel
159 #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
160 #https://github.com/albertz/shairport
161 #BuildRequires: libshairport
162 Requires:       /usr/bin/glxinfo
163 Requires:       SDL >= 1.2.14-5
164 Requires:       lsb-release
165 Requires:       xorg-app-xdpyinfo
166 # dlopened libraries:
167 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
168 Requires:       curl-libs
169 Requires:       libass
170 Requires:       libbluray
171 Requires:       libmodplug
172 Requires:       libmpeg2-libs
173 Requires:       libogg
174 Requires:       libplist
175 Requires:       libvorbis
176 Obsoletes:      xbmc < 14.0
177 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
178
179 %description
180 Kodi Entertainment Center (formerly XBMC) is a free and open-source
181 media player software developed by the XBMC Foundation, a non-profit
182 technology consortium. Kodi is available for multiple operating
183 systems and hardware platforms, with a software 10-foot user interface
184 for use with televisions and remote controls. It allows users to play
185 and view most videos, music, such as podcasts from the internet, and
186 all common digital media files from local and network storage media.
187
188 %prep
189 %setup -q -n xbmc-%{version}-%{codename}
190 %patch0 -p1
191 %patch1 -p0
192
193 rm -r lib/cximage-6.0/zlib
194 #rm -r lib/libhdhomerun
195 rm -r lib/libmpeg2
196 rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
197 rm -r lib/enca
198 rm -r lib/libbluray
199 rm -r lib/libmicrohttpd
200 rm -r lib/libmodplug
201 rm -r lib/librtmp
202 rm -r lib/win32
203
204 %if %{without system_ffmpeg}
205 ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
206 %endif
207 %if %{with system_dvdread}
208 #rm -r lib/libdvd/libdvdread
209 %endif
210
211 %build
212 ./bootstrap
213 %configure \
214         --disable-silent-rules \
215         --disable-debug \
216         --disable-ccache \
217         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
218         %{__enable_disable afpclient} \
219         %{__enable_disable airplay} \
220         %{__enable_disable airtunes} \
221         %{__enable_disable alsa} \
222         %{__enable_disable avahi} \
223         %{__enable_disable dbus} \
224         %{__enable_disable dvdcss} \
225         %{__enable_disable fishbmc} \
226         %{__enable_disable gl} \
227         %{__enable_disable goom} \
228         %{__enable_disable gtest} \
229         %{__enable_disable texturepacker} \
230         %{__enable_disable joystick} \
231         %{__enable_disable libcap} \
232         %{__enable_disable libcec} \
233         %{__enable_disable libusb} \
234         %{__enable_disable mdnsembedded} \
235         %{__enable_disable mysql} \
236         %{__enable_disable nfs} \
237         %{__enable_disable non_free non-free} \
238         %{__enable_disable openmax} \
239         %{__enable_disable optical_drive optical-drive} \
240         %{__enable_disable projectm} \
241         %{__enable_disable pulse} \
242         %{__enable_disable rsxs} \
243         %{__enable_disable rtmp} \
244         %{__enable_disable samba} \
245         %{__enable_disable sdl} \
246         %{__enable_disable spectrum} \
247         %{__enable_disable ssh} \
248         %{__enable_disable udev} \
249         %{__enable_disable upnp} \
250         %{__enable_disable vaapi} \
251         %{__enable_disable vdpau} \
252         %{__enable_disable vtbdecoder} \
253         %{__enable_disable waveform} \
254         %{__enable_disable webserver} \
255         %{__enable_disable x11} \
256         %{__enable_disable xrandr} \
257         %{nil}
258
259 %{__make} V=1
260
261 %install
262 rm -rf $RPM_BUILD_ROOT
263 %{__make} install \
264         DESTDIR=$RPM_BUILD_ROOT
265
266 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
267
268 # no -devel package yet
269 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
270 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
271
272 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
273 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
274 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
275
276 %clean
277 rm -rf $RPM_BUILD_ROOT
278
279 %files
280 %defattr(644,root,root,755)
281 %doc README.md docs/README.linux
282 %attr(755,root,root) %{_bindir}/kodi
283 %attr(755,root,root) %{_bindir}/kodi-standalone
284 %{_datadir}/%{name}
285 %attr(755,root,root) %{_libdir}/%{name}
286 %{_desktopdir}/kodi.desktop
287 %{_iconsdir}/hicolor/*/apps/%{name}.png
288 %{_datadir}/xsessions/kodi.desktop
289
290 # legacy xbmc compatibility links
291 %attr(755,root,root) %{_bindir}/xbmc
292 %attr(755,root,root) %{_bindir}/xbmc-standalone
293 %{_datadir}/xsessions/xbmc.desktop
This page took 0.157573 seconds and 4 git commands to generate.