]>
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 | |
ceb94d36 ER |
12 | %bcond_without alsa # ALSA support (only for linux/freebsd) |
13 | %bcond_without avahi # Avahi support (default is enabled if libavahi-common and libavahi-client is found) | |
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 | |
23 | %bcond_with libusb # libusb support | |
24 | %bcond_with mdnsembedded # mDNSEmbedded support | |
ceb94d36 | 25 | %bcond_without mysql # MySQL |
c0d69361 | 26 | %bcond_with 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 |
ceb94d36 | 34 | %bcond_without samba # SAMBA support (default is enabled) |
c0d69361 | 35 | %bcond_without sdl # SDL |
98f23c16 | 36 | %bcond_without spectrum # Spectrum visualisation |
ceb94d36 | 37 | %bcond_without ssh # SSH SFTP support (default is enabled) |
98f23c16 | 38 | %bcond_without texturepacker # texturepacker support |
c0d69361 | 39 | %bcond_without udev # udev support |
ceb94d36 | 40 | %bcond_without upnp # UPnP support (default is enabled) |
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 | |
ceb94d36 | 48 | # System libs: |
6e5f6f0e | 49 | %bcond_without system_ffmpeg # build with system ffmpeg |
e25cf996 | 50 | %bcond_without system_dvdread # build with system dvdread |
92b96980 | 51 | |
92b53b2c | 52 | %define codename Helix |
d61811e9 | 53 | Summary: Kodi is a free and open source media-player and entertainment hub |
92b53b2c ER |
54 | Name: kodi |
55 | Version: 14.0 | |
a5bfc3a3 | 56 | Release: 0.2 |
68612b1e | 57 | License: GPL v2+ and GPL v3+ |
18b90c81 | 58 | Group: Applications/Multimedia |
92b53b2c ER |
59 | Source0: http://mirrors.kodi.tv/releases/source/%{version}-%{codename}.tar.gz |
60 | # Source0-md5: 9717c539789789b8aeaf1dcfdb9f2c69 | |
72cf5436 | 61 | Source1: https://github.com/xbmc/FFmpeg/archive/2.4.4-%{codename}.tar.gz |
928406b7 | 62 | # Source1-md5: 19b5d29ef6b5a6fc202c652fe3905d9b |
d2f0f4c7 | 63 | Patch0: jpeglib-boolean.patch |
6e5f6f0e | 64 | Patch1: dvddemux-ffmpeg.patch |
e25cf996 | 65 | Patch2: dvdread.patch |
92b53b2c | 66 | URL: http://kodi.tv/ |
b85db44b AF |
67 | BuildRequires: Mesa-libGLU-devel |
68 | BuildRequires: OpenGL-devel | |
658b3aff | 69 | BuildRequires: SDL2-devel |
18b90c81 SP |
70 | BuildRequires: SDL_image-devel |
71 | BuildRequires: SDL_mixer-devel | |
72 | BuildRequires: alsa-lib-devel | |
73 | BuildRequires: autoconf | |
74 | BuildRequires: automake | |
75 | BuildRequires: avahi-devel | |
b85db44b | 76 | BuildRequires: bluez-libs-devel >= 4.99 |
5a2f2b01 | 77 | BuildRequires: boost-devel |
18b90c81 SP |
78 | BuildRequires: bzip2-devel |
79 | BuildRequires: cmake | |
80 | BuildRequires: curl-devel | |
81 | BuildRequires: dbus-devel | |
501e1d3e | 82 | BuildRequires: doxygen |
64d462c0 | 83 | %{?with_system_ffmpeg:BuildRequires: ffmpeg-devel >= 2.4.4} |
5a2f2b01 | 84 | BuildRequires: flac-devel |
18b90c81 SP |
85 | BuildRequires: fontconfig-devel |
86 | BuildRequires: freetype-devel | |
87 | BuildRequires: fribidi-devel | |
88 | BuildRequires: gawk | |
63ff963e | 89 | BuildRequires: gettext-autopoint |
0747666f | 90 | BuildRequires: gettext-tools |
18b90c81 SP |
91 | BuildRequires: glew-devel |
92 | BuildRequires: gperf | |
5a2f2b01 | 93 | BuildRequires: jasper-devel |
37fbe511 | 94 | BuildRequires: jre |
b85db44b | 95 | BuildRequires: libass-devel |
37fbe511 KK |
96 | BuildRequires: libbluray-devel >= 0.2.1 |
97 | BuildRequires: libcap-devel | |
18b90c81 | 98 | BuildRequires: libcdio-devel |
c0d69361 | 99 | %{?with_libcec:BuildRequires: libcec-devel} |
e25cf996 | 100 | %{?with_system_dvdread:BuildRequires: libdvdread-devel} |
1aef2bca | 101 | %ifarch i686 pentium4 athlon %{x8664} |
5f83fc0f | 102 | BuildRequires: libcrystalhd-devel |
1aef2bca | 103 | %endif |
b85db44b | 104 | BuildRequires: libgcrypt-devel |
18b90c81 | 105 | BuildRequires: libjpeg-devel |
45a200ab | 106 | BuildRequires: libltdl-devel |
18b90c81 | 107 | BuildRequires: libmad-devel |
63ff963e | 108 | BuildRequires: libmicrohttpd-devel |
63ff963e | 109 | BuildRequires: libmodplug-devel |
c462fd57 | 110 | BuildRequires: libmpeg2-devel |
18b90c81 | 111 | BuildRequires: libogg-devel |
b85db44b | 112 | BuildRequires: libplist-devel |
5a2f2b01 | 113 | BuildRequires: libpng-devel |
b85db44b | 114 | BuildRequires: librtmp-devel |
18b90c81 SP |
115 | BuildRequires: libsamplerate-devel |
116 | BuildRequires: libsmbclient-devel | |
b85db44b | 117 | BuildRequires: libssh-devel |
5a2f2b01 | 118 | BuildRequires: libtiff-devel |
119 | BuildRequires: libtool | |
b85db44b | 120 | BuildRequires: libva-devel |
5f83fc0f | 121 | BuildRequires: libva-glx-devel |
5a2f2b01 | 122 | BuildRequires: libvdpau-devel |
18b90c81 | 123 | BuildRequires: libvorbis-devel |
501e1d3e | 124 | BuildRequires: libxslt-devel |
5a2f2b01 | 125 | BuildRequires: lzo-devel |
126 | BuildRequires: mysql-devel | |
c1b45330 | 127 | %ifarch %{ix86} |
26cae375 | 128 | BuildRequires: nasm |
c1b45330 | 129 | %endif |
18b90c81 | 130 | BuildRequires: openssl-devel |
63ff963e | 131 | BuildRequires: pcre-cxx-devel |
5a2f2b01 | 132 | BuildRequires: pkgconfig |
18b90c81 | 133 | BuildRequires: pulseaudio-devel |
b85db44b | 134 | BuildRequires: python-devel >= 2.4 |
3a71016a | 135 | BuildRequires: rpm-pythonprov |
6f41c837 | 136 | BuildRequires: rpmbuild(macros) >= 1.566 |
c462fd57 | 137 | BuildRequires: sed >= 4.0 |
18b90c81 | 138 | BuildRequires: sqlite3-devel |
37fbe511 KK |
139 | BuildRequires: swig |
140 | BuildRequires: taglib-devel >= 1.8 | |
7613a43d | 141 | BuildRequires: tinyxml-devel |
b85db44b | 142 | BuildRequires: udev-devel |
5a2f2b01 | 143 | BuildRequires: unzip |
b85db44b AF |
144 | BuildRequires: xorg-lib-libX11-devel |
145 | BuildRequires: xorg-lib-libXext-devel | |
5a2f2b01 | 146 | BuildRequires: xorg-lib-libXinerama-devel |
b85db44b | 147 | BuildRequires: xorg-lib-libXmu-devel |
18b90c81 | 148 | BuildRequires: xorg-lib-libXrandr-devel |
b85db44b | 149 | BuildRequires: xorg-lib-libXt-devel |
5a2f2b01 | 150 | BuildRequires: xorg-lib-libXtst-devel |
b85db44b | 151 | BuildRequires: yajl-devel |
501e1d3e | 152 | BuildRequires: yasm |
18b90c81 SP |
153 | BuildRequires: zip |
154 | BuildRequires: zlib-devel | |
b85db44b AF |
155 | #https://github.com/sahlberg/libnfs |
156 | #BuildRequires: libnfs-devel | |
157 | #http://sites.google.com/site/alexthepuffin/home | |
158 | #BuildRequires: afpfs-ng-devel | |
159 | #http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz | |
160 | #https://github.com/albertz/shairport | |
161 | #BuildRequires: libshairport | |
63ff963e | 162 | Requires: /usr/bin/glxinfo |
f4f8f308 | 163 | Requires: SDL >= 1.2.14-5 |
a58652d4 SP |
164 | Requires: lsb-release |
165 | Requires: xorg-app-xdpyinfo | |
06c1bb12 | 166 | # dlopened libraries: |
d61811e9 | 167 | # grep 'DLL_PATH_.*lib.*\.so' xbmc/DllPaths_generated.h | grep -v special:// |
06c1bb12 ER |
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 | |
92b53b2c | 176 | Obsoletes: xbmc < 14.0 |
18b90c81 SP |
177 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
178 | ||
179 | %description | |
d61811e9 ER |
180 | Kodi Entertainment Center (formerly XBMC) is a free and open-source |
181 | media player software developed by the XBMC Foundation, a non-profit | |
182 | technology consortium. Kodi is available for multiple operating | |
183 | systems and hardware platforms, with a software 10-foot user interface | |
184 | for use with televisions and remote controls. It allows users to play | |
185 | and view most videos, music, such as podcasts from the internet, and | |
186 | all common digital media files from local and network storage media. | |
18b90c81 SP |
187 | |
188 | %prep | |
92b53b2c | 189 | %setup -q -n xbmc-%{version}-%{codename} |
bfa116d7 | 190 | %patch0 -p1 |
6e5f6f0e | 191 | %patch1 -p0 |
18b90c81 | 192 | |
5d47de93 ER |
193 | rm -r lib/cximage-6.0/zlib |
194 | #rm -r lib/libhdhomerun | |
195 | rm -r lib/libmpeg2 | |
196 | rm -r xbmc/cores/dvdplayer/DVDCodecs/Video/libmpeg2 | |
197 | rm -r lib/enca | |
198 | rm -r lib/libbluray | |
199 | rm -r lib/libmicrohttpd | |
200 | rm -r lib/libmodplug | |
201 | rm -r lib/librtmp | |
202 | rm -r lib/win32 | |
203 | ||
72cf5436 ER |
204 | %if %{without system_ffmpeg} |
205 | ln -s %{SOURCE1} tools/depends/target/ffmpeg/ffmpeg-2.4.4-%{codename}.tar.gz | |
928406b7 | 206 | %endif |
e25cf996 ER |
207 | %if %{with system_dvdread} |
208 | #rm -r lib/libdvd/libdvdread | |
209 | %endif | |
928406b7 | 210 | |
18b90c81 SP |
211 | %build |
212 | ./bootstrap | |
65712ad3 | 213 | %configure \ |
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 ER |
221 | %{__enable_disable alsa} \ |
222 | %{__enable_disable avahi} \ | |
223 | %{__enable_disable dbus} \ | |
98f23c16 ER |
224 | %{__enable_disable dvdcss} \ |
225 | %{__enable_disable fishbmc} \ | |
226 | %{__enable_disable gl} \ | |
b85db44b | 227 | %{__enable_disable goom} \ |
98f23c16 | 228 | %{__enable_disable gtest} \ |
dc0a03c5 | 229 | %{__enable_disable texturepacker} \ |
98f23c16 | 230 | %{__enable_disable joystick} \ |
c0d69361 | 231 | %{__enable_disable libcap} \ |
98f23c16 | 232 | %{__enable_disable libcec} \ |
c0d69361 ER |
233 | %{__enable_disable libusb} \ |
234 | %{__enable_disable mdnsembedded} \ | |
ceb94d36 | 235 | %{__enable_disable mysql} \ |
c0d69361 | 236 | %{__enable_disable nfs} \ |
ceb94d36 | 237 | %{__enable_disable non_free non-free} \ |
c0d69361 | 238 | %{__enable_disable openmax} \ |
ceb94d36 | 239 | %{__enable_disable optical_drive optical-drive} \ |
98f23c16 | 240 | %{__enable_disable projectm} \ |
c0d69361 | 241 | %{__enable_disable pulse} \ |
98f23c16 | 242 | %{__enable_disable rsxs} \ |
c0d69361 | 243 | %{__enable_disable rtmp} \ |
ceb94d36 | 244 | %{__enable_disable samba} \ |
c0d69361 | 245 | %{__enable_disable sdl} \ |
98f23c16 | 246 | %{__enable_disable spectrum} \ |
ceb94d36 | 247 | %{__enable_disable ssh} \ |
c0d69361 | 248 | %{__enable_disable udev} \ |
ceb94d36 | 249 | %{__enable_disable upnp} \ |
c0d69361 ER |
250 | %{__enable_disable vaapi} \ |
251 | %{__enable_disable vdpau} \ | |
252 | %{__enable_disable vtbdecoder} \ | |
98f23c16 | 253 | %{__enable_disable waveform} \ |
ceb94d36 | 254 | %{__enable_disable webserver} \ |
98f23c16 ER |
255 | %{__enable_disable x11} \ |
256 | %{__enable_disable xrandr} \ | |
257 | %{nil} | |
68612b1e | 258 | |
00f4b5ab | 259 | %{__make} V=1 |
18b90c81 SP |
260 | |
261 | %install | |
262 | rm -rf $RPM_BUILD_ROOT | |
18b90c81 | 263 | %{__make} install \ |
92b96980 | 264 | DESTDIR=$RPM_BUILD_ROOT |
18b90c81 | 265 | |
25890c53 ER |
266 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
267 | ||
268 | # no -devel package yet | |
269 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/kodi | |
270 | %{__rm} -r $RPM_BUILD_ROOT%{_includedir}/xbmc | |
271 | ||
a5bfc3a3 ER |
272 | # no real use for symlinks to datadir, and make rpm packaging more difficult (symlink vs dir issues) |
273 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/xbmc | |
274 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/xbmc | |
275 | ||
18b90c81 SP |
276 | %clean |
277 | rm -rf $RPM_BUILD_ROOT | |
278 | ||
279 | %files | |
280 | %defattr(644,root,root,755) | |
25890c53 ER |
281 | %doc README.md docs/README.linux |
282 | %attr(755,root,root) %{_bindir}/kodi | |
283 | %attr(755,root,root) %{_bindir}/kodi-standalone | |
18b90c81 | 284 | %{_datadir}/%{name} |
92b96980 | 285 | %attr(755,root,root) %{_libdir}/%{name} |
25890c53 ER |
286 | %{_desktopdir}/kodi.desktop |
287 | %{_iconsdir}/hicolor/*/apps/%{name}.png | |
288 | %{_datadir}/xsessions/kodi.desktop | |
289 | ||
290 | # legacy xbmc compatibility links | |
291 | %attr(755,root,root) %{_bindir}/xbmc | |
292 | %attr(755,root,root) %{_bindir}/xbmc-standalone | |
25890c53 | 293 | %{_datadir}/xsessions/xbmc.desktop |