Author: ktdreyer
Update of /cvs/free/rpms/xbmc/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv3850
Modified Files:
xbmc.spec
Log Message:
* Sun Jul 01 2012 Ken Dreyer <ktdreyer@ktdreyer..com> - 11.0-7
- Set up with_* conditionals for optional dependencies
- Disable hdhomerun and crystalhd for EPEL (#2339)
Index: xbmc.spec
===================================================================
RCS file: /cvs/free/rpms/xbmc/devel/xbmc.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- xbmc.spec 26 Jun 2012 09:10:16 -0000 1.49
+++ xbmc.spec 1 Jul 2012 11:59:24 -0000 1.50
@@ -5,7 +5,7 @@
Name: xbmc
Version: 11.0
-Release: 6%{?dist}
+Release: 7%{?dist}
URL:
http://www.xbmc.org/
Source0: %{name}-%{DIRVERSION}-patched.tar.xz
@@ -52,6 +52,13 @@
# minor tweaks may be needed)
Patch5: xbmc-11.0-tsp-Eden-pvr.patch
+# Optional deps (not in EPEL)
+# (libbluray in EPEL 6 is too old.)
+%{?fedora:%global _with_hdhomerun 1}
+%{?fedora:%global _with_crystalhd 1}
+%{?fedora:%global _with_libbluray 1}
+%{?fedora:%global _with_cwiid 1}
+
ExcludeArch: ppc64
Buildroot: %{_tmppath}/%{name}-%{version}
Summary: Media center
@@ -120,8 +127,12 @@
BuildRequires: pulseaudio-libs-devel
BuildRequires: libdca-devel
BuildRequires: libass-devel >= 0.9.7
+%if 0%{?_with_hdhomerun}
BuildRequires: hdhomerun-devel
+%endif
+%if 0%{?_with_crystalhd}
BuildRequires: libcrystalhd-devel
+%endif
BuildRequires: libmodplug-devel
BuildRequires: libmicrohttpd-devel
BuildRequires: expat-devel
@@ -135,17 +146,13 @@
BuildRequires: gettext-autopoint
%endif
BuildRequires: librtmp-devel
-%if 0%{?el6}
-# libbluray in EPEL 6 is too old.
-%else
+%if 0%{?_with_libbluray}
BuildRequires: libbluray-devel
-%endif
#BuildRequires: libbluray-devel >= 0.2.1
+%endif
BuildRequires: yajl-devel
BuildRequires: bluez-libs-devel
-%if 0%{?el6}
-# EPEL 6 does not have cwiid
-%else
+%if 0%{?_with_cwiid}
BuildRequires: cwiid-devel
%endif
@@ -158,11 +165,14 @@
# need explicit requires for these packages
# as they are dynamically loaded via XBMC's arcane
# pseudo-DLL loading scheme (sigh)
-Requires: libcrystalhd
Requires: librtmp
-%if 0%{?el6}
-# libbluray in EPEL 6 is too old.
-%else
+%if 0%{?_with_hdhomerun}
+BuildRequires: hdhomerun
+%endif
+%if 0%{?_with_crystalhd}
+Requires: libcrystalhd
+%endif
+%if 0%{?_with_libbluray}
Requires: libbluray
%endif
@@ -207,6 +217,17 @@
%patch4 -p0
%patch5 -p1
+%if 0%{?_with_hdhomerun}
+%else
+ # Remove hdhomerun from the build.
+ pushd xbmc/filesystem/
+ rm HDHomeRun.cpp HDHomeRun.h
+ sed -i Makefile.in -e '/HDHomeRun\.cpp/d'
+ sed -i FactoryDirectory.cpp -e '/HomeRun/d'
+ sed -i FileFactory.cpp -e '/HomeRun/d'
+ popd
+%endif
+
%build
chmod +x bootstrap
@@ -226,7 +247,7 @@
CFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/ffmpeg
-D__STDC_CONSTANT_MACROS" \
CXXFLAGS="$RPM_OPT_FLAGS -fPIC -I/usr/include/afpfs-ng/ -I/usr/include/ffmpeg
-D__STDC_CONSTANT_MACROS" \
LDFLAGS="-fPIC" \
-LIBS="-L%{_libdir}/mysql -lhdhomerun $LIBS" \
+LIBS="-L%{_libdir}/mysql %{?_with_hdhomerun:-lhdhomerun} $LIBS" \
ASFLAGS=-fPIC
make %{?_smp_mflags} VERBOSE=1
@@ -297,6 +318,10 @@
#%%{_includedir}/xbmc/xbmcclient.h
%changelog
+* Sun Jul 01 2012 Ken Dreyer <ktdreyer@ktdreyer..com> - 11.0-7
+- Set up with_* conditionals for optional dependencies
+- Disable hdhomerun and crystalhd for EPEL (#2339)
+
* Tue Jun 26 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 11.0-6
- Rebuilt for FFmpeg