/[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 343733 - (show annotations) (download)
Wed Jan 9 14:23:48 2013 UTC (11 years, 3 months ago) by anssi
File size: 15489 byte(s)
- new version 12.0 rc3 (Frodo)
- drop merged FFmpeg support backport patches
- rediff old upgrade workaround patch
- use system groovy (system-groovy.patch)
- workaround a code generator issue when using system groovy
  (system-groovy-hack.patch)
- fix bootstrap return value in case of autotools error
  (bootstrap-return-value.patch)
- fix build with automake 1.13+ (automake1.13.patch)
- add new buildrequires
- drop PVR patch, merged upstream
  o NOTE: PVR addons are no longer bundled but instead have to be
    installed separately

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

  ViewVC Help
Powered by ViewVC 1.1.30