changeset 335:3ea3e6f7dbcb

Removed some comment lines that broke RPM building on some platforms...
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 22 Sep 2005 02:20:00 +0000
parents 19c89f9ca2cc
children 171b428ee806
files xmms-sid.spec.in
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/xmms-sid.spec.in	Thu Sep 22 02:19:02 2005 +0000
+++ b/xmms-sid.spec.in	Thu Sep 22 02:20:00 2005 +0000
@@ -1,8 +1,9 @@
-###########################################################
 %define	name	@PACKAGE@
 %define	version	@VERSION@
 %define	release	1
 %define plugindir %(xmms-config --input-plugin-dir)
+%define withSID1 %(if test -z "`rpm -q --whatprovides libsidplay.so.1 2>/dev/null | grep -v '^no package provides'`"; then echo 0; else echo 1; fi)
+%define withSID2 %(if test -z "`rpm -q --whatprovides libsidplay2.so.1 2>/dev/null | grep -v '^no package provides'`" ; then echo 0; else echo 1; fi)
 
 Summary:	A SID-tune (C64 music) input plugin for XMMS
 Name:		%{name}
@@ -16,8 +17,17 @@
 BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 BuildRequires:	xmms-devel >= @XMMS_VERSION@
 Requires:	gtk+ >= 1.2.5, glib >= 1.2.5, xmms >= @XMMS_VERSION@
+%if %{withSID1} == 1
+Requires:	libsidplay
+%else
+%define optSID1 --without-sidplay1
+%endif
+%if %{withSID2} == 1
+Requires:	libsidplay2 >= 2.1.1
+%else
+%define optSID2 --without-sidplay2
+%endif
 
-###########################################################
 %description
 Input plugin for XMMS to play SID-tunes (Music from Commodore
 64 games/demos/etc.). Supports either (or both) libSIDPlay
@@ -33,32 +43,25 @@
 ausführlichere Fileinformationen), Unterstützung der STIL Datenbank,
 Song-Längen Datenbank und vieles mehr.
 
-###########################################################
 %prep
 %setup -q
 
-###########################################################
 %build
 export CFLAGS="$RPM_OPT_FLAGS" CPPFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS";
-%configure --libdir=%{plugindir}
+%configure --libdir=%{plugindir} %{optSID1} %{optSID2}
 make
 
-###########################################################
 %install
 [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
 %makeinstall libdir=$RPM_BUILD_ROOT/%{plugindir}
 
-###########################################################
 %post	-p /sbin/ldconfig
 
-###########################################################
 %postun -p /sbin/ldconfig
 
-###########################################################
 %clean
 [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
 
-###########################################################
 %files
 %defattr(-, root, root)
 %doc AUTHORS COPYING FAQ NEWS README* THANKS TODO BUGS xmms-1.2.10-songpos.patch