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

  ViewVC Help
Powered by ViewVC 1.1.30