1 |
|
2 |
%define name xbmc |
3 |
%define branch_release Eden |
4 |
%define extra_feature pvr |
5 |
%define version 11.0 |
6 |
%define snap 0 |
7 |
%define pre 0 |
8 |
%define rel 3 |
9 |
|
10 |
%if %snap |
11 |
%define branch %branch_release.%extra_feature |
12 |
%else |
13 |
%define branch %extra_feature |
14 |
%endif |
15 |
|
16 |
%define branchr %([ "%branch" ] && echo .%branch | tr - _) |
17 |
|
18 |
# build with internal ffmpeg, disabled by default (--with internal_ffmpeg) |
19 |
%bcond_with internal_ffmpeg |
20 |
|
21 |
%if %with internal_ffmpeg |
22 |
# issue with 11.0 internal ffmpeg, haven't bothered with patching as it is |
23 |
# not used in the default build anyway |
24 |
%define Werror_cflags %nil |
25 |
%endif |
26 |
|
27 |
Summary: XBMC Media Center - media player and home entertainment system |
28 |
Name: %{name} |
29 |
Version: %{version} |
30 |
%if %snap |
31 |
Release: %mkrel 0.git%snap%branchr.%rel |
32 |
Source: %{name}-%branch_release-%snap.tar.xz |
33 |
%else |
34 |
%if %pre |
35 |
Release: %mkrel 0.%pre%branchr.%rel |
36 |
Source: %{name}-%{version}-%{branch_release}_%{pre}.tar.gz |
37 |
%else |
38 |
Release: %mkrel 1.%branch.%rel |
39 |
Source: %{name}-%{version}.tar.gz |
40 |
%endif |
41 |
%endif |
42 |
URL: http://xbmc.org/ |
43 |
|
44 |
# bring snapshot up-to-date with pvr branch |
45 |
# https://github.com/opdenkamp/xbmc |
46 |
# git diff 11.0-Eden-r2..11.0-Eden-pvr |
47 |
Patch0: xbmc-Eden-pvr-11.0.patch |
48 |
|
49 |
# Disable updates of the default skin. Our one is the PVR version, while the |
50 |
# one in the XBMC.org addon repository would be the vanilla one (Confluence |
51 |
# is currently not in the addon repository, though, as of 2012-03). |
52 |
Patch201: xbmc-disable-confluence-update.patch |
53 |
|
54 |
# Make the MythTV PVR client buildable (submitted upstream): |
55 |
Patch211: 0001-fixed-undefined-symbols-in-MythTV-PVR-client.patch |
56 |
|
57 |
# Hack to workaround upgrading from our old hack... see patch header for more |
58 |
# details and an upstreaming plan. |
59 |
Patch213: 0001-hack-workaround-for-old-incompatible-PVR-addon-datab.patch |
60 |
|
61 |
# nosefart audio plugin and RSXS-0.9 based screensavers are GPLv2 only |
62 |
# several eventclients are GPLv3+ (in subpackages) |
63 |
# libhdhomerun is LGPLv3+ with an exception (always ok to link against it) |
64 |
# the rest is GPLv2+ |
65 |
# both GPLv2+ and GPLv2 are mentioned because plugins are not part of core |
66 |
# xbmc and therefore e.g. /usr/bin/xbmc is GPLv2+ with LGPLv3+ part |
67 |
# as allowed by a license exception |
68 |
License: GPLv2+ and GPLv2 and (LGPLv3+ with exceptions) |
69 |
Group: Video |
70 |
BuildRoot: %{_tmppath}/%{name}-root |
71 |
BuildRequires: boost-devel |
72 |
%if %without internal_ffmpeg |
73 |
BuildRequires: ffmpeg-devel |
74 |
%endif |
75 |
BuildRequires: libmpeg2dec-devel |
76 |
BuildRequires: libogg-devel |
77 |
BuildRequires: libwavpack-devel |
78 |
BuildRequires: python-devel |
79 |
BuildRequires: glew-devel |
80 |
BuildRequires: mesagl-devel |
81 |
BuildRequires: mesaglu-devel |
82 |
BuildRequires: libmad-devel |
83 |
BuildRequires: libjpeg-devel |
84 |
BuildRequires: libsamplerate-devel |
85 |
BuildRequires: libvorbis-devel |
86 |
BuildRequires: bzip2-devel |
87 |
BuildRequires: mysql-devel |
88 |
BuildRequires: liblzo2-devel |
89 |
BuildRequires: zlib-devel |
90 |
BuildRequires: openssl-devel |
91 |
BuildRequires: fontconfig-devel |
92 |
BuildRequires: fribidi-devel |
93 |
BuildRequires: sqlite3-devel |
94 |
BuildRequires: libpng-devel |
95 |
BuildRequires: libpcre-devel |
96 |
BuildRequires: libcdio-devel |
97 |
BuildRequires: libmms-devel |
98 |
BuildRequires: freetype2-devel |
99 |
BuildRequires: libflac-devel |
100 |
BuildRequires: libsmbclient-devel |
101 |
BuildRequires: SDL_mixer-devel |
102 |
BuildRequires: libjasper-devel |
103 |
BuildRequires: libtiff-devel |
104 |
BuildRequires: SDL_image-devel |
105 |
BuildRequires: libalsa-devel |
106 |
BuildRequires: enca-devel |
107 |
BuildRequires: libxt-devel |
108 |
BuildRequires: libxtst-devel |
109 |
BuildRequires: libxmu-devel |
110 |
BuildRequires: libxinerama-devel |
111 |
BuildRequires: libcurl-devel |
112 |
BuildRequires: dbus-devel |
113 |
BuildRequires: SDL-devel |
114 |
BuildRequires: pulseaudio-devel |
115 |
BuildRequires: avahi-common-devel |
116 |
BuildRequires: avahi-client-devel |
117 |
BuildRequires: libxrandr-devel |
118 |
BuildRequires: vdpau-devel |
119 |
BuildRequires: cwiid-devel |
120 |
BuildRequires: libice-devel |
121 |
BuildRequires: libx11-devel |
122 |
BuildRequires: crystalhd-devel |
123 |
BuildRequires: libmicrohttpd-devel |
124 |
BuildRequires: libmodplug-devel |
125 |
BuildRequires: ssh-devel |
126 |
BuildRequires: libva-devel |
127 |
BuildRequires: gettext-devel |
128 |
BuildRequires: expat-devel |
129 |
BuildRequires: libass-devel |
130 |
BuildRequires: rtmp-devel |
131 |
BuildRequires: bluray-devel |
132 |
BuildRequires: bluez-devel |
133 |
BuildRequires: udev-devel |
134 |
BuildRequires: yajl-devel |
135 |
BuildRequires: nfs-devel |
136 |
BuildRequires: afpclient-devel |
137 |
BuildRequires: libplist-devel |
138 |
BuildRequires: shairport-devel |
139 |
BuildRequires: cec-devel |
140 |
BuildRequires: cmake |
141 |
BuildRequires: gperf |
142 |
BuildRequires: zip |
143 |
%ifarch %ix86 |
144 |
BuildRequires: nasm |
145 |
%endif |
146 |
Requires: lsb-release |
147 |
# dlopened (existence check required by rpm5 as it doesn't use stderr): |
148 |
%define dlopenreq() %([ -e %{_libdir}/lib%{1}.so ] && rpm -qf --qf '%%{name}' $(readlink -f %{_libdir}/lib%{1}.so) 2>/dev/null || echo %{name}) |
149 |
Requires: %dlopenreq curl |
150 |
Requires: %dlopenreq FLAC |
151 |
Requires: %dlopenreq mad |
152 |
Requires: %dlopenreq ogg |
153 |
Requires: %dlopenreq vorbis |
154 |
Requires: %dlopenreq vorbisenc |
155 |
Requires: %dlopenreq vorbisfile |
156 |
Requires: %dlopenreq modplug |
157 |
Requires: %dlopenreq rtmp |
158 |
Requires: %dlopenreq mpeg2 |
159 |
Requires: %dlopenreq ass |
160 |
Requires: %dlopenreq bluray |
161 |
Requires: %dlopenreq nfs |
162 |
Requires: %dlopenreq afpclient |
163 |
Requires: %dlopenreq plist |
164 |
Requires: %dlopenreq shairport |
165 |
Requires: %dlopenreq cec |
166 |
# not nearly as common as the above, so just suggest instead for now: |
167 |
Suggests: %dlopenreq crystalhd |
168 |
# TODO: FEH.py is useless nowadays, drop it here and upstream. |
169 |
# for FEH.py, to check current configuration is ok for xbmc: |
170 |
Requires: xdpyinfo |
171 |
Requires: glxinfo |
172 |
# for FEH.py to allow it to give an error message (should be available already |
173 |
# on most systems): |
174 |
Requires: pygtk2 |
175 |
# for xbmc python scripts: |
176 |
Requires: python-imaging |
177 |
# Packages not shipped in core: |
178 |
Suggests: %{_lib}lame0 |
179 |
Suggests: %{_lib}dvdcss2 |
180 |
|
181 |
# Packages have been merged |
182 |
Obsoletes: xbmc-core < 9.11-1.svn29468 |
183 |
Obsoletes: xbmc-skin-confluence < 9.11-1.svn29468 |
184 |
Obsoletes: xbmc-skin-pm3-hd < 9.11-1.svn29468 |
185 |
Obsoletes: xbmc-nosefart < 9.11-1.svn29468 |
186 |
Obsoletes: xbmc-screensavers-default < 9.11-1.svn29468 |
187 |
Obsoletes: xbmc-script-examples < 9.11-1.svn27796 |
188 |
Obsoletes: xbmc-web-pm3 < 9.11-1.svn27796 |
189 |
|
190 |
%description |
191 |
XBMC is an award-winning free and open source software media player |
192 |
and entertainment hub for digital media. |
193 |
|
194 |
While XBMC functions very well as a standard media player application |
195 |
for your computer, it has been designed to be the perfect companion |
196 |
for your HTPC. Supporting an almost endless range of remote controls, |
197 |
and combined with its beautiful interface and powerful skinning |
198 |
engine, XBMC feels very natural to use from the couch and is the |
199 |
ideal solution for your home theater. |
200 |
|
201 |
This is the stable version of XBMC from the %branch_release release branch, |
202 |
with PVR support added from opdenkamp %branch_release-pvr branch. Support for |
203 |
RAR files is not included due to license issues. |
204 |
|
205 |
%package eventclients-common |
206 |
Summary: Common files for XBMC eventclients |
207 |
Group: Video |
208 |
License: GPLv2+ |
209 |
%py_requires |
210 |
|
211 |
%description eventclients-common |
212 |
XBMC is an award-winning free and open source software media player |
213 |
and entertainment hub for digital media. |
214 |
|
215 |
This package contains common files for eventclients. |
216 |
|
217 |
%package eventclients-devel |
218 |
Summary: Development files for XBMC eventclients |
219 |
Group: Development/C |
220 |
License: GPLv2+ |
221 |
|
222 |
%description eventclients-devel |
223 |
XBMC is an award-winning free and open source software media player |
224 |
and entertainment hub for digital media. |
225 |
|
226 |
This package contains files needed to build eventclients. |
227 |
|
228 |
%package eventclient-wiiremote |
229 |
Summary: Wii Remote eventclient for XBMC |
230 |
Group: Video |
231 |
License: GPLv3+ |
232 |
Requires: %{name}-eventclients-common = %{version}-%{release} |
233 |
|
234 |
%description eventclient-wiiremote |
235 |
XBMC is an award-winning free and open source software media player |
236 |
and entertainment hub for digital media. |
237 |
|
238 |
This package contains the Wii Remote eventclient. |
239 |
|
240 |
%package eventclient-j2me |
241 |
Summary: J2ME eventclient for XBMC |
242 |
Group: Video |
243 |
License: GPLv2+ |
244 |
Requires: python-pybluez |
245 |
Requires: %{name}-eventclients-common = %{version}-%{release} |
246 |
|
247 |
%description eventclient-j2me |
248 |
XBMC is an award-winning free and open source software media player |
249 |
and entertainment hub for digital media. |
250 |
|
251 |
This package contains the J2ME eventclient, providing a bluetooth |
252 |
server that can communicate with a mobile tool supporting J2ME. |
253 |
|
254 |
%package eventclient-ps3 |
255 |
Summary: PS3 eventclients for XBMC |
256 |
Group: Video |
257 |
License: GPLv2+ |
258 |
Requires: python-pybluez |
259 |
Requires: %{name}-eventclients-common = %{version}-%{release} |
260 |
# requires via zeroconf.py, only used by xbmc-ps3d: |
261 |
Requires: python-gobject avahi-python python-dbus |
262 |
# TODO merge all these?, and TODO zeroconf.py to a correct package? :) |
263 |
Obsoletes: eventclient-ps3remote < 9.11-1.svn31936 |
264 |
|
265 |
%description eventclient-ps3 |
266 |
XBMC is an award-winning free and open source software media player |
267 |
and entertainment hub for digital media. |
268 |
|
269 |
This package contains the PS3 remote and sixaxis eventclients. |
270 |
|
271 |
%package eventclient-xbmc-send |
272 |
Summary: PS3 eventclient for XBMC |
273 |
Group: Video |
274 |
License: GPLv2+ |
275 |
Requires: %{name}-eventclients-common = %{version}-%{release} |
276 |
|
277 |
%description eventclient-xbmc-send |
278 |
XBMC is an award-winning free and open source software media player |
279 |
and entertainment hub for digital media. |
280 |
|
281 |
This package contains the xbmc-send eventclient. |
282 |
|
283 |
%prep |
284 |
%if %snap |
285 |
%setup -q -n %name-%branch_release-%snap |
286 |
%else |
287 |
%if %pre |
288 |
%setup -q -n %{name}-%{version}-%{branch_release}_%{pre} |
289 |
%else |
290 |
%setup -q |
291 |
%endif |
292 |
%endif |
293 |
%apply_patches |
294 |
# otherwise backups end up in binary rpms |
295 |
find -type f \( -name '*.00??' -o -name '*.00??~' \) -print -delete |
296 |
|
297 |
# remove prebuilt libraries |
298 |
find -type f \( -iname '*.so' -o -iname '*.dll' -o -iname '*.exe' \) -delete |
299 |
|
300 |
# GPLv2 only |
301 |
rm -r lib/cmyth/Win32/include/mysql |
302 |
# BSD 4-clause |
303 |
rm -r xbmc/cores/DllLoader/exports/emu_socket |
304 |
|
305 |
# win32 only |
306 |
rm -rf system/players/dvdplayer/etc/fonts |
307 |
|
308 |
%build |
309 |
%if %snap |
310 |
export GIT_REV=%snap |
311 |
%else |
312 |
export GIT_REV="tarball" |
313 |
%endif |
314 |
./bootstrap |
315 |
|
316 |
# due to xbmc modules that use symbols from xbmc binary |
317 |
# and are not using libtool |
318 |
%define _disable_ld_no_undefined 1 |
319 |
|
320 |
# Workaround configure using git to override GIT_REV (TODO: fix it properly) |
321 |
export ac_cv_prog_HAVE_GIT="no" |
322 |
|
323 |
%configure2_5x \ |
324 |
--disable-debug \ |
325 |
--disable-ccache \ |
326 |
--enable-external-libraries \ |
327 |
--disable-non-free \ |
328 |
--disable-dvdcss \ |
329 |
--disable-hal \ |
330 |
--enable-goom \ |
331 |
--with-lirc-device=/var/run/lirc/lircd \ |
332 |
%if %with internal_ffmpeg |
333 |
--disable-external-ffmpeg |
334 |
%endif |
335 |
|
336 |
# non-free = unrar |
337 |
# dvdcss is handled via dlopen when disabled |
338 |
# hal is disabled as it is just a fallback when the replacmenets are |
339 |
# not available |
340 |
|
341 |
%make |
342 |
%make -C tools/EventClients wiimote |
343 |
|
344 |
%install |
345 |
rm -rf %{buildroot} |
346 |
%makeinstall_std |
347 |
%makeinstall_std -C tools/EventClients |
348 |
|
349 |
# unused |
350 |
rm %{buildroot}%{_datadir}/xsessions/XBMC.desktop |
351 |
# our version of the above: |
352 |
install -d -m755 %{buildroot}%{_sysconfdir}/X11/wmsession.d |
353 |
cat > %{buildroot}%{_sysconfdir}/X11/wmsession.d/15XBMC <<EOF |
354 |
NAME=XBMC |
355 |
ICON=xbmc.png |
356 |
DESC=XBMC Media Center |
357 |
EXEC=%{_bindir}/xbmc-standalone |
358 |
SCRIPT: |
359 |
exec %{_bindir}/xbmc-standalone |
360 |
EOF |
361 |
|
362 |
# unused files, TODO fix this upstream: |
363 |
find %{buildroot}%{_datadir}/xbmc/addons/skin.*/media -name '*.png' -delete |
364 |
|
365 |
( # for IFS and +x |
366 |
# Check for issues in ELF binaries |
367 |
undefined= |
368 |
fhserr= |
369 |
echo Silencing output of undefined symbol and FHS conformance checks |
370 |
set +x |
371 |
IFS=$'\n' |
372 |
for file in $(find %{buildroot} -type f); do |
373 |
type="$(file "$file")" |
374 |
echo "$type" | grep -q "ELF" || continue |
375 |
|
376 |
# Check that a binary file is not in datadir: |
377 |
echo "$file" | grep -q "%{_datadir}" && fhserr="${fhserr}$file\n" |
378 |
|
379 |
# check for undefined symbols in XBMC modules |
380 |
echo "$type" | grep -q "shared object" || continue |
381 |
for symbol in $(LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} ldd -r "$file" 2>&1 | grep undefined | awk '{ print $3 }'); do |
382 |
# undefined symbols may also be provided by XBMC: |
383 |
nm -f posix -D --no-demangle --defined-only %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep -q "^$symbol " && continue |
384 |
# The symbol was not provided by XBMC. |
385 |
# Check if it is available through its dependencies: |
386 |
for filename in $(objdump -p %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep NEEDED | awk '{ print $2 }'); do |
387 |
depfile="/%{_lib}/$filename" |
388 |
[ -e "$depfile" ] || depfile="%{_libdir}/$filename" |
389 |
nm -f posix -D --no-demangle --defined-only $depfile | grep -q "^$symbol " && continue 2 |
390 |
done |
391 |
# Euphoria references rsxs PNG class, but it is never used at runtime, |
392 |
# so it results in no errors due to RTLD_LAZY being used by xbmc module loader. |
393 |
case $file:$symbol in |
394 |
*/Euphoria.xbs:_ZN3PNG*) continue;; |
395 |
%if %with internal_ffmpeg |
396 |
*/dvdplayer/*.so:*) continue;; |
397 |
%endif |
398 |
esac |
399 |
# the symbol was not found |
400 |
undefined="${undefined}$file: $symbol\n" |
401 |
done |
402 |
done |
403 |
ok=1 |
404 |
[ -n "$undefined" ] && echo -e "$undefined" && echo "Undefined symbols!" && ok= |
405 |
[ -n "$fhserr" ] && echo -e "$fhserr" && echo "Binaries in datadir!" && ok= |
406 |
[ -n "$ok" ] |
407 |
) |
408 |
|
409 |
%clean |
410 |
rm -rf %{buildroot} |
411 |
|
412 |
%files |
413 |
%defattr(-,root,root) |
414 |
%doc %{_docdir}/xbmc |
415 |
%{_sysconfdir}/X11/wmsession.d/15XBMC |
416 |
%{_bindir}/xbmc |
417 |
%{_bindir}/xbmc-standalone |
418 |
%dir %{_libdir}/xbmc |
419 |
%dir %{_libdir}/xbmc/addons |
420 |
%dir %{_libdir}/xbmc/system |
421 |
%dir %{_libdir}/xbmc/system/players |
422 |
%dir %{_libdir}/xbmc/system/players/dvdplayer |
423 |
%dir %{_libdir}/xbmc/system/players/paplayer |
424 |
%{_libdir}/xbmc/xbmc.bin |
425 |
%{_libdir}/xbmc/xbmc-xrandr |
426 |
%dir %{_libdir}/xbmc/addons/* |
427 |
%{_libdir}/xbmc/addons/*/*.so |
428 |
%{_libdir}/xbmc/addons/*/*.pvr |
429 |
%{_libdir}/xbmc/addons/*/*.vis |
430 |
%{_libdir}/xbmc/addons/*/*.xbs |
431 |
%{_libdir}/xbmc/system/ImageLib-*-linux.so |
432 |
%{_libdir}/xbmc/system/hdhomerun-*-linux.so |
433 |
%{_libdir}/xbmc/system/libcmyth-*-linux.so |
434 |
%{_libdir}/xbmc/system/libcpluff-*-linux.so |
435 |
%{_libdir}/xbmc/system/libexif-*-linux.so |
436 |
%{_libdir}/xbmc/system/libid3tag-*-linux.so |
437 |
%{_libdir}/xbmc/system/players/dvdplayer/libdvdnav-*-linux.so |
438 |
%if %with internal_ffmpeg |
439 |
%{_libdir}/xbmc/system/players/dvdplayer/av*-linux.so |
440 |
%{_libdir}/xbmc/system/players/dvdplayer/postproc-*-linux.so |
441 |
%{_libdir}/xbmc/system/players/dvdplayer/swscale-*-linux.so |
442 |
%endif |
443 |
%{_libdir}/xbmc/system/players/paplayer/adpcm-*-linux.so |
444 |
%{_libdir}/xbmc/system/players/paplayer/libsidplay2-*-linux.so |
445 |
%{_libdir}/xbmc/system/players/paplayer/nosefart-*-linux.so |
446 |
%{_libdir}/xbmc/system/players/paplayer/stsoundlibrary-*-linux.so |
447 |
%{_libdir}/xbmc/system/players/paplayer/timidity-*-linux.so |
448 |
%{_libdir}/xbmc/system/players/paplayer/vgmstream-*-linux.so |
449 |
%ifarch %ix86 |
450 |
%{_libdir}/xbmc/system/players/paplayer/SNESAPU-*-linux.so |
451 |
%endif |
452 |
%dir %{_datadir}/xbmc |
453 |
%{_datadir}/xbmc/addons |
454 |
%{_datadir}/xbmc/FEH.py |
455 |
%{_datadir}/xbmc/language |
456 |
%{_datadir}/xbmc/media |
457 |
%{_datadir}/xbmc/sounds |
458 |
%{_datadir}/xbmc/system |
459 |
%{_datadir}/xbmc/userdata |
460 |
%{_datadir}/applications/xbmc.desktop |
461 |
%{_iconsdir}/hicolor/*/apps/xbmc.png |
462 |
|
463 |
%files eventclients-common |
464 |
%defattr(-,root,root) |
465 |
%python_sitelib/xbmc |
466 |
%dir %{_datadir}/pixmaps/xbmc |
467 |
%{_datadir}/pixmaps/xbmc/*.png |
468 |
|
469 |
%files eventclients-devel |
470 |
%defattr(-,root,root) |
471 |
%dir %{_includedir}/xbmc |
472 |
%{_includedir}/xbmc/xbmcclient.h |
473 |
|
474 |
%files eventclient-j2me |
475 |
%defattr(-,root,root) |
476 |
%{_bindir}/xbmc-j2meremote |
477 |
|
478 |
%files eventclient-ps3 |
479 |
%defattr(-,root,root) |
480 |
%{_bindir}/xbmc-ps3d |
481 |
%{_bindir}/xbmc-ps3remote |
482 |
|
483 |
%files eventclient-xbmc-send |
484 |
%defattr(-,root,root) |
485 |
%{_bindir}/xbmc-send |
486 |
|
487 |
%files eventclient-wiiremote |
488 |
%defattr(-,root,root) |
489 |
%{_bindir}/xbmc-wiiremote |
490 |
|
491 |
|