/[packages]/cauldron/xbmc/current/SPECS/xbmc.spec
ViewVC logotype

Contents of /cauldron/xbmc/current/SPECS/xbmc.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 323732 - (show annotations) (download)
Sat Dec 1 04:47:55 2012 UTC (11 years, 4 months ago) by fwang
File size: 18000 byte(s)
br pcrecpp
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 6
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 # Fix wiiremote eventclient build:
50 Patch1: xbmc-wiiremote-missing-include.patch
51
52 # Backports to fix build with FFmpeg
53 Patch101: 0101-Update-ffmpeg-to-n0.10.2-f139838d6473c7b5152178f602c.patch
54 Patch102: 0102-Update-patches.patch
55 Patch103: 0103-Drop-neon-patch-that-doesn-t-apply-anymore.patch
56 Patch104: 0104-Drop-patch-for-win32-build.patch
57 Patch105: 0105-Drop-patch-for-cdxa-probe-it-causes-missdetections-o.patch
58 Patch106: 0106-Drop-now-merged-or-redundant-patches.patch
59 Patch107: 0107-replace-depreciated-av_open_input_stream-file-with-n.patch
60 Patch108: 0108-replace-depreciated-ByteIOContext-with-AVIOContext.patch
61 Patch109: 0109-replace-depreciated-AVMetadata-Tag-with-AVDictionary.patch
62 Patch110: 0110-Don-t-listen-to-depreciated-return-value-of-av_read_.patch
63 Patch111: 0111-Don-t-use-depreciated-avcodec_thread_init.patch
64 Patch112: 0112-Replace-depreciated-av_find_stream_info-with-avforma.patch
65 Patch113: 0113-Replace-more-depreciated-ffmpeg-functions.patch
66 Patch114: 0114-Drop-support-for-ffmpeg-version-older-than-our-built.patch
67 Patch115: 0115-Replace-deprecated-is_streamed-with-new-seekable-fla.patch
68 Patch116: 0116-Remove-old-code-depending-on-deprecated-file_size.patch
69 Patch117: 0117-changed-replace-old-libavfilter-integration-with-nul.patch
70 Patch118: 0118-changed-replace-old-swscale-pixel-format-conversion-.patch
71 Patch119: 0119-Drop-url_set_interrupt_cb-usage-which-was-removed-in.patch
72 Patch120: 0120-Do-not-map-url_fdopen-as-it-is-deprecated-and-gone-i.patch
73 Patch121: 0121-Replace-av_write_header-by-avformat_write_header.patch
74 Patch122: 0122-Remove-av_set_parameters.patch
75 Patch123: 0123-Replace-av_metadata_-get-set2-by-av_dict_-get-set.patch
76 Patch124: 0124-Merge-av_close_input_-file-stream-into-avformat_clos.patch
77 Patch125: 0125-Replace-init_put_byte-by-avio_alloc_context.patch
78 Patch126: 0126-Replace-dump_format-by-av_dump_format.patch
79 Patch127: 0127-Replace-url_-functions-by-their-avio_-counterparts.patch
80 Patch128: 0128-Remove-av_alloc_put_byte-and-replace-its-occurences-.patch
81 Patch129: 0129-Include-libavfilter-avcodec.h-for-av_vsrc_buffer_add.patch
82 Patch130: 0130-Remove-assignment-to-stream_copy-which-is-never-read.patch
83 Patch131: 0131-Do-not-set-AVFrame.age.patch
84 Patch132: 0132-Use-av_opt_set-instead-of-av_set_string3-and-drop-su.patch
85 Patch133: 0133-Replace-deprecated-av_get_bits_per_sample_fmt-by-av_.patch
86 Patch134: 0134-Convert-to-avcodec_decode_audio4-and-drop-avcodec_de.patch
87 Patch135: 0135-osx-ios-atv2-build-and-link-static-libs-for-ffmpeg-b.patch
88 Patch136: 0136-changed-Only-allow-slice-based-parallel-decoding.patch
89 Patch137: 0137-fixed-crash-if-audio-decoder-for-some-reason-doesn-t.patch
90 Patch138: 0138-dvdplayer-previous-picture-is-invalidated-by-a-call-.patch
91 Patch139: 0139-dvdplayer-Recalculate-codecname-when-we-update-based.patch
92 Patch140: 0140-dvdplayer-avoid-crashing-if-ffmpeg-contains-more-tha.patch
93 Patch141: 0141-Add-support-for-new-ffmpeg-10-11-api.patch
94 Patch142: 0142-Bring-av_read_frame_flush-in-line-with-ffmpeg-git.patch
95 Patch143: 0143-avutil-add-av_get_default_channel_layout-for-later-u.patch
96 Patch144: 0144-Use-libavutil-av_get_default_channel_layout-instead-.patch
97 Patch145: 0145-DllAvCodec-Remove-now-unused-private-avcodec_guess_c.patch
98
99 # Disable updates of the default skin. Our one is the PVR version, while the
100 # one in the XBMC.org addon repository would be the vanilla one (Confluence
101 # is currently not in the addon repository, though, as of 2012-03).
102 Patch201: xbmc-disable-confluence-update.patch
103
104 # Make the MythTV PVR client buildable (submitted upstream):
105 Patch211: 0001-fixed-undefined-symbols-in-MythTV-PVR-client.patch
106
107 # Hack to workaround upgrading from our old hack... see patch header for more
108 # details and an upstreaming plan.
109 Patch213: 0001-hack-workaround-for-old-incompatible-PVR-addon-datab.patch
110
111 # nosefart audio plugin and RSXS-0.9 based screensavers are GPLv2 only
112 # several eventclients are GPLv3+ (in subpackages)
113 # libhdhomerun is LGPLv3+ with an exception (always ok to link against it)
114 # the rest is GPLv2+
115 # both GPLv2+ and GPLv2 are mentioned because plugins are not part of core
116 # xbmc and therefore e.g. /usr/bin/xbmc is GPLv2+ with LGPLv3+ part
117 # as allowed by a license exception
118 License: GPLv2+ and GPLv2 and (LGPLv3+ with exceptions)
119 Group: Video/Players
120 BuildRequires: boost-devel
121 %if %without internal_ffmpeg
122 BuildRequires: ffmpeg-devel
123 %endif
124 BuildRequires: libmpeg2dec-devel
125 BuildRequires: libogg-devel
126 BuildRequires: libwavpack-devel
127 BuildRequires: python-devel
128 BuildRequires: glew-devel
129 BuildRequires: mesagl-devel
130 BuildRequires: mesaglu-devel
131 BuildRequires: libmad-devel
132 BuildRequires: libjpeg-devel
133 BuildRequires: libsamplerate-devel
134 BuildRequires: libvorbis-devel
135 BuildRequires: bzip2-devel
136 BuildRequires: mysql-devel
137 BuildRequires: liblzo2-devel
138 BuildRequires: zlib-devel
139 BuildRequires: openssl-devel
140 BuildRequires: fontconfig-devel
141 BuildRequires: fribidi-devel
142 BuildRequires: sqlite3-devel
143 BuildRequires: libpng-devel
144 BuildRequires: pcrecpp-devel
145 BuildRequires: libcdio-devel
146 BuildRequires: libmms-devel
147 BuildRequires: freetype2-devel
148 BuildRequires: libflac-devel
149 BuildRequires: libsmbclient-devel
150 BuildRequires: SDL_mixer-devel
151 BuildRequires: libjasper-devel
152 BuildRequires: libtiff-devel
153 BuildRequires: SDL_image-devel
154 BuildRequires: libalsa-devel
155 BuildRequires: enca-devel
156 BuildRequires: libxt-devel
157 BuildRequires: libxtst-devel
158 BuildRequires: libxmu-devel
159 BuildRequires: libxinerama-devel
160 BuildRequires: libcurl-devel
161 BuildRequires: dbus-devel
162 BuildRequires: SDL-devel
163 BuildRequires: pulseaudio-devel
164 BuildRequires: avahi-common-devel
165 BuildRequires: avahi-client-devel
166 BuildRequires: libxrandr-devel
167 BuildRequires: vdpau-devel
168 BuildRequires: cwiid-devel
169 BuildRequires: libice-devel
170 BuildRequires: libx11-devel
171 BuildRequires: crystalhd-devel
172 BuildRequires: libmicrohttpd-devel
173 BuildRequires: libmodplug-devel
174 BuildRequires: ssh-devel
175 BuildRequires: libva-devel
176 BuildRequires: gettext-devel
177 BuildRequires: expat-devel
178 BuildRequires: libass-devel
179 BuildRequires: rtmp-devel
180 BuildRequires: bluray-devel
181 BuildRequires: bluez-devel
182 BuildRequires: udev-devel
183 BuildRequires: yajl-devel
184 BuildRequires: nfs-devel
185 BuildRequires: afpclient-devel
186 BuildRequires: libplist-devel
187 BuildRequires: shairport-devel
188 BuildRequires: cec-devel
189 BuildRequires: cmake
190 BuildRequires: gperf
191 BuildRequires: zip
192 %ifarch %ix86
193 BuildRequires: nasm
194 %endif
195 Requires: lsb-release
196 # dlopened (existence check required by rpm5 as it doesn't use stderr):
197 %define dlopenreq() %([ -e %{_libdir}/lib%{1}.so ] && rpm -qf --qf '%%{name}' $(readlink -f %{_libdir}/lib%{1}.so) 2>/dev/null || echo %{name})
198 Requires: %dlopenreq curl
199 Requires: %dlopenreq FLAC
200 Requires: %dlopenreq mad
201 Requires: %dlopenreq ogg
202 Requires: %dlopenreq vorbis
203 Requires: %dlopenreq vorbisenc
204 Requires: %dlopenreq vorbisfile
205 Requires: %dlopenreq modplug
206 Requires: %dlopenreq rtmp
207 Requires: %dlopenreq mpeg2
208 Requires: %dlopenreq ass
209 Requires: %dlopenreq bluray
210 Requires: %dlopenreq nfs
211 Requires: %dlopenreq afpclient
212 Requires: %dlopenreq plist
213 Requires: %dlopenreq shairport
214 Requires: %dlopenreq cec
215 # not nearly as common as the above, so just suggest instead for now:
216 Suggests: %dlopenreq crystalhd
217 # TODO: FEH.py is useless nowadays, drop it here and upstream.
218 # for FEH.py, to check current configuration is ok for xbmc:
219 Requires: xdpyinfo
220 Requires: glxinfo
221 # for FEH.py to allow it to give an error message (should be available already
222 # on most systems):
223 Requires: pygtk2
224 # for xbmc python scripts:
225 Requires: python-imaging
226 # Packages not shipped in core:
227 Suggests: %{_lib}lame0
228 Suggests: %{_lib}dvdcss2
229
230 # Packages have been merged
231 Obsoletes: xbmc-core < 9.11-1.svn29468
232 Obsoletes: xbmc-skin-confluence < 9.11-1.svn29468
233 Obsoletes: xbmc-skin-pm3-hd < 9.11-1.svn29468
234 Obsoletes: xbmc-nosefart < 9.11-1.svn29468
235 Obsoletes: xbmc-screensavers-default < 9.11-1.svn29468
236 Obsoletes: xbmc-script-examples < 9.11-1.svn27796
237 Obsoletes: xbmc-web-pm3 < 9.11-1.svn27796
238
239 %description
240 XBMC is an award-winning free and open source software media player
241 and entertainment hub for digital media.
242
243 While XBMC functions very well as a standard media player application
244 for your computer, it has been designed to be the perfect companion
245 for your HTPC. Supporting an almost endless range of remote controls,
246 and combined with its beautiful interface and powerful skinning
247 engine, XBMC feels very natural to use from the couch and is the
248 ideal solution for your home theater.
249
250 This is the stable version of XBMC from the %branch_release release branch,
251 with PVR support added from opdenkamp %branch_release-pvr branch. Support for
252 RAR files is not included due to license issues.
253
254 %package eventclients-common
255 Summary: Common files for XBMC eventclients
256 Group: Video/Players
257 License: GPLv2+
258 %py_requires
259
260 %description eventclients-common
261 XBMC is an award-winning free and open source software media player
262 and entertainment hub for digital media.
263
264 This package contains common files for eventclients.
265
266 %package eventclients-devel
267 Summary: Development files for XBMC eventclients
268 Group: Development/C
269 License: GPLv2+
270
271 %description eventclients-devel
272 XBMC is an award-winning free and open source software media player
273 and entertainment hub for digital media.
274
275 This package contains files needed to build eventclients.
276
277 %package eventclient-wiiremote
278 Summary: Wii Remote eventclient for XBMC
279 Group: Video/Players
280 License: GPLv3+
281 Requires: %{name}-eventclients-common = %{version}-%{release}
282
283 %description eventclient-wiiremote
284 XBMC is an award-winning free and open source software media player
285 and entertainment hub for digital media.
286
287 This package contains the Wii Remote eventclient.
288
289 %package eventclient-j2me
290 Summary: J2ME eventclient for XBMC
291 Group: Video/Players
292 License: GPLv2+
293 Requires: python-pybluez
294 Requires: %{name}-eventclients-common = %{version}-%{release}
295
296 %description eventclient-j2me
297 XBMC is an award-winning free and open source software media player
298 and entertainment hub for digital media.
299
300 This package contains the J2ME eventclient, providing a bluetooth
301 server that can communicate with a mobile tool supporting J2ME.
302
303 %package eventclient-ps3
304 Summary: PS3 eventclients for XBMC
305 Group: Video/Players
306 License: GPLv2+
307 Requires: python-pybluez
308 Requires: %{name}-eventclients-common = %{version}-%{release}
309 # requires via zeroconf.py, only used by xbmc-ps3d:
310 Requires: python-gobject avahi-python python-dbus
311 # TODO merge all these?, and TODO zeroconf.py to a correct package? :)
312 Obsoletes: eventclient-ps3remote < 9.11-1.svn31936
313
314 %description eventclient-ps3
315 XBMC is an award-winning free and open source software media player
316 and entertainment hub for digital media.
317
318 This package contains the PS3 remote and sixaxis eventclients.
319
320 %package eventclient-xbmc-send
321 Summary: PS3 eventclient for XBMC
322 Group: Video/Players
323 License: GPLv2+
324 Requires: %{name}-eventclients-common = %{version}-%{release}
325
326 %description eventclient-xbmc-send
327 XBMC is an award-winning free and open source software media player
328 and entertainment hub for digital media.
329
330 This package contains the xbmc-send eventclient.
331
332 %prep
333 %if %snap
334 %setup -q -n %name-%branch_release-%snap
335 %else
336 %if %pre
337 %setup -q -n %{name}-%{version}-%{branch_release}_%{pre}
338 %else
339 %setup -q
340 %endif
341 %endif
342 %apply_patches
343 # otherwise backups end up in binary rpms
344 find -type f \( -name '*.00??' -o -name '*.00??~' \) -print -delete
345
346 # remove prebuilt libraries
347 find -type f \( -iname '*.so' -o -iname '*.dll' -o -iname '*.exe' \) -delete
348
349 # GPLv2 only
350 rm -r lib/cmyth/Win32/include/mysql
351 # BSD 4-clause
352 rm -r xbmc/cores/DllLoader/exports/emu_socket
353
354 # win32 only
355 rm -rf system/players/dvdplayer/etc/fonts
356
357 %build
358 %if %snap
359 export GIT_REV=%snap
360 %else
361 export GIT_REV="tarball"
362 %endif
363 ./bootstrap
364
365 # due to xbmc modules that use symbols from xbmc binary
366 # and are not using libtool
367 %define _disable_ld_no_undefined 1
368
369 # Workaround configure using git to override GIT_REV (TODO: fix it properly)
370 export ac_cv_prog_HAVE_GIT="no"
371
372 %configure2_5x \
373 --disable-debug \
374 --disable-ccache \
375 --enable-external-libraries \
376 --disable-non-free \
377 --disable-dvdcss \
378 --disable-hal \
379 --enable-goom \
380 --with-lirc-device=/var/run/lirc/lircd \
381 %if %with internal_ffmpeg
382 --disable-external-ffmpeg
383 %endif
384
385 # non-free = unrar
386 # dvdcss is handled via dlopen when disabled
387 # hal is disabled as it is just a fallback when the replacmenets are
388 # not available
389
390 %make
391 %make -C tools/EventClients wiimote
392
393 %install
394 %makeinstall_std
395 %makeinstall_std -C tools/EventClients
396
397 # unused
398 rm %{buildroot}%{_datadir}/xsessions/XBMC.desktop
399 # our version of the above:
400 install -d -m755 %{buildroot}%{_sysconfdir}/X11/wmsession.d
401 cat > %{buildroot}%{_sysconfdir}/X11/wmsession.d/15XBMC <<EOF
402 NAME=XBMC
403 ICON=xbmc.png
404 DESC=XBMC Media Center
405 EXEC=%{_bindir}/xbmc-standalone
406 SCRIPT:
407 exec %{_bindir}/xbmc-standalone
408 EOF
409
410 # unused files, TODO fix this upstream:
411 find %{buildroot}%{_datadir}/xbmc/addons/skin.*/media -name '*.png' -delete
412
413 ( # for IFS and +x
414 # Check for issues in ELF binaries
415 undefined=
416 fhserr=
417 echo Silencing output of undefined symbol and FHS conformance checks
418 set +x
419 IFS=$'\n'
420 for file in $(find %{buildroot} -type f); do
421 type="$(file "$file")"
422 echo "$type" | grep -q "ELF" || continue
423
424 # Check that a binary file is not in datadir:
425 echo "$file" | grep -q "%{_datadir}" && fhserr="${fhserr}$file\n"
426
427 # check for undefined symbols in XBMC modules
428 echo "$type" | grep -q "shared object" || continue
429 for symbol in $(LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} ldd -r "$file" 2>&1 | grep undefined | awk '{ print $3 }'); do
430 # undefined symbols may also be provided by XBMC:
431 nm -f posix -D --no-demangle --defined-only %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep -q "^$symbol " && continue
432 # The symbol was not provided by XBMC.
433 # Check if it is available through its dependencies:
434 for filename in $(objdump -p %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep NEEDED | awk '{ print $2 }'); do
435 depfile="/%{_lib}/$filename"
436 [ -e "$depfile" ] || depfile="%{_libdir}/$filename"
437 nm -f posix -D --no-demangle --defined-only $depfile | grep -q "^$symbol " && continue 2
438 done
439 # Euphoria references rsxs PNG class, but it is never used at runtime,
440 # so it results in no errors due to RTLD_LAZY being used by xbmc module loader.
441 case $file:$symbol in
442 */Euphoria.xbs:_ZN3PNG*) continue;;
443 %if %with internal_ffmpeg
444 */dvdplayer/*.so:*) continue;;
445 %endif
446 esac
447 # the symbol was not found
448 undefined="${undefined}$file: $symbol\n"
449 done
450 done
451 ok=1
452 [ -n "$undefined" ] && echo -e "$undefined" && echo "Undefined symbols!" && ok=
453 [ -n "$fhserr" ] && echo -e "$fhserr" && echo "Binaries in datadir!" && ok=
454 [ -n "$ok" ]
455 )
456
457 %files
458 %doc %{_docdir}/xbmc
459 %{_sysconfdir}/X11/wmsession.d/15XBMC
460 %{_bindir}/xbmc
461 %{_bindir}/xbmc-standalone
462 %dir %{_libdir}/xbmc
463 %dir %{_libdir}/xbmc/addons
464 %dir %{_libdir}/xbmc/system
465 %dir %{_libdir}/xbmc/system/players
466 %dir %{_libdir}/xbmc/system/players/dvdplayer
467 %dir %{_libdir}/xbmc/system/players/paplayer
468 %{_libdir}/xbmc/xbmc.bin
469 %{_libdir}/xbmc/xbmc-xrandr
470 %dir %{_libdir}/xbmc/addons/*
471 %{_libdir}/xbmc/addons/*/*.so
472 %{_libdir}/xbmc/addons/*/*.pvr
473 %{_libdir}/xbmc/addons/*/*.vis
474 %{_libdir}/xbmc/addons/*/*.xbs
475 %{_libdir}/xbmc/system/ImageLib-*-linux.so
476 %{_libdir}/xbmc/system/hdhomerun-*-linux.so
477 %{_libdir}/xbmc/system/libcmyth-*-linux.so
478 %{_libdir}/xbmc/system/libcpluff-*-linux.so
479 %{_libdir}/xbmc/system/libexif-*-linux.so
480 %{_libdir}/xbmc/system/libid3tag-*-linux.so
481 %{_libdir}/xbmc/system/players/dvdplayer/libdvdnav-*-linux.so
482 %if %with internal_ffmpeg
483 %{_libdir}/xbmc/system/players/dvdplayer/av*-linux.so
484 %{_libdir}/xbmc/system/players/dvdplayer/postproc-*-linux.so
485 %{_libdir}/xbmc/system/players/dvdplayer/swscale-*-linux.so
486 %endif
487 %{_libdir}/xbmc/system/players/paplayer/adpcm-*-linux.so
488 %{_libdir}/xbmc/system/players/paplayer/libsidplay2-*-linux.so
489 %{_libdir}/xbmc/system/players/paplayer/nosefart-*-linux.so
490 %{_libdir}/xbmc/system/players/paplayer/stsoundlibrary-*-linux.so
491 %{_libdir}/xbmc/system/players/paplayer/timidity-*-linux.so
492 %{_libdir}/xbmc/system/players/paplayer/vgmstream-*-linux.so
493 %ifarch %ix86
494 %{_libdir}/xbmc/system/players/paplayer/SNESAPU-*-linux.so
495 %endif
496 %dir %{_datadir}/xbmc
497 %{_datadir}/xbmc/addons
498 %{_datadir}/xbmc/FEH.py
499 %{_datadir}/xbmc/language
500 %{_datadir}/xbmc/media
501 %{_datadir}/xbmc/sounds
502 %{_datadir}/xbmc/system
503 %{_datadir}/xbmc/userdata
504 %{_datadir}/applications/xbmc.desktop
505 %{_iconsdir}/hicolor/*/apps/xbmc.png
506
507 %files eventclients-common
508 %python_sitelib/xbmc
509 %dir %{_datadir}/pixmaps/xbmc
510 %{_datadir}/pixmaps/xbmc/*.png
511
512 %files eventclients-devel
513 %dir %{_includedir}/xbmc
514 %{_includedir}/xbmc/xbmcclient.h
515
516 %files eventclient-j2me
517 %{_bindir}/xbmc-j2meremote
518
519 %files eventclient-ps3
520 %{_bindir}/xbmc-ps3d
521 %{_bindir}/xbmc-ps3remote
522
523 %files eventclient-xbmc-send
524 %{_bindir}/xbmc-send
525
526 %files eventclient-wiiremote
527 %{_bindir}/xbmc-wiiremote

  ViewVC Help
Powered by ViewVC 1.1.30