]>
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 ER |
16 | %bcond_without fishbmc # FishBMC visualisation |
17 | %bcond_without gl # OpenGL rendering | |
18 | %bcond_without goom # GOOM visualisation | |
ceb94d36 | 19 | %bcond_with gtest # configure Google Test Framework |
98f23c16 | 20 | %bcond_without joystick # SDL joystick support |
c0d69361 ER |
21 | %bcond_without libcap # libcap support |
22 | %bcond_with libcec # libcec support | |
8ea15fa3 | 23 | %bcond_without libusb # libusb support |
c0d69361 | 24 | %bcond_with mdnsembedded # mDNSEmbedded support |
ceb94d36 | 25 | %bcond_without mysql # MySQL |
8ea15fa3 | 26 | %bcond_without nfs # NFS support via libnfs |
ceb94d36 | 27 | %bcond_without non_free # componentents with non-compliant licenses |
c0d69361 | 28 | %bcond_with openmax # OpenMax decoding, requires OpenGLES |
ceb94d36 | 29 | %bcond_without optical_drive # optical drive |
98f23c16 | 30 | %bcond_without projectm # ProjectM visualisation |
c0d69361 | 31 | %bcond_without pulse # PulseAudio support |
98f23c16 | 32 | %bcond_without rsxs # really slick X screensavers |
c0d69361 | 33 | %bcond_without rtmp # RTMP support via librtmp |
e148a10d | 34 | %bcond_without samba # SAMBA support |
c0d69361 | 35 | %bcond_without sdl # SDL |
98f23c16 | 36 | %bcond_without spectrum # Spectrum visualisation |
e148a10d | 37 | %bcond_without ssh # SSH SFTP support |
98f23c16 | 38 | %bcond_without texturepacker # texturepacker support |
c0d69361 | 39 | %bcond_without udev # udev support |
e148a10d | 40 | %bcond_without upnp # UPnP support |
c0d69361 ER |
41 | %bcond_without vaapi # VAAPI decoding |
42 | %bcond_without vdpau # VDPAU decoding | |
43 | %bcond_with vtbdecoder # VTBDecoder decoding (VTB Decoder not supported on this platform) | |
98f23c16 | 44 | %bcond_without waveform # Waveform visualisation |
ceb94d36 | 45 | %bcond_without webserver # webserver |
98f23c16 ER |
46 | %bcond_without x11 # x11 'Linux Only' |
47 | %bcond_without xrandr # XRandR support | |
e148a10d ER |
48 | %bcond_with asap_codec # ASAP ADPCM support |
49 | %bcond_with gles # OpenGLES rendering | |
50 | %bcond_without libbluray # libbluray support | |
51 | %bcond_without mid # MID support | |
52 | %bcond_with profiling # gprof profiling | |
53 | %bcond_with tegra # Tegra2 arm | |
54 | %bcond_with wayland # wayland | |
ceb94d36 | 55 | # System libs: |
6e5f6f0e | 56 | %bcond_without system_ffmpeg # build with system ffmpeg |
e25cf996 | 57 | %bcond_without system_dvdread # build with system dvdread |
92b96980 | 58 | |
c3c3c480 | 59 | %define codename Jarvis |
d61811e9 | 60 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c | 61 | Name: kodi |
b7bd3c34 | 62 | Version: 16.1 |
aad0ff31 | 63 | Release: 1 |
68612b1e | 64 | License: GPL v2+ and GPL v3+ |
18b90c81 | 65 | Group: Applications/Multimedia |
b7bd3c34 ER |
66 | #Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz |
67 | Source0: https://github.com/xbmc/xbmc/archive/%{version}-%{codename}.tar.gz | |
68 | # Source0-md5: 79358ad5f77f42c5498a9412d5a78dd5 | |
d2f0f4c7 | 69 | Patch0: jpeglib-boolean.patch |
af2a7b89 | 70 | Patch1: disable-static.patch |
e25cf996 | 71 | Patch2: dvdread.patch |
3b89f97e JR |
72 | Patch3: ffmpeg3.patch |
73 | Patch4: gcc5.patch | |
92b53b2c | 74 | URL: http://kodi.tv/ |
b85db44b AF |
75 | BuildRequires: Mesa-libGLU-devel |
76 | BuildRequires: OpenGL-devel | |
658b3aff | 77 | BuildRequires: SDL2-devel |
18b90c81 SP |
78 | BuildRequires: SDL_image-devel |
79 | BuildRequires: SDL_mixer-devel | |
80 | BuildRequires: alsa-lib-devel | |
81 | BuildRequires: autoconf | |
82 | BuildRequires: automake | |
83 | BuildRequires: avahi-devel | |
b85db44b | 84 | BuildRequires: bluez-libs-devel >= 4.99 |
5a2f2b01 | 85 | BuildRequires: boost-devel |
18b90c81 SP |
86 | BuildRequires: bzip2-devel |
87 | BuildRequires: cmake | |
c3c3c480 | 88 | BuildRequires: crossguid-devel |
18b90c81 SP |
89 | BuildRequires: curl-devel |
90 | BuildRequires: dbus-devel | |
6069f65f | 91 | BuildRequires: dcadec-devel |
501e1d3e | 92 | BuildRequires: doxygen |
64d462c0 | 93 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4} |
5a2f2b01 | 94 | BuildRequires: flac-devel |
18b90c81 SP |
95 | BuildRequires: fontconfig-devel |
96 | BuildRequires: freetype-devel | |
97 | BuildRequires: fribidi-devel | |
98 | BuildRequires: gawk | |
63ff963e | 99 | BuildRequires: gettext-autopoint |
0747666f | 100 | BuildRequires: gettext-tools |
a1f637af | 101 | BuildRequires: giflib-devel |
18b90c81 SP |
102 | BuildRequires: glew-devel |
103 | BuildRequires: gperf | |
5a2f2b01 | 104 | BuildRequires: jasper-devel |
37fbe511 | 105 | BuildRequires: jre |
b85db44b | 106 | BuildRequires: libass-devel |
37fbe511 KK |
107 | BuildRequires: libbluray-devel >= 0.2.1 |
108 | BuildRequires: libcap-devel | |
18b90c81 | 109 | BuildRequires: libcdio-devel |
c0d69361 | 110 | %{?with_libcec:BuildRequires: libcec-devel} |
e25cf996 | 111 | %{?with_system_dvdread:BuildRequires: libdvdread-devel} |
1aef2bca | 112 | %ifarch i686 pentium4 athlon %{x8664} |
5f83fc0f | 113 | BuildRequires: libcrystalhd-devel |
1aef2bca | 114 | %endif |
b85db44b | 115 | BuildRequires: libgcrypt-devel |
18b90c81 | 116 | BuildRequires: libjpeg-devel |
45a200ab | 117 | BuildRequires: libltdl-devel |
18b90c81 | 118 | BuildRequires: libmad-devel |
63ff963e | 119 | BuildRequires: libmicrohttpd-devel |
63ff963e | 120 | BuildRequires: libmodplug-devel |
c462fd57 | 121 | BuildRequires: libmpeg2-devel |
18b90c81 | 122 | BuildRequires: libogg-devel |
b85db44b | 123 | BuildRequires: libplist-devel |
5a2f2b01 | 124 | BuildRequires: libpng-devel |
b85db44b | 125 | BuildRequires: librtmp-devel |
18b90c81 SP |
126 | BuildRequires: libsamplerate-devel |
127 | BuildRequires: libsmbclient-devel | |
b85db44b | 128 | BuildRequires: libssh-devel |
5a2f2b01 | 129 | BuildRequires: libtiff-devel |
130 | BuildRequires: libtool | |
b85db44b | 131 | BuildRequires: libva-devel |
5f83fc0f | 132 | BuildRequires: libva-glx-devel |
5a2f2b01 | 133 | BuildRequires: libvdpau-devel |
18b90c81 | 134 | BuildRequires: libvorbis-devel |
501e1d3e | 135 | BuildRequires: libxslt-devel |
5a2f2b01 | 136 | BuildRequires: lzo-devel |
137 | BuildRequires: mysql-devel | |
c1b45330 | 138 | %ifarch %{ix86} |
26cae375 | 139 | BuildRequires: nasm |
c1b45330 | 140 | %endif |
18b90c81 | 141 | BuildRequires: openssl-devel |
63ff963e | 142 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 143 | BuildRequires: pkgconfig |
18b90c81 | 144 | BuildRequires: pulseaudio-devel |
b85db44b | 145 | BuildRequires: python-devel >= 2.4 |
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 | |
7613a43d | 152 | BuildRequires: tinyxml-devel |
b85db44b | 153 | BuildRequires: udev-devel |
5a2f2b01 | 154 | BuildRequires: unzip |
b85db44b AF |
155 | BuildRequires: xorg-lib-libX11-devel |
156 | BuildRequires: xorg-lib-libXext-devel | |
5a2f2b01 | 157 | BuildRequires: xorg-lib-libXinerama-devel |
b85db44b | 158 | BuildRequires: xorg-lib-libXmu-devel |
18b90c81 | 159 | BuildRequires: xorg-lib-libXrandr-devel |
b85db44b | 160 | BuildRequires: xorg-lib-libXt-devel |
5a2f2b01 | 161 | BuildRequires: xorg-lib-libXtst-devel |
b85db44b | 162 | BuildRequires: yajl-devel |
501e1d3e | 163 | BuildRequires: yasm |
18b90c81 SP |
164 | BuildRequires: zip |
165 | BuildRequires: zlib-devel | |
af2a7b89 JR |
166 | # kodi uses it's own, modified squish |
167 | BuildConflicts: squish-devel | |
b85db44b | 168 | #https://github.com/sahlberg/libnfs |
57d594cf | 169 | BuildRequires: libnfs-devel |
b85db44b AF |
170 | #http://sites.google.com/site/alexthepuffin/home |
171 | #BuildRequires: afpfs-ng-devel | |
172 | #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz | |
173 | #https://github.com/albertz/shairport | |
174 | #BuildRequires: libshairport | |
63ff963e | 175 | Requires: /usr/bin/glxinfo |
f4f8f308 | 176 | Requires: SDL >= 1.2.14-5 |
a58652d4 SP |
177 | Requires: lsb-release |
178 | Requires: xorg-app-xdpyinfo | |
06c1bb12 | 179 | # dlopened libraries: |
d61811e9 | 180 | # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special:// |
06c1bb12 ER |
181 | Requires: curl-libs |
182 | Requires: libass | |
183 | Requires: libbluray | |
184 | Requires: libmodplug | |
185 | Requires: libmpeg2-libs | |
186 | Requires: libogg | |
187 | Requires: libplist | |
188 | Requires: libvorbis | |
92b53b2c | 189 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
190 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
191 | ||
192 | %description | |
d61811e9 ER |
193 | Kodi Entertainment Center (formerly XBMC) is a free and open-source |
194 | media player software developed by the XBMC Foundation, a non-profit | |
195 | technology consortium. Kodi is available for multiple operating | |
196 | systems and hardware platforms, with a software 10-foot user interface | |
197 | for use with televisions and remote controls. It allows users to play | |
198 | and view most videos, music, such as podcasts from the internet, and | |
199 | all common digital media files from local and network storage media. | |
18b90c81 SP |
200 | |
201 | %prep | |
92b53b2c | 202 | %setup -q -n xbmc-%{version}-%{codename} |
bfa116d7 | 203 | %patch0 -p1 |
af2a7b89 | 204 | %patch1 -p1 |
05c4c454 | 205 | %{?with_system_dvdread:%patch2 -p1} |
3b89f97e | 206 | %patch3 -p1 |
c3c3c480 | 207 | #%patch4 -p1 |
18b90c81 | 208 | |
5d47de93 ER |
209 | rm -r lib/cximage-6.0/zlib |
210 | #rm -r lib/libhdhomerun | |
211 | rm -r lib/libmpeg2 | |
212 | rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2 | |
5d47de93 | 213 | rm -r lib/libbluray |
5d47de93 ER |
214 | rm -r lib/librtmp |
215 | rm -r lib/win32 | |
05c4c454 | 216 | %{?with_system_dvdread:rm -r lib/libdvd/libdvdread} |
5d47de93 | 217 | |
72cf5436 | 218 | %if %{without system_ffmpeg} |
c3c3c480 | 219 | #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz |
928406b7 ER |
220 | %endif |
221 | ||
18b90c81 | 222 | %build |
c3c3c480 ER |
223 | %{__make} -C tools/depends/native/libsquish-native \ |
224 | CXX="%{__cxx}" | |
225 | ||
18b90c81 | 226 | ./bootstrap |
65712ad3 | 227 | %configure \ |
57d594cf | 228 | ac_cv_type__Bool=yes \ |
ace9791d | 229 | --disable-silent-rules \ |
51b524ca | 230 | --disable-debug \ |
ace9791d | 231 | --disable-ccache \ |
928406b7 | 232 | --with-ffmpeg=%{!?with_system_ffmpeg:force}%{?with_system_ffmpeg:shared} \ |
c0d69361 ER |
233 | %{__enable_disable afpclient} \ |
234 | %{__enable_disable airplay} \ | |
235 | %{__enable_disable airtunes} \ | |
ceb94d36 | 236 | %{__enable_disable alsa} \ |
e148a10d | 237 | %{__enable_disable asap_codec asap-codec} \ |
ceb94d36 ER |
238 | %{__enable_disable avahi} \ |
239 | %{__enable_disable dbus} \ | |
98f23c16 ER |
240 | %{__enable_disable dvdcss} \ |
241 | %{__enable_disable fishbmc} \ | |
e148a10d | 242 | %{__enable_disable gles} \ |
98f23c16 | 243 | %{__enable_disable gl} \ |
b85db44b | 244 | %{__enable_disable goom} \ |
98f23c16 | 245 | %{__enable_disable gtest} \ |
98f23c16 | 246 | %{__enable_disable joystick} \ |
e148a10d | 247 | %{__enable_disable libbluray} \ |
c0d69361 | 248 | %{__enable_disable libcap} \ |
98f23c16 | 249 | %{__enable_disable libcec} \ |
c0d69361 ER |
250 | %{__enable_disable libusb} \ |
251 | %{__enable_disable mdnsembedded} \ | |
e148a10d | 252 | %{__enable_disable mid} \ |
ceb94d36 | 253 | %{__enable_disable mysql} \ |
c0d69361 | 254 | %{__enable_disable nfs} \ |
ceb94d36 | 255 | %{__enable_disable non_free non-free} \ |
c0d69361 | 256 | %{__enable_disable openmax} \ |
ceb94d36 | 257 | %{__enable_disable optical_drive optical-drive} \ |
e148a10d | 258 | %{__enable_disable profiling} \ |
98f23c16 | 259 | %{__enable_disable projectm} \ |
c0d69361 | 260 | %{__enable_disable pulse} \ |
98f23c16 | 261 | %{__enable_disable rsxs} \ |
c0d69361 | 262 | %{__enable_disable rtmp} \ |
ceb94d36 | 263 | %{__enable_disable samba} \ |
c0d69361 | 264 | %{__enable_disable sdl} \ |
98f23c16 | 265 | %{__enable_disable spectrum} \ |
ceb94d36 | 266 | %{__enable_disable ssh} \ |
e148a10d ER |
267 | %{__enable_disable tegra} \ |
268 | %{__enable_disable texturepacker} \ | |
c0d69361 | 269 | %{__enable_disable udev} \ |
ceb94d36 | 270 | %{__enable_disable upnp} \ |
c0d69361 ER |
271 | %{__enable_disable vaapi} \ |
272 | %{__enable_disable vdpau} \ | |
273 | %{__enable_disable vtbdecoder} \ | |
98f23c16 | 274 | %{__enable_disable waveform} \ |
e148a10d | 275 | %{__enable_disable wayland} \ |
ceb94d36 | 276 | %{__enable_disable webserver} \ |
98f23c16 ER |
277 | %{__enable_disable x11} \ |
278 | %{__enable_disable xrandr} \ | |
279 | %{nil} | |
68612b1e | 280 | |
00f4b5ab | 281 | %{__make} V=1 |
18b90c81 SP |
282 | |
283 | %install | |
284 | rm -rf $RPM_BUILD_ROOT | |
18b90c81 | 285 | %{__make} install \ |
92b96980 | 286 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 287 | |
25890c53 ER |
288 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
289 | ||
290 | # no -devel package yet | |
291 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi | |
292 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc | |
293 | ||
a5bfc3a3 ER |
294 | # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues) |
295 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc | |
296 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc | |
297 | ||
18b90c81 SP |
298 | %clean |
299 | rm -rf $RPM_BUILD_ROOT | |
300 | ||
301 | %files | |
302 | %defattr(644,root,root,755) | |
25890c53 ER |
303 | %doc README.md docs/README.linux |
304 | %attr(755,root,root) %{_bindir}/kodi | |
305 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
18b90c81 | 306 | %{_datadir}/%{name} |
92b96980 | 307 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
308 | %{_desktopdir}/kodi.desktop |
309 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
310 | %{_datadir}/xsessions/kodi.desktop | |
311 | ||
312 | # legacy xbmc compatibility links | |
313 | %attr(755,root,root) %{_bindir}/xbmc | |
314 | %attr(755,root,root) %{_bindir}/xbmc-standalone | |
25890c53 | 315 | %{_datadir}/xsessions/xbmc.desktop |