]>
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 | |
98f23c16 | 16 | %bcond_without gl # 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 | |
296d79de | 21 | %bcond_without libgif # gif support via libgif |
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 |
ceb94d36 | 26 | %bcond_without non_free # 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 | |
6b5f5f8f | 55 | %define codename Krypton |
d61811e9 | 56 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c | 57 | Name: kodi |
6b5f5f8f | 58 | Version: 17.6 |
fd935248 | 59 | Release: 1 |
68612b1e | 60 | License: GPL v2+ and GPL v3+ |
18b90c81 | 61 | Group: Applications/Multimedia |
b7bd3c34 ER |
62 | #Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz |
63 | Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz | |
6b5f5f8f | 64 | # Source0-md5: a64c2fc56ddc41b9b0dded55eaabf170 |
d2f0f4c7 | 65 | Patch0: jpeglib-boolean.patch |
af2a7b89 | 66 | Patch1: disable-static.patch |
e25cf996 | 67 | Patch2: dvdread.patch |
3b89f97e JR |
68 | Patch3: ffmpeg3.patch |
69 | Patch4: gcc5.patch | |
900271e7 | 70 | Patch5: libdvd.patch |
92b53b2c | 71 | URL: http://kodi.tv/ |
a7c53f4c | 72 | BuildRequires: Mesa-libEGL-devel |
8fa5c2e4 | 73 | BuildRequires: OpenGL-GLU-devel |
b85db44b | 74 | BuildRequires: OpenGL-devel |
658b3aff | 75 | BuildRequires: SDL2-devel |
18b90c81 | 76 | BuildRequires: alsa-lib-devel |
8fa5c2e4 | 77 | BuildRequires: autoconf >= 2.59 |
18b90c81 SP |
78 | BuildRequires: automake |
79 | BuildRequires: avahi-devel | |
b85db44b | 80 | BuildRequires: bluez-libs-devel >= 4.99 |
18b90c81 SP |
81 | BuildRequires: bzip2-devel |
82 | BuildRequires: cmake | |
c3c3c480 | 83 | BuildRequires: crossguid-devel |
18b90c81 SP |
84 | BuildRequires: curl-devel |
85 | BuildRequires: dbus-devel | |
8fa5c2e4 | 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 |
64d462c0 | 87 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4} |
5a2f2b01 | 88 | BuildRequires: flac-devel |
18b90c81 SP |
89 | BuildRequires: fontconfig-devel |
90 | BuildRequires: freetype-devel | |
91 | BuildRequires: fribidi-devel | |
92 | BuildRequires: gawk | |
63ff963e | 93 | BuildRequires: gettext-autopoint |
0747666f | 94 | BuildRequires: gettext-tools |
a1f637af | 95 | BuildRequires: giflib-devel |
3a358a3c | 96 | %{?with_libgif:BuildRequires: giflib-devel} |
18b90c81 | 97 | BuildRequires: gperf |
37fbe511 | 98 | BuildRequires: jre |
20c6d413 | 99 | BuildRequires: lcms2-devel |
b85db44b | 100 | BuildRequires: libass-devel |
a7c53f4c | 101 | BuildRequires: libatomic-devel |
296d79de | 102 | BuildRequires: libbluray-devel >= 0.7.0 |
37fbe511 | 103 | BuildRequires: libcap-devel |
18b90c81 | 104 | BuildRequires: libcdio-devel |
8fa5c2e4 JB |
105 | %{?with_libcec:BuildRequires: libcec-devel >= 3.0.0} |
106 | BuildRequires: libdrm-devel | |
e25cf996 | 107 | %{?with_system_dvdread:BuildRequires: libdvdread-devel} |
b85db44b | 108 | BuildRequires: libgcrypt-devel |
18b90c81 | 109 | BuildRequires: libjpeg-devel |
45a200ab | 110 | BuildRequires: libltdl-devel |
63ff963e | 111 | BuildRequires: libmicrohttpd-devel |
18b90c81 | 112 | BuildRequires: libogg-devel |
b85db44b | 113 | BuildRequires: libplist-devel |
5a2f2b01 | 114 | BuildRequires: libpng-devel |
b85db44b | 115 | BuildRequires: librtmp-devel |
18b90c81 | 116 | BuildRequires: libsmbclient-devel |
b85db44b | 117 | BuildRequires: libssh-devel |
8fa5c2e4 | 118 | BuildRequires: libstdc++-devel |
5a2f2b01 | 119 | BuildRequires: libtool |
f99f2533 | 120 | BuildRequires: libuuid-devel |
b85db44b | 121 | BuildRequires: libva-devel |
f99f2533 | 122 | BuildRequires: libva-x11-devel |
5a2f2b01 | 123 | BuildRequires: libvdpau-devel |
18b90c81 | 124 | BuildRequires: libvorbis-devel |
8fa5c2e4 | 125 | BuildRequires: libxml2-devel >= 2.0 |
501e1d3e | 126 | BuildRequires: libxslt-devel |
5a2f2b01 | 127 | BuildRequires: lzo-devel |
128 | BuildRequires: mysql-devel | |
c1b45330 | 129 | %ifarch %{ix86} |
26cae375 | 130 | BuildRequires: nasm |
c1b45330 | 131 | %endif |
18b90c81 | 132 | BuildRequires: openssl-devel |
63ff963e | 133 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 134 | BuildRequires: pkgconfig |
8fa5c2e4 JB |
135 | BuildRequires: pulseaudio-devel >= 1.0 |
136 | BuildRequires: python-devel >= 1:2.6 | |
3a71016a | 137 | BuildRequires: rpm-pythonprov |
6f41c837 | 138 | BuildRequires: rpmbuild(macros) >= 1.566 |
c462fd57 | 139 | BuildRequires: sed >= 4.0 |
18b90c81 | 140 | BuildRequires: sqlite3-devel |
37fbe511 KK |
141 | BuildRequires: swig |
142 | BuildRequires: taglib-devel >= 1.8 | |
8fa5c2e4 | 143 | BuildRequires: tinyxml-devel >= 2.6.2 |
b85db44b | 144 | BuildRequires: udev-devel |
5a2f2b01 | 145 | BuildRequires: unzip |
b85db44b AF |
146 | BuildRequires: xorg-lib-libX11-devel |
147 | BuildRequires: xorg-lib-libXext-devel | |
18b90c81 | 148 | BuildRequires: xorg-lib-libXrandr-devel |
8fa5c2e4 | 149 | BuildRequires: yajl-devel >= 2 |
18b90c81 SP |
150 | BuildRequires: zip |
151 | BuildRequires: zlib-devel | |
af2a7b89 JR |
152 | # kodi uses it's own, modified squish |
153 | BuildConflicts: squish-devel | |
b85db44b | 154 | #https://github.com/sahlberg/libnfs |
57d594cf | 155 | BuildRequires: libnfs-devel |
b85db44b AF |
156 | #http://sites.google.com/site/alexthepuffin/home |
157 | #BuildRequires: afpfs-ng-devel | |
8fa5c2e4 | 158 | #BuildRequires: shairplay-devel |
63ff963e | 159 | Requires: /usr/bin/glxinfo |
f4f8f308 | 160 | Requires: SDL >= 1.2.14-5 |
a58652d4 SP |
161 | Requires: lsb-release |
162 | Requires: xorg-app-xdpyinfo | |
06c1bb12 | 163 | # dlopened libraries: |
d61811e9 | 164 | # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special:// |
06c1bb12 ER |
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 | |
92b53b2c | 173 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
174 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
175 | ||
176 | %description | |
d61811e9 ER |
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. | |
18b90c81 SP |
184 | |
185 | %prep | |
92b53b2c | 186 | %setup -q -n xbmc-%{version}-%{codename} |
6b5f5f8f | 187 | #%patch0 -p1 |
af2a7b89 | 188 | %patch1 -p1 |
900271e7 | 189 | %{?with_system_dvdread:%patch2 -p1} |
6b5f5f8f ER |
190 | #%patch3 -p1 |
191 | #%patch4 -p1 | |
900271e7 | 192 | %{!?with_system_dvdread:%patch5 -p1} |
18b90c81 | 193 | |
6b5f5f8f | 194 | #%{__rm} -r lib/cximage-6.0/zlib |
8fa5c2e4 | 195 | #%{__rm} -r lib/libhdhomerun |
6b5f5f8f ER |
196 | #%{__rm} -r lib/libmpeg2 |
197 | #%{__rm} -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2 | |
198 | #%{__rm} -r lib/libbluray | |
b2628f52 | 199 | #%{__rm} -r lib/librtmp |
8fa5c2e4 | 200 | %{__rm} -r lib/win32 |
b2628f52 | 201 | #%{?with_system_dvdread:%{__rm} -r lib/libdvd/libdvdread} |
5d47de93 | 202 | |
72cf5436 | 203 | %if %{without system_ffmpeg} |
c3c3c480 | 204 | #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz |
928406b7 ER |
205 | %endif |
206 | ||
18b90c81 | 207 | %build |
b2628f52 ER |
208 | #%{__make} -C tools/depends/native/libsquish-native \ |
209 | # CXX="%{__cxx}" | |
c3c3c480 | 210 | |
18b90c81 | 211 | ./bootstrap |
65712ad3 | 212 | %configure \ |
57d594cf | 213 | ac_cv_type__Bool=yes \ |
ace9791d | 214 | --disable-silent-rules \ |
51b524ca | 215 | --disable-debug \ |
ace9791d | 216 | --disable-ccache \ |
928406b7 | 217 | --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \ |
c0d69361 ER |
218 | %{__enable_disable afpclient} \ |
219 | %{__enable_disable airplay} \ | |
220 | %{__enable_disable airtunes} \ | |
ceb94d36 | 221 | %{__enable_disable alsa} \ |
e148a10d | 222 | %{__enable_disable asap_codec asap-codec} \ |
ceb94d36 ER |
223 | %{__enable_disable avahi} \ |
224 | %{__enable_disable dbus} \ | |
98f23c16 | 225 | %{__enable_disable dvdcss} \ |
e148a10d | 226 | %{__enable_disable gles} \ |
98f23c16 | 227 | %{__enable_disable gl} \ |
98f23c16 | 228 | %{__enable_disable gtest} \ |
98f23c16 | 229 | %{__enable_disable joystick} \ |
e148a10d | 230 | %{__enable_disable libbluray} \ |
c0d69361 | 231 | %{__enable_disable libcap} \ |
98f23c16 | 232 | %{__enable_disable libcec} \ |
296d79de | 233 | %{__enable_disable libgif} \ |
c0d69361 ER |
234 | %{__enable_disable libusb} \ |
235 | %{__enable_disable mdnsembedded} \ | |
e148a10d | 236 | %{__enable_disable mid} \ |
ceb94d36 | 237 | %{__enable_disable mysql} \ |
c0d69361 | 238 | %{__enable_disable nfs} \ |
ceb94d36 | 239 | %{__enable_disable non_free non-free} \ |
c0d69361 | 240 | %{__enable_disable openmax} \ |
ceb94d36 | 241 | %{__enable_disable optical_drive optical-drive} \ |
e148a10d | 242 | %{__enable_disable profiling} \ |
c0d69361 | 243 | %{__enable_disable pulse} \ |
c0d69361 | 244 | %{__enable_disable rtmp} \ |
ceb94d36 | 245 | %{__enable_disable samba} \ |
c0d69361 | 246 | %{__enable_disable sdl} \ |
ceb94d36 | 247 | %{__enable_disable ssh} \ |
e148a10d ER |
248 | %{__enable_disable tegra} \ |
249 | %{__enable_disable texturepacker} \ | |
c0d69361 | 250 | %{__enable_disable udev} \ |
ceb94d36 | 251 | %{__enable_disable upnp} \ |
c0d69361 ER |
252 | %{__enable_disable vaapi} \ |
253 | %{__enable_disable vdpau} \ | |
254 | %{__enable_disable vtbdecoder} \ | |
e148a10d | 255 | %{__enable_disable wayland} \ |
ceb94d36 | 256 | %{__enable_disable webserver} \ |
98f23c16 ER |
257 | %{__enable_disable x11} \ |
258 | %{__enable_disable xrandr} \ | |
259 | %{nil} | |
68612b1e | 260 | |
00f4b5ab | 261 | %{__make} V=1 |
18b90c81 SP |
262 | |
263 | %install | |
264 | rm -rf $RPM_BUILD_ROOT | |
18b90c81 | 265 | %{__make} install \ |
92b96980 | 266 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 267 | |
25890c53 ER |
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 | ||
a5bfc3a3 ER |
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 | ||
18b90c81 SP |
278 | %clean |
279 | rm -rf $RPM_BUILD_ROOT | |
280 | ||
281 | %files | |
282 | %defattr(644,root,root,755) | |
25890c53 ER |
283 | %doc README.md docs/README.linux |
284 | %attr(755,root,root) %{_bindir}/kodi | |
285 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
18b90c81 | 286 | %{_datadir}/%{name} |
92b96980 | 287 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
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 | |
25890c53 | 295 | %{_datadir}/xsessions/xbmc.desktop |