]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
up to 18.0a3-Leia
[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 Leia
56 %define subver  a3
57 Summary:        Kodi is a free and open source media-player and entertainment hub
58 Name:           kodi
59 Version:        18.0
60 Release:        0.1
61 License:        GPL v2+ and GPL v3+
62 Group:          Applications/Multimedia
63 #Source0:       http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz
64 Source0:        https://github.com/xbmc/xbmc/archive/%{version}%{subver}-%{codename}.tar.gz
65 # Source0-md5:  bc912304c3c0bcfd63f85b5d2642972d
66 Patch0:         jpeglib-boolean.patch
67 Patch1:         disable-static.patch
68 Patch2:         dvdread.patch
69 Patch3:         ffmpeg3.patch
70 Patch4:         gcc5.patch
71 Patch5:         libdvd.patch
72 URL:            http://kodi.tv/
73 BuildRequires:  Mesa-libEGL-devel
74 BuildRequires:  OpenGL-GLU-devel
75 BuildRequires:  OpenGL-devel
76 BuildRequires:  SDL2-devel
77 BuildRequires:  alsa-lib-devel
78 BuildRequires:  avahi-devel
79 BuildRequires:  bluez-libs-devel >= 4.99
80 BuildRequires:  bzip2-devel
81 BuildRequires:  cmake >= 3.4
82 BuildRequires:  crossguid-devel
83 BuildRequires:  curl-devel
84 BuildRequires:  dbus-devel
85 BuildRequires:  libfmt-devel >= 3.0.1
86 BuildRequires:  rapidjson-devel >= 1.1.0
87 # 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
88 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
89 BuildRequires:  flac-devel
90 BuildRequires:  fontconfig-devel
91 BuildRequires:  freetype-devel
92 BuildRequires:  fribidi-devel
93 BuildRequires:  gawk
94 BuildRequires:  gettext-autopoint
95 BuildRequires:  gettext-tools
96 BuildRequires:  giflib-devel
97 %{?with_libgif:BuildRequires:   giflib-devel}
98 BuildRequires:  gperf
99 BuildRequires:  jre
100 BuildRequires:  lcms2-devel
101 BuildRequires:  libass-devel
102 BuildRequires:  libatomic-devel
103 BuildRequires:  libbluray-devel >= 0.7.0
104 BuildRequires:  libcap-devel
105 BuildRequires:  libcdio-devel
106 %{?with_libcec:BuildRequires:   libcec-devel >= 3.0.0}
107 BuildRequires:  libdrm-devel
108 BuildRequires:  libdvdcss-devel >= 1.4.1
109 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
110 BuildRequires:  libgcrypt-devel
111 BuildRequires:  libjpeg-devel
112 BuildRequires:  libltdl-devel
113 BuildRequires:  libmicrohttpd-devel >= 0.9.40
114 BuildRequires:  libogg-devel
115 BuildRequires:  libplist-devel
116 BuildRequires:  libpng-devel
117 BuildRequires:  librtmp-devel
118 BuildRequires:  libsmbclient-devel
119 BuildRequires:  libssh-devel
120 BuildRequires:  libstdc++-devel
121 BuildRequires:  libtool
122 BuildRequires:  libuuid-devel
123 BuildRequires:  libva-devel
124 BuildRequires:  libva-x11-devel
125 BuildRequires:  libvdpau-devel
126 BuildRequires:  libvorbis-devel
127 BuildRequires:  libxml2-devel >= 2.0
128 BuildRequires:  libxslt-devel
129 BuildRequires:  lzo-devel
130 BuildRequires:  mysql-devel
131 %ifarch %{ix86}
132 BuildRequires:  nasm
133 %endif
134 BuildRequires:  fstrcmp-devel >= 0.7
135 BuildRequires:  openssl-devel
136 BuildRequires:  pcre-cxx-devel
137 BuildRequires:  pkgconfig
138 BuildRequires:  pulseaudio-devel >= 1.0
139 BuildRequires:  python-devel >= 1:2.6
140 BuildRequires:  rpm-pythonprov
141 BuildRequires:  rpmbuild(macros) >= 1.566
142 BuildRequires:  sed >= 4.0
143 BuildRequires:  sqlite3-devel
144 BuildRequires:  swig
145 BuildRequires:  taglib-devel >= 1.8
146 BuildRequires:  tinyxml-devel >= 2.6.2
147 BuildRequires:  udev-devel
148 BuildRequires:  unzip
149 BuildRequires:  xorg-lib-libX11-devel
150 BuildRequires:  xorg-lib-libXext-devel
151 BuildRequires:  xorg-lib-libXrandr-devel
152 BuildRequires:  yajl-devel >= 2
153 BuildRequires:  zip
154 BuildRequires:  zlib-devel
155 # kodi uses it's own, modified squish
156 BuildConflicts: squish-devel
157 #https://github.com/sahlberg/libnfs
158 BuildRequires:  libnfs-devel
159 #http://sites.google.com/site/alexthepuffin/home
160 #BuildRequires: afpfs-ng-devel
161 #BuildRequires: shairplay-devel
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 # extracting debug info from /home/users/glen/tmp/kodi-18.0-root-glen/usr/lib64/kodi/kodi-x11
180 # /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
181 %define         _noautostrip    kodi-x11
182 %define         _enable_debug_packages  0
183
184 %description
185 Kodi Entertainment Center (formerly XBMC) is a free and open-source
186 media player software developed by the XBMC Foundation, a non-profit
187 technology consortium. Kodi is available for multiple operating
188 systems and hardware platforms, with a software 10-foot user interface
189 for use with televisions and remote controls. It allows users to play
190 and view most videos, music, such as podcasts from the internet, and
191 all common digital media files from local and network storage media.
192
193 %prep
194 %setup -q -n xbmc-%{version}%{?subver}-%{codename}
195 #%patch0 -p1
196 %patch1 -p1
197 %{?with_system_dvdread:%patch2 -p1}
198 #%patch3 -p1
199 #%patch4 -p1
200 %patch5 -p1
201
202 #%{__rm} -r lib/cximage-6.0/zlib
203 #%{__rm} -r lib/libhdhomerun
204 #%{__rm} -r lib/libmpeg2
205 #%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2
206 #%{__rm} -r lib/libbluray
207 #%{__rm} -r lib/librtmp
208 %{__rm} -r lib/win32
209 #%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread}
210
211 %if %{without system_ffmpeg}
212 #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz
213 %endif
214
215 %build
216 install -d build
217 cd build
218 # cmake not picking up include path from pkgconfig
219 # https://trac.kodi.tv/ticket/16861
220 %define specflags -I/usr/include/freetype2
221 %cmake \
222         -DENABLE_INTERNAL_LIBDVD=OFF \
223         -DENABLE_INTERNAL_CROSSGUID=OFF \
224         -DENABLE_DVDCSS=%{__true_false dvdcss} \
225         ..
226 %if 0
227 %configure \
228         ac_cv_type__Bool=yes \
229         --disable-silent-rules \
230         --disable-debug \
231         --disable-ccache \
232         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
233         %{__enable_disable afpclient} \
234         %{__enable_disable airplay} \
235         %{__enable_disable airtunes} \
236         %{__enable_disable alsa} \
237         %{__enable_disable asap_codec asap-codec} \
238         %{__enable_disable avahi} \
239         %{__enable_disable dbus} \
240         %{__enable_disable gles} \
241         %{__enable_disable gl} \
242         %{__enable_disable gtest} \
243         %{__enable_disable joystick} \
244         %{__enable_disable libbluray} \
245         %{__enable_disable libcap} \
246         %{__enable_disable libcec} \
247         %{__enable_disable libgif} \
248         %{__enable_disable libusb} \
249         %{__enable_disable mdnsembedded} \
250         %{__enable_disable mid} \
251         %{__enable_disable mysql} \
252         %{__enable_disable nfs} \
253         %{__enable_disable non_free non-free} \
254         %{__enable_disable openmax} \
255         %{__enable_disable optical_drive optical-drive} \
256         %{__enable_disable profiling} \
257         %{__enable_disable pulse} \
258         %{__enable_disable rtmp} \
259         %{__enable_disable samba} \
260         %{__enable_disable sdl} \
261         %{__enable_disable ssh} \
262         %{__enable_disable tegra} \
263         %{__enable_disable texturepacker} \
264         %{__enable_disable udev} \
265         %{__enable_disable upnp} \
266         %{__enable_disable vaapi} \
267         %{__enable_disable vdpau} \
268         %{__enable_disable vtbdecoder} \
269         %{__enable_disable wayland} \
270         %{__enable_disable webserver} \
271         %{__enable_disable x11} \
272         %{__enable_disable xrandr} \
273         %{nil}
274 %endif
275
276 %{__make}
277
278 %install
279 rm -rf $RPM_BUILD_ROOT
280 %{__make} -C build install \
281         DESTDIR=$RPM_BUILD_ROOT
282
283 %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md}
284
285 # not packaged
286 %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
287
288 # no -devel package yet
289 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
290
291 %clean
292 rm -rf $RPM_BUILD_ROOT
293
294 %files
295 %defattr(644,root,root,755)
296 %doc README.md docs/README.Linux.md
297 %attr(755,root,root) %{_bindir}/TexturePacker
298 %attr(755,root,root) %{_bindir}/kodi
299 %attr(755,root,root) %{_bindir}/kodi-standalone
300 %{_datadir}/%{name}
301 %attr(755,root,root) %{_libdir}/%{name}
302 %{_desktopdir}/kodi.desktop
303 %{_iconsdir}/hicolor/*/apps/%{name}.png
304 %{_datadir}/xsessions/kodi.desktop
This page took 0.062851 seconds and 4 git commands to generate.