diff --git a/libgpod.spec b/libgpod.spec index 4a65c83..0c552ad 100644 --- a/libgpod.spec +++ b/libgpod.spec @@ -1,9 +1,15 @@ %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%ifarch %ix86 x86_64 ppc ppc64 ia64 %{arm} sparcv9 alpha s390x +%global with_mono 1 +%else +%global with_mono 0 +%endif + Summary: Library to access the contents of an iPod Name: libgpod Version: 0.8.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtkpod.org/libgpod.html @@ -13,7 +19,6 @@ Patch0: libgpod-0.8.0-x86-32.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: docbook-style-xsl BuildRequires: glib2-devel -BuildRequires: gtk-sharp2-devel BuildRequires: gtk2-devel BuildRequires: gettext BuildRequires: intltool @@ -22,7 +27,10 @@ BuildRequires: libplist-devel >= 1.0 BuildRequires: libusb1-devel BuildRequires: libxml2-devel BuildRequires: libxslt +%if %{with_mono} BuildRequires: mono-devel +BuildRequires: gtk-sharp2-devel +%endif BuildRequires: perl(XML::Parser) BuildRequires: pygobject2-devel BuildRequires: python-devel @@ -81,6 +89,7 @@ A python module to access iPod content. This module provides bindings to the libgpod library. +%if %{with_mono} %package sharp Summary: C#/.NET library to access iPod content Group: Development/Languages @@ -104,6 +113,7 @@ library. This package contains the files required to develop programs that will use libgpod-sharp. +%endif %prep @@ -128,8 +138,13 @@ make DESTDIR=%{buildroot} install # remove Makefiles from the python examples dir rm -rf bindings/python/examples/Makefile* +%if %{with_mono} # remove execute perms from some libgpod-sharp files chmod -x %{buildroot}/%{_libdir}/%{name}/*.dll.config +%else +# remove unwanted file +rm -f %{buildroot}/%{_libdir}/pkgconfig/%{name}-sharp.pc +%endif %clean @@ -172,6 +187,7 @@ rm -rf %{buildroot} %exclude %{python_sitearch}/gpod/*.la +%if %{with_mono} %files sharp %defattr(-, root, root, 0755) %{_libdir}/%{name}/%{name}-sharp* @@ -180,8 +196,12 @@ rm -rf %{buildroot} %files sharp-devel %defattr(-, root, root, 0755) %{_libdir}/pkgconfig/%{name}-sharp.pc +%endif %changelog +* Tue Jan 18 2011 Dan HorĂ¡k - 0.8.0-6 +- conditionalize mono support + * Sat Jan 08 2011 Christian Krause - 0.8.0-5 - Change patch to fix 32 bit issues in the mono bindings (Itdb_Track data structure contained wrong values on x86 systems)