]> git.pld-linux.org Git - packages/kodi.git/blob - kodi.spec
- partial cleanup
[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  opengl          # 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  gif             # GIF support via giflib
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  rc1
57 Summary:        Kodi is a free and open source media-player and entertainment hub
58 Name:           kodi
59 Version:        18.4
60 Release:        5
61 License:        GPL v2+ and GPL v3+
62 Group:          Applications/Multimedia
63 #Source0Download: https://github.com/xbmc/xbmc/releases
64 Source0:        https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz
65 # Source0-md5:  5e5e1e2527c2619785597b04e35fda6c
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 Patch6:         microhttpd.patch
73 Patch7:         assert.patch
74 URL:            https://kodi.tv/
75 BuildRequires:  Mesa-libEGL-devel
76 BuildRequires:  OpenGL-GLU-devel
77 BuildRequires:  OpenGL-devel
78 BuildRequires:  SDL2-devel
79 BuildRequires:  alsa-lib-devel
80 BuildRequires:  avahi-devel
81 BuildRequires:  bluez-libs-devel >= 4.99
82 BuildRequires:  bzip2-devel
83 BuildRequires:  cmake >= 3.4
84 BuildRequires:  crossguid-devel
85 BuildRequires:  curl-devel
86 BuildRequires:  dbus-devel
87 BuildRequires:  libfmt-devel >= 3.0.1
88 BuildRequires:  rapidjson-devel >= 1.1.0
89 # 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
90 %{?with_system_ffmpeg:BuildRequires:    ffmpeg-devel >= 2.4.4}
91 BuildRequires:  flac-devel
92 BuildRequires:  flatbuffers-devel >= 1.9.0
93 BuildRequires:  fontconfig-devel
94 BuildRequires:  freetype-devel
95 BuildRequires:  fribidi-devel
96 BuildRequires:  gawk
97 BuildRequires:  gettext-autopoint
98 BuildRequires:  gettext-tools
99 %{?with_gif:BuildRequires:      giflib-devel}
100 BuildRequires:  gperf
101 BuildRequires:  jre
102 BuildRequires:  lcms2-devel
103 BuildRequires:  libass-devel
104 BuildRequires:  libatomic-devel
105 BuildRequires:  libbluray-devel >= 0.7.0
106 BuildRequires:  libcap-devel
107 BuildRequires:  libcdio-devel
108 %{?with_libcec:BuildRequires:   libcec-devel >= 3.0.0}
109 BuildRequires:  libdrm-devel
110 BuildRequires:  libdvdcss-devel >= 1.4.1
111 %{?with_system_dvdread:BuildRequires:   libdvdread-devel}
112 BuildRequires:  libgcrypt-devel
113 BuildRequires:  libjpeg-devel
114 BuildRequires:  libltdl-devel
115 BuildRequires:  libmicrohttpd-devel >= 0.9.40
116 BuildRequires:  libogg-devel
117 BuildRequires:  libplist-devel
118 BuildRequires:  libpng-devel
119 BuildRequires:  librtmp-devel
120 BuildRequires:  libsmbclient-devel
121 BuildRequires:  libssh-devel
122 BuildRequires:  libstdc++-devel
123 BuildRequires:  libtool
124 BuildRequires:  libuuid-devel
125 BuildRequires:  libva-devel
126 BuildRequires:  libva-x11-devel
127 BuildRequires:  libvdpau-devel
128 BuildRequires:  libvorbis-devel
129 BuildRequires:  libxml2-devel >= 2.0
130 BuildRequires:  libxslt-devel
131 BuildRequires:  lzo-devel
132 BuildRequires:  mysql-devel
133 %ifarch %{ix86}
134 BuildRequires:  nasm
135 %endif
136 BuildRequires:  fstrcmp-devel >= 0.7
137 BuildRequires:  openssl-devel
138 BuildRequires:  pcre-cxx-devel
139 BuildRequires:  pkgconfig
140 BuildRequires:  pulseaudio-devel >= 1.0
141 BuildRequires:  python-devel >= 1:2.6
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 >= 2.6.2
149 BuildRequires:  udev-devel
150 BuildRequires:  unzip
151 BuildRequires:  xorg-lib-libX11-devel
152 BuildRequires:  xorg-lib-libXext-devel
153 BuildRequires:  xorg-lib-libXrandr-devel
154 BuildRequires:  yajl-devel >= 2
155 BuildRequires:  zip
156 BuildRequires:  zlib-devel
157 # kodi uses it's own, modified squish
158 BuildConflicts: squish-devel
159 #https://github.com/sahlberg/libnfs
160 BuildRequires:  libnfs-devel
161 #http://sites.google.com/site/alexthepuffin/home
162 #BuildRequires: afpfs-ng-devel
163 #BuildRequires: shairplay-devel
164 Requires:       /usr/bin/glxinfo
165 Requires:       SDL >= 1.2.14-5
166 Requires:       lsb-release
167 Requires:       xorg-app-xdpyinfo
168 # dlopened libraries:
169 # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special://
170 Requires:       curl-libs
171 Requires:       libass
172 Requires:       libbluray
173 Requires:       libmodplug
174 Requires:       libmpeg2-libs
175 Requires:       libogg
176 Requires:       libplist
177 Requires:       libvorbis
178 Obsoletes:      xbmc < 14.0
179 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
180
181 # extracting debug info from /home/users/glen/tmp/kodi-18.0-root-glen/usr/lib64/kodi/kodi-x11
182 # /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
183 %define         _noautostrip    kodi-x11
184 %define         _enable_debug_packages  0
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}%{?subver}-%{codename}
197 #%patch0 -p1
198 %patch1 -p1
199 %{?with_system_dvdread:%patch2 -p1}
200 #%patch3 -p1
201 #%patch4 -p1
202 %patch5 -p1
203 %patch6 -p1
204 %patch7 -p1
205
206 %{__rm} -r lib/win32
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 install -d build
214 cd build
215 # cmake not picking up include path from pkgconfig
216 # https://trac.kodi.tv/ticket/16861
217 %define specflags -I/usr/include/freetype2
218 %cmake \
219         -DENABLE_AIRTUNES=%{__true_false airtunes} \
220         -DENABLE_DVDCSS=%{__true_false dvdcss} \
221         -DENABLE_INTERNAL_CROSSGUID=OFF \
222         -DENABLE_INTERNAL_FFMPEG=%{!?with_system_ffmpeg:ON}%{?with_system_ffmpeg:OFF} \
223         -DENABLE_INTERNAL_LIBDVD=OFF \
224         -DENABLE_OPTICAL=%{__true_false optical_drive} \
225         -DENABLE_UPNP=%{__true_false upnp} \
226         ..
227 %if 0
228 %configure \
229         ac_cv_type__Bool=yes \
230         --disable-silent-rules \
231         --disable-debug \
232         --disable-ccache \
233         --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \
234         %{__enable_disable afpclient} \
235         %{__enable_disable airplay} \
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 opengl gl} \
242         %{__enable_disable gtest} \
243         %{__enable_disable joystick} \
244         %{__enable_disable libbluray} \
245         %{__enable_disable libcap} \
246         %{__enable_disable libcec} \
247         %{__enable_disable gif 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 profiling} \
256         %{__enable_disable pulse} \
257         %{__enable_disable rtmp} \
258         %{__enable_disable samba} \
259         %{__enable_disable sdl} \
260         %{__enable_disable ssh} \
261         %{__enable_disable tegra} \
262         %{__enable_disable texturepacker} \
263         %{__enable_disable udev} \
264         %{__enable_disable upnp} \
265         %{__enable_disable vaapi} \
266         %{__enable_disable vdpau} \
267         %{__enable_disable vtbdecoder} \
268         %{__enable_disable wayland} \
269         %{__enable_disable webserver} \
270         %{__enable_disable x11} \
271         %{__enable_disable xrandr} \
272         %{nil}
273 %endif
274
275 %{__make}
276
277 %install
278 rm -rf $RPM_BUILD_ROOT
279 %{__make} -C build install \
280         DESTDIR=$RPM_BUILD_ROOT
281
282 %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md}
283
284 # not packaged
285 %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml
286
287 # no -devel package yet
288 %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi
289
290 %clean
291 rm -rf $RPM_BUILD_ROOT
292
293 %files
294 %defattr(644,root,root,755)
295 %doc README.md docs/README.Linux.md
296 %attr(755,root,root) %{_bindir}/TexturePacker
297 %attr(755,root,root) %{_bindir}/kodi
298 %attr(755,root,root) %{_bindir}/kodi-standalone
299 %{_datadir}/%{name}
300 %attr(755,root,root) %{_libdir}/%{name}
301 %{_desktopdir}/kodi.desktop
302 %{_iconsdir}/hicolor/*/apps/%{name}.png
303 %{_datadir}/xsessions/kodi.desktop
This page took 0.092282 seconds and 3 git commands to generate.