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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 400965 - (hide annotations) (download)
Sat Mar 2 00:27:01 2013 UTC (11 years, 1 month ago) by anssi
File size: 15486 byte(s)
- 12.0 "frodo" final version
- drop automake1.13.patch, fixed upstream
- fix buildrequires for better backportability

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

  ViewVC Help
Powered by ViewVC 1.1.30