]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
update BR (cleanbuild)
[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  gl              # OpenGL rendering
17 %bcond_with     gtest           # configure Google Test Framework
18 %bcond_without  joystick        # SDL joystick support
19 %bcond_without  libcap          # libcap support
20 %bcond_with     libcec          # libcec support
21 %bcond_without  libgif          # gif support via libgif
22 %bcond_without  libusb          # libusb support
23 %bcond_with     mdnsembedded    # mDNSEmbedded support
24 %bcond_without  mysql           # MySQL
25 %bcond_without  nfs             # NFS support via libnfs
26 %bcond_without  non_free        # componentents with non-compliant licenses
27 %bcond_with     openmax         # OpenMax decoding, requires OpenGLES
28 %bcond_without  optical_drive   # optical drive
29 %bcond_without  projectm        # ProjectM visualisation
30 %bcond_without  pulse           # PulseAudio support
31 %bcond_without  rtmp            # RTMP support via librtmp
32 %bcond_without  samba           # SAMBA support
33 %bcond_without  sdl             # SDL
34 %bcond_without  ssh             # SSH SFTP support
35 %bcond_without  texturepacker   # texturepacker support
36 %bcond_without  udev            # udev support
37 %bcond_without  upnp            # UPnP support
38 %bcond_without  vaapi           # VAAPI decoding
39 %bcond_without  vdpau           # VDPAU decoding
40 %bcond_with     vtbdecoder      # VTBDecoder decoding (VTB Decoder not supported on this platform)
41 %bcond_without  webserver       # webserver
42 %bcond_without  x11             # x11 'Linux Only'
43 %bcond_without  xrandr          # XRandR support
44 %bcond_with     asap_codec      # ASAP ADPCM support
45 %bcond_with     gles            # OpenGLES rendering
46 %bcond_without  libbluray       # libbluray support
47 %bcond_without  mid             # MID support
48 %bcond_with     profiling       # gprof profiling
49 %bcond_with     tegra           # Tegra2 arm
50 %bcond_with     wayland         # wayland
51 # System libs:
52 %bcond_without  system_ffmpeg   # build with system ffmpeg
53 %bcond_with     system_dvdread  # build with system dvdread
54
55 %define codename Krypton
56 Summary:        Kodi is a free and open source media-player and entertainment hub
57 Name:           kodi
58 Version:        17.6
59 Release:        1
60 License:        GPL v2+ and GPL v3+
61 Group:          Applications/Multimedia
62 #Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
63 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
64 # Source0-md5:  a64c2fc56ddc41b9b0dded55eaabf170
65 Patch0:         jpeglib-boolean.patch
66 Patch1:         disable-static.patch
67 Patch2:         dvdread.patch
68 Patch3:         ffmpeg3.patch
69 Patch4:         gcc5.patch
70 Patch5:         libdvd.patch
71 URL:            http://kodi.tv/
72 BuildRequires:  Mesa-libEGL-devel
73 BuildRequires:  OpenGL-GLU-devel
74 BuildRequires:  OpenGL-devel
75 BuildRequires:  SDL2-devel
76 BuildRequires:  alsa-lib-devel
77 BuildRequires:  autoconf >= 2.59
78 BuildRequires:  automake
79 BuildRequires:  avahi-devel
80 BuildRequires:  bluez-libs-devel >= 4.99
81 BuildRequires:  bzip2-devel
82 BuildRequires:  cmake
83 BuildRequires:  crossguid-devel
84 BuildRequires:  curl-devel
85 BuildRequires:  dbus-devel
86 # libavcodec >= 56.26.100 libavfilter >= 5.11.102 libavformat >= 56.25.101 libavutil >= 54.20.100 libpostproc >= 53.3.100 libswscale >= 3.1.101 libswresample >= 1.1.100
87 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
88 BuildRequires:  flac-devel
89 BuildRequires:  fontconfig-devel
90 BuildRequires:  freetype-devel
91 BuildRequires:  fribidi-devel
92 BuildRequires:  gawk
93 BuildRequires:  gettext-autopoint
94 BuildRequires:  gettext-tools
95 BuildRequires:  giflib-devel
96 %{?with_libgif:BuildRequires:   giflib-devel}
97 BuildRequires:  gperf
98 BuildRequires:  jre
99 BuildRequires:  lcms2-devel
100 BuildRequires:  libass-devel
101 BuildRequires:  libatomic-devel
102 BuildRequires:  libbluray-devel >= 0.7.0
103 BuildRequires:  libcap-devel
104 BuildRequires:  libcdio-devel
105 %{?with_libcec:BuildRequires:   libcec-devel >= 3.0.0}
106 BuildRequires:  libdrm-devel
107 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
108 BuildRequires:  libgcrypt-devel
109 BuildRequires:  libjpeg-devel
110 BuildRequires:  libltdl-devel
111 BuildRequires:  libmicrohttpd-devel
112 BuildRequires:  libogg-devel
113 BuildRequires:  libplist-devel
114 BuildRequires:  libpng-devel
115 BuildRequires:  librtmp-devel
116 BuildRequires:  libsmbclient-devel
117 BuildRequires:  libssh-devel
118 BuildRequires:  libstdc++-devel
119 BuildRequires:  libtool
120 BuildRequires:  libuuid-devel
121 BuildRequires:  libva-devel
122 BuildRequires:  libva-x11-devel
123 BuildRequires:  libvdpau-devel
124 BuildRequires:  libvorbis-devel
125 BuildRequires:  libxml2-devel >= 2.0
126 BuildRequires:  libxslt-devel
127 BuildRequires:  lzo-devel
128 BuildRequires:  mysql-devel
129 %ifarch %{ix86}
130 BuildRequires:  nasm
131 %endif
132 BuildRequires:  openssl-devel
133 BuildRequires:  pcre-cxx-devel
134 BuildRequires:  pkgconfig
135 BuildRequires:  pulseaudio-devel >= 1.0
136 BuildRequires:  python-devel >= 1:2.6
137 BuildRequires:  rpm-pythonprov
138 BuildRequires:  rpmbuild(macros) >= 1.566
139 BuildRequires:  sed >= 4.0
140 BuildRequires:  sqlite3-devel
141 BuildRequires:  swig
142 BuildRequires:  taglib-devel >= 1.8
143 BuildRequires:  tinyxml-devel >= 2.6.2
144 BuildRequires:  udev-devel
145 BuildRequires:  unzip
146 BuildRequires:  xorg-lib-libX11-devel
147 BuildRequires:  xorg-lib-libXext-devel
148 BuildRequires:  xorg-lib-libXrandr-devel
149 BuildRequires:  yajl-devel >= 2
150 BuildRequires:  zip
151 BuildRequires:  zlib-devel
152 # kodi uses it's own, modified squish
153 BuildConflicts: squish-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 #BuildRequires: shairplay-devel
159 Requires:       /usr/bin/glxinfo
160 Requires:       SDL >= 1.2.14-5
161 Requires:       lsb-release
162 Requires:       xorg-app-xdpyinfo
163 # dlopened libraries:
164 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
165 Requires:       curl-libs
166 Requires:       libass
167 Requires:       libbluray
168 Requires:       libmodplug
169 Requires:       libmpeg2-libs
170 Requires:       libogg
171 Requires:       libplist
172 Requires:       libvorbis
173 Obsoletes:      xbmc < 14.0
174 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
175
176 %description
177 Kodi Entertainment Center (formerly XBMC) is a free and open-source
178 media player software developed by the XBMC Foundation, a non-profit
179 technology consortium. Kodi is available for multiple operating
180 systems and hardware platforms, with a software 10-foot user interface
181 for use with televisions and remote controls. It allows users to play
182 and view most videos, music, such as podcasts from the internet, and
183 all common digital media files from local and network storage media.
184
185 %prep
186 %setup -q -n xbmc-%{version}-%{codename}
187 #%patch0 -p1
188 %patch1 -p1
189 %{?with_system_dvdread:%patch2 -p1}
190 #%patch3 -p1
191 #%patch4 -p1
192 %{!?with_system_dvdread:%patch5 -p1}
193
194 #%{__rm} -r lib/cximage-6.0/zlib
195 #%{__rm} -r lib/libhdhomerun
196 #%{__rm} -r lib/libmpeg2
197 #%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
198 #%{__rm} -r lib/libbluray
199 #%{__rm} -r lib/librtmp
200 %{__rm} -r lib/win32
201 #%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
202
203 %if %{without system_ffmpeg}
204 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
205 %endif
206
207 %build
208 #%{__make} -C tools/depends/native/libsquish-native \
209 #       CXX="%{__cxx}"
210
211 ./bootstrap
212 %configure \
213         ac_cv_type__Bool=yes \
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 asap_codec asap-codec} \
223         %{__enable_disable avahi} \
224         %{__enable_disable dbus} \
225         %{__enable_disable dvdcss} \
226         %{__enable_disable gles} \
227         %{__enable_disable gl} \
228         %{__enable_disable gtest} \
229         %{__enable_disable joystick} \
230         %{__enable_disable libbluray} \
231         %{__enable_disable libcap} \
232         %{__enable_disable libcec} \
233         %{__enable_disable libgif} \
234         %{__enable_disable libusb} \
235         %{__enable_disable mdnsembedded} \
236         %{__enable_disable mid} \
237         %{__enable_disable mysql} \
238         %{__enable_disable nfs} \
239         %{__enable_disable non_free non-free} \
240         %{__enable_disable openmax} \
241         %{__enable_disable optical_drive optical-drive} \
242         %{__enable_disable profiling} \
243         %{__enable_disable pulse} \
244         %{__enable_disable rtmp} \
245         %{__enable_disable samba} \
246         %{__enable_disable sdl} \
247         %{__enable_disable ssh} \
248         %{__enable_disable tegra} \
249         %{__enable_disable texturepacker} \
250         %{__enable_disable udev} \
251         %{__enable_disable upnp} \
252         %{__enable_disable vaapi} \
253         %{__enable_disable vdpau} \
254         %{__enable_disable vtbdecoder} \
255         %{__enable_disable wayland} \
256         %{__enable_disable webserver} \
257         %{__enable_disable x11} \
258         %{__enable_disable xrandr} \
259         %{nil}
260
261 %{__make} V=1
262
263 %install
264 rm -rf $RPM_BUILD_ROOT
265 %{__make} install \
266         DESTDIR=$RPM_BUILD_ROOT
267
268 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
269
270 # no -devel package yet
271 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
272 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc
273
274 # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues)
275 %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc
276 %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc
277
278 %clean
279 rm -rf $RPM_BUILD_ROOT
280
281 %files
282 %defattr(644,root,root,755)
283 %doc README.md docs/README.linux
284 %attr(755,root,root) %{_bindir}/kodi
285 %attr(755,root,root) %{_bindir}/kodi-standalone
286 %{_datadir}/%{name}
287 %attr(755,root,root) %{_libdir}/%{name}
288 %{_desktopdir}/kodi.desktop
289 %{_iconsdir}/hicolor/*/apps/%{name}.png
290 %{_datadir}/xsessions/kodi.desktop
291
292 # legacy xbmc compatibility links
293 %attr(755,root,root) %{_bindir}/xbmc
294 %attr(755,root,root) %{_bindir}/xbmc-standalone
295 %{_datadir}/xsessions/xbmc.desktop
This page took 0.091178 seconds and 3 git commands to generate.