1 |
ennael |
78010 |
|
2 |
|
|
%define name xbmc |
3 |
|
|
%define branch_release dharma |
4 |
|
|
%define extra_feature pvr |
5 |
anssi |
89302 |
%define version 10.1 |
6 |
anssi |
93516 |
%define snap 0 |
7 |
fwang |
113516 |
%define rel 3 |
8 |
ennael |
78010 |
|
9 |
anssi |
93516 |
%if %snap |
10 |
ennael |
78010 |
%define branch %branch_release.%extra_feature |
11 |
|
|
%else |
12 |
|
|
%define branch %extra_feature |
13 |
|
|
%endif |
14 |
|
|
|
15 |
|
|
%define branchr %([ "%branch" ] && echo .%branch | tr - _) |
16 |
|
|
|
17 |
|
|
# There are some compatibility issues with the various python addons which |
18 |
|
|
# are mostly tested against bundled python only, and there are too many of |
19 |
|
|
# them to be checked out and fixed by us for system python compatibility. |
20 |
|
|
# Additional issues are caused by the bundled python having several system |
21 |
|
|
# calls redirected through xbmc VFS layer, which doesn't currently work when |
22 |
|
|
# using the system python. Usage of system python can probably be safely |
23 |
|
|
# re-enabled when XBMC upstream migrates away from python 2.4 and fixes the |
24 |
|
|
# issues regarding external python (this is planned). -Anssi 11/2010 |
25 |
|
|
%define system_python 0 |
26 |
|
|
|
27 |
|
|
# using system python2.7+ reportedly causes problems with |
28 |
|
|
# getcwd() and chdir() calls from python |
29 |
|
|
# http://trac.xbmc.org/ticket/8658 |
30 |
|
|
%define system_python 0 |
31 |
|
|
|
32 |
|
|
Summary: XBMC Media Center - media player and home entertainment system |
33 |
|
|
Name: %{name} |
34 |
|
|
Version: %{version} |
35 |
anssi |
93516 |
%if %snap |
36 |
|
|
Release: %mkrel 0.svn%snap%branchr.%rel |
37 |
ennael |
78010 |
# REV=$(git log -1 origin/Dharma | grep git-svn-id | sed -ne 's,^.*@\([^ ]\+\).*$,\1,p') |
38 |
|
|
# git archive --prefix=xbmc-dharma-$REV/ origin/Dharma | xz > xbmc-dharma-$REV.tar.xz |
39 |
anssi |
93516 |
Source: %{name}-%branch_release-%snap.tar.xz |
40 |
ennael |
78010 |
%else |
41 |
|
|
Release: %mkrel 1.%branch.%rel |
42 |
|
|
Source: %{name}-%{version}.tar.gz |
43 |
|
|
%endif |
44 |
|
|
URL: http://xbmc.org/ |
45 |
|
|
|
46 |
|
|
# needed modules when using bundled python (versions are those expected by the Makefiles): |
47 |
|
|
Source11: http://www.effbot.org/downloads/Imaging-1.1.7.tar.gz |
48 |
|
|
Source12: http://pysqlite.googlecode.com/files/pysqlite-2.5.6.tar.gz |
49 |
|
|
|
50 |
|
|
# bring snapshot up-to-date with pvr branch |
51 |
|
|
# https://github.com/opdenkamp/xbmc/tree/Dharma-pvr |
52 |
|
|
Patch0: xbmc-10.0-opdenkamp-pvr-fdb057b7754.patch |
53 |
|
|
|
54 |
|
|
# bring snapshot up-to-date with main branch (patches rediffed for pvr): |
55 |
|
|
# already up-to-date |
56 |
|
|
#Patch18: xbmc-dharma-r35305-r%svnsnap.patch |
57 |
|
|
|
58 |
|
|
# VDPAU backports from upstream master |
59 |
|
|
Patch31: 0001-changed-split-CDVDVideoCodecFFmpeg-GetPicture.patch |
60 |
|
|
Patch32: 0002-fixed-VDPAU-temporal-deinterlacer-was-not-provided-e.patch |
61 |
|
|
Patch33: 0003-changed-allow-VDPAU-reverse-telecine-when-deinterlac.patch |
62 |
|
|
Patch34: 0004-fixed-VDPAU-reverse-telecine.patch |
63 |
|
|
Patch35: 0005-changed-enable-VDPAU-temporal-deinterlacer-when-temp.patch |
64 |
|
|
Patch36: 0006-fixed-flush-VDPAU-video-surfaces-and-picture-queue-w.patch |
65 |
|
|
Patch37: 0007-fixed-picture.iDuration-0-comparison.patch |
66 |
|
|
Patch38: 0008-fixed-vdpau-needs-to-memset-its-DVDVideoPicture-stru.patch |
67 |
|
|
|
68 |
|
|
# backports from upstream master |
69 |
|
|
Patch40: 0001-added-note-in-linux-crashlog-if-gdb-is-not-installed.patch |
70 |
|
|
Patch41: 0001-Added-9763-Fix-64-bit-WiiRemote-connection-issues-Th.patch |
71 |
|
|
|
72 |
|
|
# Disable updates of the default skin. Our one is the PVR version, while the |
73 |
|
|
# one in the XBMC.org addon repository would be the vanilla one (Confluence |
74 |
|
|
# is currently not in the addon repository, though, as of 2010-10). |
75 |
|
|
Patch60: xbmc-disable-confluence-update.patch |
76 |
|
|
|
77 |
|
|
# Workaround http://www.nvnews.net/vbulletin/showthread.php?t=156665 |
78 |
|
|
# by forcing SDL to use alsa when pulse is disabled and nvidia proprietary |
79 |
|
|
# driver version 260.x.y older than 260.19.21 is active. |
80 |
|
|
Patch61: 0001-added-workaround-for-crash-with-nonpulse-nvidia260.patch |
81 |
|
|
|
82 |
|
|
# forkpty and openpty are in -lutil |
83 |
|
|
Patch62: 0001-fixed-undefined-symbols-in-internal-python.patch |
84 |
|
|
|
85 |
|
|
# Ensure backward-compatibility with pvr-testing2 and prevent future compatibility |
86 |
|
|
# issues with trunk Addons database format |
87 |
|
|
Patch63: 0001-changed-use-the-legacy-pvr-testing2-addon-database.patch |
88 |
|
|
|
89 |
|
|
# Do not use avg_frame_rate for mkv files on 2010.1 and older, instead |
90 |
|
|
# use time_base if needed (fixes MicroDVD subtitles with 23.976 H.264 mkv) |
91 |
|
|
Patch65: xbmc-old-libavformat-mkv-subs.patch |
92 |
|
|
|
93 |
|
|
# build faad support with internal headers, but do not build the |
94 |
|
|
# internal library; use system lib with dlopen instead; |
95 |
|
|
# this allows keeping it as an optional external library |
96 |
|
|
Patch70: xbmc-hack-ext-faad-with-int-headers.patch |
97 |
|
|
|
98 |
|
|
# CVE fixes for the internal python |
99 |
|
|
Patch81: 0001-fixed-CVE-2007-2052-in-internal-python-Mandriva.patch |
100 |
|
|
Patch82: 0002-fixed-CVE-2007-4965-in-internal-python-upstream.patch |
101 |
|
|
Patch83: 0003-fixed-CVE-2008-1679-in-internal-python-upstream.patch |
102 |
|
|
Patch84: 0004-fixed-CVE-2008-1887-in-internal-python-upstream.patch |
103 |
|
|
Patch85: 0005-fixed-CVE-2008-1721-in-internal-python-upstream.patch |
104 |
|
|
Patch86: 0006-fixed-CVE-2008-2315-in-internal-python-Gentoo.patch |
105 |
|
|
Patch87: 0007-fixed-CVE-2008-3142-in-internal-python-Gentoo.patch |
106 |
|
|
Patch88: 0008-fixed-CVE-2008-3144-in-internal-python-Gentoo.patch |
107 |
|
|
Patch89: 0009-fixed-CVE-2008-4864-in-internal-python-Mandriva.patch |
108 |
|
|
Patch90: 0010-fixed-CVE-2008-5031-in-internal-python-upstream.patch |
109 |
|
|
Patch91: 0011-fixed-CVE-2010-1634-in-internal-python-Mandriva.patch |
110 |
|
|
Patch92: 0012-fixed-CVE-2010-2089-in-internal-python-Mandriva.patch |
111 |
|
|
Patch93: 0013-fixed-CVE-2009-2625-in-internal-python-Mandriva.patch |
112 |
|
|
Patch94: 0014-fixed-CVE-2010-3492-in-internal-python-Mandriva.patch |
113 |
|
|
Patch95: 0015-fixed-CVE-2010-3493-in-internal-python-Mandriva.patch |
114 |
|
|
|
115 |
|
|
# nosefart audio plugin and RSXS-0.9 based screensavers are GPLv2 only |
116 |
|
|
# libhts, libhdhomerun and several eventclients are GPLv3+ |
117 |
|
|
# the rest is GPLv2+ |
118 |
|
|
License: GPLv3+ and GPLv2+ and GPLv2 |
119 |
|
|
Group: Video |
120 |
|
|
BuildRoot: %{_tmppath}/%{name}-root |
121 |
|
|
BuildRequires: boost-devel |
122 |
|
|
BuildRequires: ffmpeg-devel |
123 |
|
|
BuildRequires: libmpeg2dec-devel |
124 |
|
|
BuildRequires: libogg-devel |
125 |
|
|
BuildRequires: libwavpack-devel |
126 |
|
|
BuildRequires: python-devel |
127 |
|
|
BuildRequires: glew-devel |
128 |
|
|
BuildRequires: mesagl-devel |
129 |
|
|
BuildRequires: mesaglu-devel |
130 |
|
|
BuildRequires: libmad-devel |
131 |
|
|
BuildRequires: libjpeg-devel |
132 |
|
|
BuildRequires: libsamplerate-devel |
133 |
|
|
BuildRequires: libvorbis-devel |
134 |
|
|
BuildRequires: bzip2-devel |
135 |
|
|
BuildRequires: mysql-devel |
136 |
|
|
BuildRequires: liblzo2-devel |
137 |
|
|
BuildRequires: zlib-devel |
138 |
|
|
BuildRequires: openssl-devel |
139 |
|
|
BuildRequires: fontconfig-devel |
140 |
|
|
BuildRequires: fribidi-devel |
141 |
|
|
BuildRequires: sqlite3-devel |
142 |
|
|
BuildRequires: libpng-devel |
143 |
|
|
BuildRequires: libpcre-devel |
144 |
|
|
BuildRequires: libcdio-devel |
145 |
|
|
BuildRequires: libmms-devel |
146 |
|
|
BuildRequires: freetype2-devel |
147 |
|
|
BuildRequires: libflac-devel |
148 |
|
|
BuildRequires: libsmbclient-devel |
149 |
|
|
BuildRequires: SDL_mixer-devel |
150 |
|
|
BuildRequires: libjasper-devel |
151 |
|
|
BuildRequires: libtiff-devel |
152 |
|
|
BuildRequires: SDL_image-devel |
153 |
|
|
BuildRequires: libalsa-devel |
154 |
|
|
BuildRequires: enca-devel |
155 |
|
|
BuildRequires: libxt-devel |
156 |
|
|
BuildRequires: libxtst-devel |
157 |
|
|
BuildRequires: libxmu-devel |
158 |
|
|
BuildRequires: libxinerama-devel |
159 |
|
|
BuildRequires: libcurl-devel |
160 |
|
|
BuildRequires: dbus-devel |
161 |
|
|
BuildRequires: hal-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: cmake |
183 |
|
|
BuildRequires: gperf |
184 |
|
|
BuildRequires: zip |
185 |
|
|
%ifarch %ix86 |
186 |
|
|
BuildRequires: nasm |
187 |
|
|
%endif |
188 |
|
|
%if !%system_python |
189 |
|
|
# python-imaging |
190 |
|
|
BuildRequires: lcms-devel |
191 |
|
|
%endif |
192 |
|
|
Requires: lsb-release |
193 |
|
|
# dlopened (existence check required by rpm5 as it doesn't use stderr): |
194 |
|
|
%define dlopenreq() %([ -e %{_libdir}/lib%{1}.so ] && rpm -qf --qf '%%{name}' $(readlink -f %{_libdir}/lib%{1}.so) 2>/dev/null || echo %{name}) |
195 |
|
|
Requires: %dlopenreq curl |
196 |
|
|
Requires: %dlopenreq FLAC |
197 |
|
|
Requires: %dlopenreq mad |
198 |
|
|
Requires: %dlopenreq ogg |
199 |
|
|
Requires: %dlopenreq vorbis |
200 |
|
|
Requires: %dlopenreq vorbisenc |
201 |
|
|
Requires: %dlopenreq vorbisfile |
202 |
|
|
Requires: %dlopenreq modplug |
203 |
|
|
Requires: %dlopenreq rtmp |
204 |
|
|
# not nearly as common as the above, so just suggest instead for now: |
205 |
|
|
Suggests: %dlopenreq bluray |
206 |
|
|
Suggests: %dlopenreq crystalhd |
207 |
|
|
# for FEH.py, to check current configuration is ok for xbmc: |
208 |
|
|
Requires: xdpyinfo |
209 |
|
|
Requires: glxinfo |
210 |
|
|
# for FEH.py to allow it to give an error message (should be available already |
211 |
|
|
# on most systems): |
212 |
|
|
Requires: pygtk2 |
213 |
|
|
%if %system_python |
214 |
|
|
# for xbmc python scripts: |
215 |
|
|
Requires: python-imaging |
216 |
|
|
Requires: python-sqlite2 |
217 |
|
|
%endif |
218 |
|
|
# Packages not shipped by Mandriva: |
219 |
|
|
Suggests: %{_lib}faad2_2 |
220 |
|
|
Suggests: %{_lib}lame0 |
221 |
|
|
Suggests: %{_lib}dca0 |
222 |
|
|
Suggests: %{_lib}dvdcss2 |
223 |
|
|
|
224 |
|
|
# Packages have been merged |
225 |
|
|
Obsoletes: xbmc-core < 9.11-1.svn29468 |
226 |
|
|
Obsoletes: xbmc-skin-confluence < 9.11-1.svn29468 |
227 |
|
|
Obsoletes: xbmc-skin-pm3-hd < 9.11-1.svn29468 |
228 |
|
|
Obsoletes: xbmc-nosefart < 9.11-1.svn29468 |
229 |
|
|
Obsoletes: xbmc-screensavers-default < 9.11-1.svn29468 |
230 |
|
|
Obsoletes: xbmc-script-examples < 9.11-1.svn27796 |
231 |
|
|
Obsoletes: xbmc-web-pm3 < 9.11-1.svn27796 |
232 |
|
|
|
233 |
|
|
%description |
234 |
|
|
XBMC is an award-winning free and open source software media player |
235 |
|
|
and entertainment hub for digital media. |
236 |
|
|
|
237 |
|
|
While XBMC functions very well as a standard media player application |
238 |
|
|
for your computer, it has been designed to be the perfect companion |
239 |
|
|
for your HTPC. Supporting an almost endless range of remote controls, |
240 |
|
|
and combined with its beautiful interface and powerful skinning |
241 |
|
|
engine, XBMC feels very natural to use from the couch and is the |
242 |
|
|
ideal solution for your home theater. |
243 |
|
|
|
244 |
|
|
This is the stable version of XBMC from the dharma release branch, |
245 |
|
|
with PVR support added from opdenkamp Dharma-pvr branch. Support for |
246 |
|
|
RAR files and XBMS protocol is not included due to license issues. |
247 |
|
|
|
248 |
|
|
%package eventclients-common |
249 |
|
|
Summary: Common files for XBMC eventclients |
250 |
|
|
Group: Video |
251 |
|
|
%py_requires |
252 |
|
|
|
253 |
|
|
%description eventclients-common |
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 common files for eventclients. |
258 |
|
|
|
259 |
|
|
%package eventclients-devel |
260 |
|
|
Summary: Development files for XBMC eventclients |
261 |
|
|
Group: Development/C |
262 |
|
|
|
263 |
|
|
%description eventclients-devel |
264 |
|
|
XBMC is an award-winning free and open source software media player |
265 |
|
|
and entertainment hub for digital media. |
266 |
|
|
|
267 |
|
|
This package contains files needed to build eventclients. |
268 |
|
|
|
269 |
|
|
%package eventclient-wiiremote |
270 |
|
|
Summary: Wii Remote eventclient for XBMC |
271 |
|
|
Group: Video |
272 |
|
|
Requires: %{name}-eventclients-common = %{version}-%{release} |
273 |
|
|
|
274 |
|
|
%description eventclient-wiiremote |
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 Wii Remote eventclient. |
279 |
|
|
|
280 |
|
|
%package eventclient-j2me |
281 |
|
|
Summary: J2ME eventclient for XBMC |
282 |
|
|
Group: Video |
283 |
|
|
Requires: python-pybluez |
284 |
|
|
Requires: %{name}-eventclients-common = %{version}-%{release} |
285 |
|
|
|
286 |
|
|
%description eventclient-j2me |
287 |
|
|
XBMC is an award-winning free and open source software media player |
288 |
|
|
and entertainment hub for digital media. |
289 |
|
|
|
290 |
|
|
This package contains the J2ME eventclient, providing a bluetooth |
291 |
|
|
server that can communicate with a mobile tool supporting J2ME. |
292 |
|
|
|
293 |
|
|
%package eventclient-ps3 |
294 |
|
|
Summary: PS3 eventclients for XBMC |
295 |
|
|
Group: Video |
296 |
|
|
Requires: python-pybluez |
297 |
|
|
Requires: %{name}-eventclients-common = %{version}-%{release} |
298 |
|
|
# requires via zeroconf.py, only used by xbmc-ps3d: |
299 |
|
|
Requires: python-gobject avahi-python python-dbus |
300 |
|
|
# TODO merge all these?, and TODO zeroconf.py to a correct package? :) |
301 |
|
|
Obsoletes: eventclient-ps3remote < 9.11-1.svn31936 |
302 |
|
|
|
303 |
|
|
%description eventclient-ps3 |
304 |
|
|
XBMC is an award-winning free and open source software media player |
305 |
|
|
and entertainment hub for digital media. |
306 |
|
|
|
307 |
|
|
This package contains the PS3 remote and sixaxis eventclients. |
308 |
|
|
|
309 |
|
|
%package eventclient-xbmc-send |
310 |
|
|
Summary: PS3 eventclient for XBMC |
311 |
|
|
Group: Video |
312 |
|
|
Requires: %{name}-eventclients-common = %{version}-%{release} |
313 |
|
|
|
314 |
|
|
%description eventclient-xbmc-send |
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 xbmc-send eventclient. |
319 |
|
|
|
320 |
|
|
%prep |
321 |
anssi |
93516 |
%if %snap |
322 |
|
|
%setup -q -n %name-%branch_release-%snap |
323 |
ennael |
78010 |
%else |
324 |
|
|
%setup -q |
325 |
|
|
%endif |
326 |
|
|
%apply_patches |
327 |
|
|
# otherwise backups end up in binary rpms |
328 |
|
|
find -type f \( -name '*.00??' -o -name '*.00??~' \) -print -delete |
329 |
|
|
|
330 |
|
|
# remove prebuilt libraries |
331 |
|
|
find -type f \( -iname '*.so' -o -iname '*.dll' -o -iname '*.exe' \) -delete |
332 |
|
|
|
333 |
|
|
# GPLv2 only |
334 |
|
|
rm -r xbmc/lib/cmyth/Win32/include/mysql |
335 |
|
|
# BSD 4-clause |
336 |
|
|
rm -r xbmc/cores/DllLoader/exports/emu_socket |
337 |
|
|
|
338 |
|
|
# rm disabled stuff to detect possible bugs |
339 |
|
|
rm -rf xbmc/cores/dvdplayer/Codecs/{libdts,liba52} xbmc/cores/paplayer/AC3Codec/liba52 |
340 |
|
|
|
341 |
|
|
# win32 only |
342 |
|
|
rm -rf system/players/dvdplayer/etc/fonts |
343 |
|
|
|
344 |
|
|
%if !%system_python |
345 |
|
|
cp %{SOURCE11} lib/addons/script.module.pil |
346 |
|
|
cp %{SOURCE12} lib/addons/script.module.pysqlite |
347 |
|
|
|
348 |
|
|
# we need to fix the lookup directories (otherwise setup.py queries |
349 |
|
|
# incorrect information from the bundled python) |
350 |
|
|
tar -xzf %{SOURCE11} -C lib/addons/script.module.pil |
351 |
|
|
sed -ri 's|^([A-Z0-9]+_ROOT =) None|\1 "%{_libdir}", "%{_includedir}"|' lib/addons/script.module.pil/Imaging-*/setup.py |
352 |
|
|
%endif |
353 |
|
|
|
354 |
|
|
%build |
355 |
anssi |
93516 |
%if %snap |
356 |
|
|
export GIT_REV=%snap |
357 |
ennael |
78010 |
%else |
358 |
anssi |
93516 |
export GIT_REV=$(basename %SOURCE0) |
359 |
ennael |
78010 |
%endif |
360 |
|
|
./bootstrap |
361 |
|
|
|
362 |
|
|
# due to xbmc modules that use symbols from xbmc binary |
363 |
|
|
# and are not using libtool |
364 |
|
|
%define _disable_ld_no_undefined 1 |
365 |
|
|
|
366 |
anssi |
93516 |
# Workaround configure using git to override GIT_REV (TODO: fix it properly) |
367 |
|
|
export ac_cv_prog_HAVE_GIT="no" |
368 |
|
|
|
369 |
ennael |
78010 |
%configure2_5x \ |
370 |
|
|
--disable-debug \ |
371 |
|
|
--disable-ccache \ |
372 |
|
|
--enable-external-libraries \ |
373 |
|
|
%if !%system_python |
374 |
|
|
--disable-external-python \ |
375 |
|
|
%endif |
376 |
|
|
--disable-non-free \ |
377 |
|
|
--disable-dvdcss \ |
378 |
|
|
--disable-faac \ |
379 |
|
|
--enable-goom \ |
380 |
|
|
--with-lirc-device=/var/run/lirc/lircd |
381 |
|
|
|
382 |
|
|
# non-free = unrar + xbms |
383 |
|
|
# dvdcss is handled via dlopen when disabled |
384 |
|
|
# faac is always handled via libavcodec |
385 |
|
|
|
386 |
|
|
%make |
387 |
|
|
%make -C tools/EventClients wiimote |
388 |
|
|
|
389 |
|
|
%if !%system_python |
390 |
|
|
for dir in lib/addons/script.module.*; do |
391 |
|
|
%make -C $dir |
392 |
|
|
done |
393 |
|
|
%endif |
394 |
|
|
|
395 |
|
|
%install |
396 |
|
|
rm -rf %{buildroot} |
397 |
|
|
%makeinstall_std |
398 |
|
|
%makeinstall_std -C tools/EventClients |
399 |
|
|
|
400 |
|
|
# unused |
401 |
|
|
rm %{buildroot}%{_datadir}/xsessions/XBMC.desktop |
402 |
|
|
# our version of the above: |
403 |
|
|
install -d -m755 %{buildroot}%{_sysconfdir}/X11/wmsession.d |
404 |
|
|
cat > %{buildroot}%{_sysconfdir}/X11/wmsession.d/15XBMC <<EOF |
405 |
|
|
NAME=XBMC |
406 |
|
|
ICON=xbmc.png |
407 |
|
|
DESC=XBMC Media Center |
408 |
|
|
EXEC=%{_bindir}/xbmc-standalone |
409 |
|
|
SCRIPT: |
410 |
|
|
exec %{_bindir}/xbmc-standalone |
411 |
|
|
EOF |
412 |
|
|
|
413 |
|
|
# unused files, TODO fix this upstream: |
414 |
|
|
find %{buildroot}%{_datadir}/xbmc/addons/skin.*/media -name '*.png' -delete |
415 |
|
|
|
416 |
|
|
( # for IFS and +x |
417 |
|
|
# Check for issues in ELF binaries |
418 |
|
|
undefined= |
419 |
|
|
fhserr= |
420 |
|
|
echo Silencing output of checking symbols and FHS conformance |
421 |
|
|
set +x |
422 |
|
|
IFS=$'\n' |
423 |
|
|
for file in $(find %{buildroot} -type f); do |
424 |
|
|
type="$(file "$file")" |
425 |
|
|
echo "$type" | grep -q "ELF" || continue |
426 |
|
|
|
427 |
|
|
# Check that a binary file is not in datadir: |
428 |
|
|
echo "$file" | grep -q "%{_datadir}" && fhserr="${fhserr}$file\n" |
429 |
|
|
|
430 |
|
|
# check for undefined symbols in XBMC modules |
431 |
|
|
echo "$type" | grep -q "shared object" || continue |
432 |
|
|
for symbol in $(LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} ldd -r "$file" 2>&1 | grep undefined | awk '{ print $3 }'); do |
433 |
|
|
# undefined symbols may also be provided by XBMC: |
434 |
|
|
nm -f posix -D --no-demangle --defined-only %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep -q "^$symbol " && continue |
435 |
|
|
# The symbol was not provided by XBMC. |
436 |
|
|
# Check if it is available through its dependencies: |
437 |
|
|
for filename in $(objdump -p %{buildroot}%{_libdir}/xbmc/xbmc.bin | grep NEEDED | awk '{ print $2 }'); do |
438 |
|
|
depfile="/%{_lib}/$filename" |
439 |
|
|
[ -e "$depfile" ] || depfile="%{_libdir}/$filename" |
440 |
|
|
nm -f posix -D --no-demangle --defined-only $depfile | grep -q "^$symbol " && continue 2 |
441 |
|
|
done |
442 |
|
|
# Euphoria references rsxs PNG class, but it is never used at runtime, |
443 |
|
|
# so it results in no errors due to RTLD_LAZY being used by xbmc module loader. |
444 |
|
|
# _imaging*.so and _sqlite.so are python modules that exist when using bundled python |
445 |
|
|
case $file:$symbol in */Euphoria.xbs:_ZN3PNG*|*/_imaging*.so:*|*/_sqlite.so:*) continue; esac |
446 |
|
|
# the symbol was not found |
447 |
|
|
undefined="${undefined}$file: $symbol\n" |
448 |
|
|
done |
449 |
|
|
done |
450 |
|
|
ok=1 |
451 |
|
|
[ -n "$undefined" ] && echo -e "$undefined" && echo "Undefined symbols!" && ok= |
452 |
|
|
[ -n "$fhserr" ] && echo -e "$fhserr" && echo "Binaries in datadir!" && ok= |
453 |
|
|
[ -n "$ok" ] |
454 |
|
|
) |
455 |
|
|
|
456 |
|
|
%clean |
457 |
|
|
rm -rf %{buildroot} |
458 |
|
|
|
459 |
|
|
%files |
460 |
|
|
%defattr(-,root,root) |
461 |
|
|
%doc %{_docdir}/xbmc |
462 |
|
|
%{_sysconfdir}/X11/wmsession.d/15XBMC |
463 |
|
|
%{_bindir}/xbmc |
464 |
|
|
%{_bindir}/xbmc-standalone |
465 |
|
|
%dir %{_libdir}/xbmc |
466 |
|
|
%dir %{_libdir}/xbmc/addons |
467 |
|
|
%dir %{_libdir}/xbmc/system |
468 |
|
|
%dir %{_libdir}/xbmc/system/players |
469 |
|
|
%dir %{_libdir}/xbmc/system/players/dvdplayer |
470 |
|
|
%dir %{_libdir}/xbmc/system/players/paplayer |
471 |
|
|
%dir %{_libdir}/xbmc/system/python |
472 |
|
|
%{_libdir}/xbmc/xbmc.bin |
473 |
|
|
%{_libdir}/xbmc/xbmc-xrandr |
474 |
|
|
%dir %{_libdir}/xbmc/addons/* |
475 |
|
|
%{_libdir}/xbmc/addons/*/*.so |
476 |
|
|
%{_libdir}/xbmc/addons/*/*.pvr |
477 |
|
|
%{_libdir}/xbmc/addons/*/*.vis |
478 |
|
|
%{_libdir}/xbmc/addons/*/*.xbs |
479 |
|
|
%{_libdir}/xbmc/addons/script.module.*/*.xml |
480 |
|
|
%{_libdir}/xbmc/system/ImageLib-*-linux.so |
481 |
|
|
%{_libdir}/xbmc/system/hdhomerun-*-linux.so |
482 |
|
|
%{_libdir}/xbmc/system/libcpluff-*-linux.so |
483 |
|
|
%{_libdir}/xbmc/system/libexif-*-linux.so |
484 |
|
|
%{_libdir}/xbmc/system/libid3tag-*-linux.so |
485 |
|
|
%{_libdir}/xbmc/system/players/dvdplayer/libdvdnav-*-linux.so |
486 |
|
|
%{_libdir}/xbmc/system/players/paplayer/adpcm-*-linux.so |
487 |
|
|
%{_libdir}/xbmc/system/players/paplayer/libsidplay2-*-linux.so |
488 |
|
|
%{_libdir}/xbmc/system/players/paplayer/nosefart-*-linux.so |
489 |
|
|
%{_libdir}/xbmc/system/players/paplayer/stsoundlibrary-*-linux.so |
490 |
|
|
%{_libdir}/xbmc/system/players/paplayer/timidity-*-linux.so |
491 |
|
|
%{_libdir}/xbmc/system/players/paplayer/vgmstream-*-linux.so |
492 |
|
|
%ifarch %ix86 |
493 |
|
|
%{_libdir}/xbmc/system/players/paplayer/SNESAPU-*-linux.so |
494 |
|
|
%endif |
495 |
|
|
%{_libdir}/xbmc/system/python/python*-*-linux.so |
496 |
|
|
%if !%system_python |
497 |
|
|
%{_libdir}/xbmc/addons/script.module.pil/* |
498 |
|
|
%{_libdir}/xbmc/addons/script.module.pysqlite/* |
499 |
|
|
%{_libdir}/xbmc/system/python/python*.zip |
500 |
|
|
%endif |
501 |
|
|
%dir %{_datadir}/xbmc |
502 |
|
|
%{_datadir}/xbmc/addons |
503 |
|
|
%{_datadir}/xbmc/FEH.py |
504 |
|
|
%{_datadir}/xbmc/language |
505 |
|
|
%{_datadir}/xbmc/media |
506 |
|
|
%{_datadir}/xbmc/sounds |
507 |
|
|
%{_datadir}/xbmc/system |
508 |
|
|
%{_datadir}/xbmc/userdata |
509 |
|
|
%{_datadir}/applications/xbmc.desktop |
510 |
|
|
%{_iconsdir}/hicolor/*/apps/xbmc.png |
511 |
|
|
|
512 |
|
|
%files eventclients-common |
513 |
|
|
%defattr(-,root,root) |
514 |
|
|
%python_sitelib/xbmc |
515 |
|
|
%dir %{_datadir}/pixmaps/xbmc |
516 |
|
|
%{_datadir}/pixmaps/xbmc/*.png |
517 |
|
|
|
518 |
|
|
%files eventclients-devel |
519 |
|
|
%defattr(-,root,root) |
520 |
|
|
%dir %{_includedir}/xbmc |
521 |
|
|
%{_includedir}/xbmc/xbmcclient.h |
522 |
|
|
|
523 |
|
|
%files eventclient-j2me |
524 |
|
|
%defattr(-,root,root) |
525 |
|
|
%{_bindir}/xbmc-j2meremote |
526 |
|
|
|
527 |
|
|
%files eventclient-ps3 |
528 |
|
|
%defattr(-,root,root) |
529 |
|
|
%{_bindir}/xbmc-ps3d |
530 |
|
|
%{_bindir}/xbmc-ps3remote |
531 |
|
|
|
532 |
|
|
%files eventclient-xbmc-send |
533 |
|
|
%defattr(-,root,root) |
534 |
|
|
%{_bindir}/xbmc-send |
535 |
|
|
|
536 |
|
|
%files eventclient-wiiremote |
537 |
|
|
%defattr(-,root,root) |
538 |
|
|
%{_bindir}/xbmc-wiiremote |
539 |
|
|
|
540 |
|
|
|