]>
Commit | Line | Data |
---|---|---|
18b90c81 | 1 | # TODO: |
3a71016a | 2 | # - fix build flags - some files are compiled with -O3 and without rpm*flags |
92b96980 | 3 | # - add and/or fix users/groups permissions |
63ff963e | 4 | # - split to subpackages? |
928406b7 | 5 | # - bundled ffmpeg build (tools/depends/target/ffmpeg/autobuild.sh) enables nonfree & gpl! |
18b90c81 | 6 | # |
92b96980 | 7 | # Conditional build: |
ceb94d36 | 8 | # Features: |
c0d69361 ER |
9 | %bcond_with afpclient # AFP support via libafpclient |
10 | %bcond_without airplay # AirPlay support | |
11 | %bcond_with airtunes # AirTunes support | |
e148a10d ER |
12 | %bcond_without alsa # ALSA support |
13 | %bcond_without avahi # Avahi support | |
ceb94d36 ER |
14 | %bcond_without dbus # DBUS support |
15 | %bcond_without dvdcss # DVDCSS support | |
c1382e42 | 16 | %bcond_without opengl # OpenGL rendering |
ceb94d36 | 17 | %bcond_with gtest # configure Google Test Framework |
98f23c16 | 18 | %bcond_without joystick # SDL joystick support |
c0d69361 ER |
19 | %bcond_without libcap # libcap support |
20 | %bcond_with libcec # libcec support | |
85f5f657 | 21 | %bcond_without gif # GIF support via giflib |
8ea15fa3 | 22 | %bcond_without libusb # libusb support |
c0d69361 | 23 | %bcond_with mdnsembedded # mDNSEmbedded support |
ceb94d36 | 24 | %bcond_without mysql # MySQL |
8ea15fa3 | 25 | %bcond_without nfs # NFS support via libnfs |
165a8a43 | 26 | %bcond_without nonfree # componentents with non-compliant licenses |
c0d69361 | 27 | %bcond_with openmax # OpenMax decoding, requires OpenGLES |
ceb94d36 | 28 | %bcond_without optical_drive # optical drive |
98f23c16 | 29 | %bcond_without projectm # ProjectM visualisation |
c0d69361 | 30 | %bcond_without pulse # PulseAudio support |
c0d69361 | 31 | %bcond_without rtmp # RTMP support via librtmp |
e148a10d | 32 | %bcond_without samba # SAMBA support |
c0d69361 | 33 | %bcond_without sdl # SDL |
e148a10d | 34 | %bcond_without ssh # SSH SFTP support |
98f23c16 | 35 | %bcond_without texturepacker # texturepacker support |
c0d69361 | 36 | %bcond_without udev # udev support |
e148a10d | 37 | %bcond_without upnp # UPnP support |
c0d69361 ER |
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) | |
ceb94d36 | 41 | %bcond_without webserver # webserver |
98f23c16 ER |
42 | %bcond_without x11 # x11 'Linux Only' |
43 | %bcond_without xrandr # XRandR support | |
e148a10d ER |
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 | |
ceb94d36 | 51 | # System libs: |
6e5f6f0e | 52 | %bcond_without system_ffmpeg # build with system ffmpeg |
900271e7 | 53 | %bcond_with system_dvdread # build with system dvdread |
92b96980 | 54 | |
2d334bbb | 55 | %define codename Leia |
0ac32cd1 | 56 | #define subver rc1 |
d61811e9 | 57 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c | 58 | Name: kodi |
f0d932e5 | 59 | Version: 18.4 |
99a1bafa | 60 | Release: 6 |
68612b1e | 61 | License: GPL v2+ and GPL v3+ |
18b90c81 | 62 | Group: Applications/Multimedia |
caf463a3 | 63 | #Source0Download: https://github.com/xbmc/xbmc/releases |
0ac32cd1 | 64 | Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz |
f0d932e5 | 65 | # Source0-md5: 5e5e1e2527c2619785597b04e35fda6c |
d2f0f4c7 | 66 | Patch0: jpeglib-boolean.patch |
af2a7b89 | 67 | Patch1: disable-static.patch |
e25cf996 | 68 | Patch2: dvdread.patch |
3b89f97e JR |
69 | Patch3: ffmpeg3.patch |
70 | Patch4: gcc5.patch | |
900271e7 | 71 | Patch5: libdvd.patch |
2c55c288 JP |
72 | Patch6: microhttpd.patch |
73 | Patch7: assert.patch | |
faa2ad2c | 74 | Patch8: fmt.patch |
0ac32cd1 | 75 | URL: https://kodi.tv/ |
a983002d | 76 | BuildRequires: EGL-devel |
8fa5c2e4 | 77 | BuildRequires: OpenGL-GLU-devel |
b85db44b | 78 | BuildRequires: OpenGL-devel |
658b3aff | 79 | BuildRequires: SDL2-devel |
18b90c81 | 80 | BuildRequires: alsa-lib-devel |
18b90c81 | 81 | BuildRequires: avahi-devel |
b85db44b | 82 | BuildRequires: bluez-libs-devel >= 4.99 |
18b90c81 | 83 | BuildRequires: bzip2-devel |
be17bf9f | 84 | BuildRequires: cmake >= 3.4 |
c3c3c480 | 85 | BuildRequires: crossguid-devel |
18b90c81 SP |
86 | BuildRequires: curl-devel |
87 | BuildRequires: dbus-devel | |
c30f67e9 | 88 | BuildRequires: libfmt-devel >= 3.0.1 |
24867dbb | 89 | BuildRequires: rapidjson-devel >= 1.1.0 |
8fa5c2e4 | 90 | # 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 |
64d462c0 | 91 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4} |
5a2f2b01 | 92 | BuildRequires: flac-devel |
60818254 | 93 | BuildRequires: flatbuffers-devel >= 1.9.0 |
18b90c81 SP |
94 | BuildRequires: fontconfig-devel |
95 | BuildRequires: freetype-devel | |
96 | BuildRequires: fribidi-devel | |
97 | BuildRequires: gawk | |
63ff963e | 98 | BuildRequires: gettext-autopoint |
0747666f | 99 | BuildRequires: gettext-tools |
85f5f657 | 100 | %{?with_gif:BuildRequires: giflib-devel} |
18b90c81 | 101 | BuildRequires: gperf |
37fbe511 | 102 | BuildRequires: jre |
20c6d413 | 103 | BuildRequires: lcms2-devel |
b85db44b | 104 | BuildRequires: libass-devel |
a7c53f4c | 105 | BuildRequires: libatomic-devel |
296d79de | 106 | BuildRequires: libbluray-devel >= 0.7.0 |
37fbe511 | 107 | BuildRequires: libcap-devel |
18b90c81 | 108 | BuildRequires: libcdio-devel |
8fa5c2e4 JB |
109 | %{?with_libcec:BuildRequires: libcec-devel >= 3.0.0} |
110 | BuildRequires: libdrm-devel | |
b8db9144 | 111 | BuildRequires: libdvdcss-devel >= 1.4.1 |
e25cf996 | 112 | %{?with_system_dvdread:BuildRequires: libdvdread-devel} |
b85db44b | 113 | BuildRequires: libgcrypt-devel |
18b90c81 | 114 | BuildRequires: libjpeg-devel |
45a200ab | 115 | BuildRequires: libltdl-devel |
88da6d7b | 116 | BuildRequires: libmicrohttpd-devel >= 0.9.40 |
18b90c81 | 117 | BuildRequires: libogg-devel |
b85db44b | 118 | BuildRequires: libplist-devel |
5a2f2b01 | 119 | BuildRequires: libpng-devel |
b85db44b | 120 | BuildRequires: librtmp-devel |
18b90c81 | 121 | BuildRequires: libsmbclient-devel |
b85db44b | 122 | BuildRequires: libssh-devel |
8fa5c2e4 | 123 | BuildRequires: libstdc++-devel |
5a2f2b01 | 124 | BuildRequires: libtool |
f99f2533 | 125 | BuildRequires: libuuid-devel |
b85db44b | 126 | BuildRequires: libva-devel |
f99f2533 | 127 | BuildRequires: libva-x11-devel |
5a2f2b01 | 128 | BuildRequires: libvdpau-devel |
18b90c81 | 129 | BuildRequires: libvorbis-devel |
8fa5c2e4 | 130 | BuildRequires: libxml2-devel >= 2.0 |
501e1d3e | 131 | BuildRequires: libxslt-devel |
5a2f2b01 | 132 | BuildRequires: lzo-devel |
133 | BuildRequires: mysql-devel | |
c1b45330 | 134 | %ifarch %{ix86} |
26cae375 | 135 | BuildRequires: nasm |
c1b45330 | 136 | %endif |
005f83ba | 137 | BuildRequires: fstrcmp-devel >= 0.7 |
18b90c81 | 138 | BuildRequires: openssl-devel |
63ff963e | 139 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 140 | BuildRequires: pkgconfig |
a983002d JB |
141 | BuildRequires: pkgconfig(egl) |
142 | BuildRequires: pkgconfig(gl) | |
143 | BuildRequires: pkgconfig(glu) | |
8fa5c2e4 JB |
144 | BuildRequires: pulseaudio-devel >= 1.0 |
145 | BuildRequires: python-devel >= 1:2.6 | |
3a71016a | 146 | BuildRequires: rpm-pythonprov |
6f41c837 | 147 | BuildRequires: rpmbuild(macros) >= 1.566 |
c462fd57 | 148 | BuildRequires: sed >= 4.0 |
18b90c81 | 149 | BuildRequires: sqlite3-devel |
37fbe511 KK |
150 | BuildRequires: swig |
151 | BuildRequires: taglib-devel >= 1.8 | |
8fa5c2e4 | 152 | BuildRequires: tinyxml-devel >= 2.6.2 |
b85db44b | 153 | BuildRequires: udev-devel |
5a2f2b01 | 154 | BuildRequires: unzip |
b85db44b AF |
155 | BuildRequires: xorg-lib-libX11-devel |
156 | BuildRequires: xorg-lib-libXext-devel | |
18b90c81 | 157 | BuildRequires: xorg-lib-libXrandr-devel |
8fa5c2e4 | 158 | BuildRequires: yajl-devel >= 2 |
18b90c81 SP |
159 | BuildRequires: zip |
160 | BuildRequires: zlib-devel | |
af2a7b89 JR |
161 | # kodi uses it's own, modified squish |
162 | BuildConflicts: squish-devel | |
b85db44b | 163 | #https://github.com/sahlberg/libnfs |
57d594cf | 164 | BuildRequires: libnfs-devel |
b85db44b AF |
165 | #http://sites.google.com/site/alexthepuffin/home |
166 | #BuildRequires: afpfs-ng-devel | |
8fa5c2e4 | 167 | #BuildRequires: shairplay-devel |
63ff963e | 168 | Requires: /usr/bin/glxinfo |
f4f8f308 | 169 | Requires: SDL >= 1.2.14-5 |
a58652d4 SP |
170 | Requires: lsb-release |
171 | Requires: xorg-app-xdpyinfo | |
06c1bb12 | 172 | # dlopened libraries: |
d61811e9 | 173 | # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special:// |
06c1bb12 ER |
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 | |
92b53b2c | 182 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
183 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
184 | ||
4d53158d ER |
185 | # extracting debug info from /home/users/glen/tmp/kodi-18.0-root-glen/usr/lib64/kodi/kodi-x11 |
186 | # /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character | |
187 | %define _noautostrip kodi-x11 | |
188 | %define _enable_debug_packages 0 | |
189 | ||
18b90c81 | 190 | %description |
d61811e9 ER |
191 | Kodi Entertainment Center (formerly XBMC) is a free and open-source |
192 | media player software developed by the XBMC Foundation, a non-profit | |
193 | technology consortium. Kodi is available for multiple operating | |
194 | systems and hardware platforms, with a software 10-foot user interface | |
195 | for use with televisions and remote controls. It allows users to play | |
196 | and view most videos, music, such as podcasts from the internet, and | |
197 | all common digital media files from local and network storage media. | |
18b90c81 SP |
198 | |
199 | %prep | |
2d334bbb | 200 | %setup -q -n xbmc-%{version}%{?subver}-%{codename} |
6b5f5f8f | 201 | #%patch0 -p1 |
af2a7b89 | 202 | %patch1 -p1 |
900271e7 | 203 | %{?with_system_dvdread:%patch2 -p1} |
6b5f5f8f ER |
204 | #%patch3 -p1 |
205 | #%patch4 -p1 | |
b8db9144 | 206 | %patch5 -p1 |
2c55c288 JP |
207 | %patch6 -p1 |
208 | %patch7 -p1 | |
faa2ad2c | 209 | %patch8 -p1 |
18b90c81 | 210 | |
8fa5c2e4 | 211 | %{__rm} -r lib/win32 |
5d47de93 | 212 | |
72cf5436 | 213 | %if %{without system_ffmpeg} |
c3c3c480 | 214 | #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz |
928406b7 ER |
215 | %endif |
216 | ||
18b90c81 | 217 | %build |
be17bf9f ER |
218 | install -d build |
219 | cd build | |
3257b104 ER |
220 | # cmake not picking up include path from pkgconfig |
221 | # https://trac.kodi.tv/ticket/16861 | |
222 | %define specflags -I/usr/include/freetype2 | |
223 | %cmake \ | |
96ce92fc | 224 | -DENABLE_AIRTUNES=%{__true_false airtunes} \ |
caf463a3 JB |
225 | -DENABLE_DVDCSS=%{__true_false dvdcss} \ |
226 | -DENABLE_INTERNAL_CROSSGUID=OFF \ | |
96ce92fc | 227 | -DENABLE_INTERNAL_FFMPEG=%{!?with_system_ffmpeg:ON}%{?with_system_ffmpeg:OFF} \ |
caf463a3 JB |
228 | -DENABLE_INTERNAL_LIBDVD=OFF \ |
229 | -DENABLE_OPTICAL=%{__true_false optical_drive} \ | |
230 | -DENABLE_UPNP=%{__true_false upnp} \ | |
3257b104 | 231 | .. |
be17bf9f | 232 | %if 0 |
65712ad3 | 233 | %configure \ |
57d594cf | 234 | ac_cv_type__Bool=yes \ |
ace9791d | 235 | --disable-silent-rules \ |
51b524ca | 236 | --disable-debug \ |
ace9791d | 237 | --disable-ccache \ |
928406b7 | 238 | --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \ |
c0d69361 ER |
239 | %{__enable_disable afpclient} \ |
240 | %{__enable_disable airplay} \ | |
ceb94d36 | 241 | %{__enable_disable alsa} \ |
e148a10d | 242 | %{__enable_disable asap_codec asap-codec} \ |
ceb94d36 ER |
243 | %{__enable_disable avahi} \ |
244 | %{__enable_disable dbus} \ | |
e148a10d | 245 | %{__enable_disable gles} \ |
c1382e42 | 246 | %{__enable_disable opengl gl} \ |
98f23c16 | 247 | %{__enable_disable gtest} \ |
98f23c16 | 248 | %{__enable_disable joystick} \ |
e148a10d | 249 | %{__enable_disable libbluray} \ |
c0d69361 | 250 | %{__enable_disable libcap} \ |
98f23c16 | 251 | %{__enable_disable libcec} \ |
85f5f657 | 252 | %{__enable_disable gif libgif} \ |
c0d69361 ER |
253 | %{__enable_disable libusb} \ |
254 | %{__enable_disable mdnsembedded} \ | |
e148a10d | 255 | %{__enable_disable mid} \ |
ceb94d36 | 256 | %{__enable_disable mysql} \ |
c0d69361 | 257 | %{__enable_disable nfs} \ |
165a8a43 | 258 | %{__enable_disable nonfree non-free} \ |
c0d69361 | 259 | %{__enable_disable openmax} \ |
e148a10d | 260 | %{__enable_disable profiling} \ |
c0d69361 | 261 | %{__enable_disable pulse} \ |
c0d69361 | 262 | %{__enable_disable rtmp} \ |
ceb94d36 | 263 | %{__enable_disable samba} \ |
c0d69361 | 264 | %{__enable_disable sdl} \ |
ceb94d36 | 265 | %{__enable_disable ssh} \ |
e148a10d ER |
266 | %{__enable_disable tegra} \ |
267 | %{__enable_disable texturepacker} \ | |
c0d69361 | 268 | %{__enable_disable udev} \ |
ceb94d36 | 269 | %{__enable_disable upnp} \ |
c0d69361 ER |
270 | %{__enable_disable vaapi} \ |
271 | %{__enable_disable vdpau} \ | |
272 | %{__enable_disable vtbdecoder} \ | |
e148a10d | 273 | %{__enable_disable wayland} \ |
ceb94d36 | 274 | %{__enable_disable webserver} \ |
98f23c16 ER |
275 | %{__enable_disable x11} \ |
276 | %{__enable_disable xrandr} \ | |
277 | %{nil} | |
be17bf9f | 278 | %endif |
68612b1e | 279 | |
be17bf9f | 280 | %{__make} |
18b90c81 SP |
281 | |
282 | %install | |
283 | rm -rf $RPM_BUILD_ROOT | |
be17bf9f | 284 | %{__make} -C build install \ |
92b96980 | 285 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 286 | |
005f83ba | 287 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/{version.txt,README.Linux.md,LICENSE.md} |
e36884e8 ER |
288 | |
289 | # not packaged | |
290 | %{__rm} $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/kodi-*.xml | |
25890c53 ER |
291 | |
292 | # no -devel package yet | |
293 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi | |
a5bfc3a3 | 294 | |
18b90c81 SP |
295 | %clean |
296 | rm -rf $RPM_BUILD_ROOT | |
297 | ||
298 | %files | |
299 | %defattr(644,root,root,755) | |
005f83ba | 300 | %doc README.md docs/README.Linux.md |
e36884e8 | 301 | %attr(755,root,root) %{_bindir}/TexturePacker |
25890c53 ER |
302 | %attr(755,root,root) %{_bindir}/kodi |
303 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
18b90c81 | 304 | %{_datadir}/%{name} |
92b96980 | 305 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
306 | %{_desktopdir}/kodi.desktop |
307 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
308 | %{_datadir}/xsessions/kodi.desktop |