# TODO:
# - fix build flags - some files are compiled with -O3 and without rpm*flags
# - fix linking argument order
-# - fix nvidia vs. libXrandr >= 1.2 conflict (nvidia drivers still supports
-# only libXrandr 1.1 - with no gamma support)
# - add and/or fix users/groups permissions
-# - didvide to subpackages?
-# - check how it works with external python libraries
+# - split to subpackages?
#
# Conditional build:
-%bcond_with external_python
+%bcond_without goom # build without goom visualisation
+%bcond_with hal # build with HAL
-Summary: XBMC
+Summary: XBMC is a free and open source media-player and entertainment hub
Name: xbmc
-Version: 10.0
-Release: 0.1
-License: GPL v3
+Version: 12.2
+Release: 2
+License: GPL v2+ and GPL v3+
Group: Applications/Multimedia
-Source0: http://downloads.sourceforge.net/project/xbmc/XBMC%20Source%20Code/Camelot%20-%209.11/%{name}-%{version}.tar.gz
-# Source0-md5: 728fb514e5f43f27bb880305061b4e72
-URL: http://xbmc.org
-Patch0: %{name}-nobash.patch
-Patch1: %{name}-python27.patch
-Patch2: %{name}-libpng14.patch
+Source0: http://mirrors.xbmc.org/releases/source/%{name}-%{version}.tar.gz
+# Source0-md5: 489f3877decae4e265ece54f9eaef0ba
+URL: http://xbmc.org/
+BuildRequires: Mesa-libGLU-devel
+BuildRequires: OpenGL-devel
+BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
-BuildRequires: a52dec-libs-devel
BuildRequires: alsa-lib-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: avahi-devel
+BuildRequires: bluez-libs-devel >= 4.99
BuildRequires: boost-devel
BuildRequires: bzip2-devel
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: dbus-devel
-BuildRequires: enca-devel
-BuildRequires: faac-devel
-BuildRequires: faad2-devel
BuildRequires: ffmpeg-devel
BuildRequires: flac-devel
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: fribidi-devel
BuildRequires: gawk
-BuildRequires: gettext-autopoint
+BuildRequires: gettext-autopoint
BuildRequires: gettext-devel
BuildRequires: glew-devel
BuildRequires: gperf
-BuildRequires: gtk+-devel
+%if %{with hal}
BuildRequires: hal-devel
+%endif
BuildRequires: jasper-devel
-BuildRequires: libao-devel
+BuildRequires: libass-devel
+BuildRequires: libbluray-devel
BuildRequires: libcdio-devel
-BuildRequires: libdts-devel
+BuildRequires: libcec-devel
+BuildRequires: libcrystalhd-devel
+BuildRequires: libgcrypt-devel
BuildRequires: libjpeg-devel
BuildRequires: libmad-devel
-BuildRequires: libmicrohttpd-devel
-BuildRequires: libmodplug-devel
-BuildRequires: libmms-devel
+BuildRequires: libmicrohttpd-devel
+BuildRequires: libmodplug-devel
BuildRequires: libmpeg2-devel
BuildRequires: libogg-devel
+BuildRequires: libplist-devel
BuildRequires: libpng-devel
+BuildRequires: librtmp-devel
BuildRequires: libsamplerate-devel
BuildRequires: libsmbclient-devel
+BuildRequires: libssh-devel
BuildRequires: libtiff-devel
BuildRequires: libtool
+BuildRequires: libva-devel
+BuildRequires: libva-glx-devel
BuildRequires: libvdpau-devel
BuildRequires: libvorbis-devel
BuildRequires: lzo-devel
BuildRequires: nasm
%endif
BuildRequires: openssl-devel
-BuildRequires: pcre-cxx-devel
+BuildRequires: pcre-cxx-devel
+BuildRequires: pcre-devel
BuildRequires: pkgconfig
BuildRequires: pulseaudio-devel
-BuildRequires: python-devel
+BuildRequires: python-devel >= 2.4
BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.566
# used internally
BuildRequires: sed >= 4.0
BuildRequires: sqlite3-devel
+BuildRequires: tinyxml-devel
+BuildRequires: udev-devel
BuildRequires: unzip
-BuildRequires: wavpack-devel
-BuildRequires: xmms-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXext-devel
BuildRequires: xorg-lib-libXinerama-devel
+BuildRequires: xorg-lib-libXmu-devel
BuildRequires: xorg-lib-libXrandr-devel
+BuildRequires: xorg-lib-libXt-devel
BuildRequires: xorg-lib-libXtst-devel
+BuildRequires: yajl-devel
BuildRequires: zip
BuildRequires: zlib-devel
+#https://github.com/sahlberg/libnfs
+#BuildRequires: libnfs-devel
+#http://sites.google.com/site/alexthepuffin/home
+#BuildRequires: afpfs-ng-devel
+#http://mirrors.xbmc.org/build-deps/darwin-libs/libshairport-1.2.0.20310_lib.tar.gz
+#https://github.com/albertz/shairport
+#BuildRequires: libshairport
+Requires: /usr/bin/glxinfo
+Requires: SDL >= 1.2.14-5
Requires: lsb-release
Requires: xorg-app-xdpyinfo
-Requires: /usr/bin/glxinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
+XBMC media center is a free cross-platform media-player jukebox and
+entertainment hub. XBMC can play a spectrum of of multimedia formats,
+and featuring playlist, audio visualizations, slideshow, and weather
+forecast functions, together third-party plugins.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
-#%patch2 -p1
%build
./bootstrap
%configure \
--disable-debug \
--enable-external-libraries \
- --%{?with_external_python:en}%{!?with_external_python:dis}able-external-python
-%{__make}
+ --enable-pulse \
+ --enable-udev \
+ --disable-libusb \
+ --disable-nfs \
+ --disable-afpclient \
+ --disable-airtunes \
+ %{__enable_disable goom} \
+ %{__enable_disable hal}
+
+LIBS="-lpthread"
+%{__make} V=1
%install
rm -rf $RPM_BUILD_ROOT
-
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-#doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
-
-#%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}