#
# TODO:
-# fix endless loop on ./configure
-# add missing BRs
-# make it build and add %files
-# configure requires bash
+# - fix build flags - some files are compiled with -O3 and without rpm*flags
+# - fix linking order
+# - fix install - add DESTDIR support
+# - don't put binary in %{_datadir} and fix start scripts
#
%define _subver b1
Summary: XBMC
Source0: http://downloads.sourceforge.net/project/xbmc/XBMC%20Source%20Code/pre-release/%{name}-%{version}-%{_subver}.tar.gz
# Source0-md5: a5fa3c4e3ad5a17b91e444ff9a72986d
URL: http://xbmc.org
+Patch0: %{name}-nobash.patch
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: a52dec-libs-devel
BuildRequires: pkgconfig
BuildRequires: pulseaudio-devel
BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
# used internally
BuildRequires: sed >= 4.0
BuildRequires: sqlite3-devel
BuildRequires: xorg-lib-libXtst-devel
BuildRequires: zip
BuildRequires: zlib-devel
+Requires: lsb-release
+Requires: xorg-app-xdpyinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q -n %{name}-%{version}-%{_subver}
+%patch0 -p1
%build
./bootstrap
-/bin/bash %configure \
+%configure \
--enable-external-libraries
%{__make}
rm -rf $RPM_BUILD_ROOT
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ prefix=$RPM_BUILD_ROOT%{_prefix}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
+#doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
+#%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}
+%attr(755,root,root) %{_datadir}/%{name}/xbmc.bin
+%attr(755,root,root) %{_datadir}/%{name}/xbmc-xrandr
+%{_datadir}/xsessions/XBMC.desktop