[ice] conditionalize CSharp/Mono support
Dan Horák
sharkcz at fedoraproject.org
Tue Mar 22 19:11:39 UTC 2011
commit 73a35ea493e7a2aecc7c0c6c72d9c3a1fbb3c556
Author: Dan Horák <dan at danny.cz>
Date: Tue Mar 22 20:11:29 2011 +0100
conditionalize CSharp/Mono support
ice.spec | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
---
diff --git a/ice.spec b/ice.spec
index 7a7745b..0264c1f 100644
--- a/ice.spec
+++ b/ice.spec
@@ -7,7 +7,7 @@
Name: ice
Version: 3.4.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The Ice base runtime and services
Group: System Environment/Libraries
@@ -37,12 +37,18 @@ Patch2: Ice-3.4.0-s390.patch
# TODO: should we keep it or not ?
# significantly reduce compile time but shipping demos could be useful
Patch3: Ice-3.3-dont-build-demo-test.patch
+# disable the CSharp interface
+Patch4: ice-3.4.1-no-mono.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Ice doesn't officially support ppc64 at all
-# sparc64 doesnt have mono
-ExcludeArch: ppc64 sparc64
+ExcludeArch: ppc64
+
+# mono exists only on these
+%ifarch ix86 x86_64 ppc ppc64 ia64 %{arm} sparcv9 alpha s390x
+%global with_mono 1
+%endif
# Some file suffixes we need to grab the right stuff for the file lists
%define soversion 34
@@ -52,7 +58,9 @@ BuildRequires: ant, ant-nodeps, jpackage-utils, db4-java
BuildRequires: php, php-devel
BuildRequires: ruby, ruby(abi) = 1.8, ruby-devel
BuildRequires: python-devel
+%if 0%{?with_mono}
BuildRequires: mono-core, mono-devel
+%endif
BuildRequires: libmcpp-devel >= 2.7.2
BuildRequires: dos2unix
BuildRequires: java-1.6.0-openjdk-devel
@@ -119,6 +127,7 @@ Requires: jpackage-utils
%description -n icegrid-gui
Graphical administration tool for IceGrid
+%if 0%{?with_mono}
%package csharp
Summary: The Ice runtime for C#
Group: System Environment/Libraries
@@ -134,6 +143,7 @@ Group: Development/Tools
Requires: ice-csharp = %{version}-%{release}, pkgconfig
%description csharp-devel
Tools for developing Ice applications in C#.
+%endif
%package ruby
Summary: The Ice runtime for Ruby applications
@@ -167,7 +177,7 @@ Tools for developing Ice applications in Python.
Summary: The Ice runtime for PHP applications
Group: System Environment/Libraries
Requires: ice = %{version}-%{release}
-%if %{?php_zend_api}0
+%if %{?php_zend_api:1}%{!?php_zend_api:0}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
%else
@@ -191,6 +201,9 @@ Tools for developing Ice applications in PHP.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%if ! 0%{?with_mono}
+%patch4 -p1
+%endif
%setup -q -n ice-3.4.1-man-pages -T -b 1
rm -f slice2docbook.1
@@ -305,6 +318,7 @@ do
mv $f.tmp $f
done
+%if 0%{?with_mono}
# .NET spec files (for csharp-devel) -- convert the paths
for f in IceGrid Glacier2 IceBox Ice IceStorm IcePatch2;
do
@@ -312,6 +326,12 @@ do
sed -i -e "s#mono_root}/usr#mono_root}#" $RPM_BUILD_ROOT%{_libdir}/pkgconfig/$f.pc
mv $RPM_BUILD_ROOT%{_bindir}/$f.xml $RPM_BUILD_ROOT%{_libdir}/mono/gac/$f/%{version}.*/
done
+%else
+# clean some files when building without mono
+rm $RPM_BUILD_ROOT%{_bindir}/slice2cs
+rm $RPM_BUILD_ROOT%{_mandir}/man1/iceboxnet.exe.1*
+rm $RPM_BUILD_ROOT%{_mandir}/man1/slice2cs.1*
+%endif
# Put the PHP stuff into the right place
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/php.d
@@ -478,6 +498,7 @@ fi
%{_javadir}/ant-ice-%{version}.jar
%{_javadir}/ant-ice.jar
+%if 0%{?with_mono}
%files csharp
%defattr(-,root,root,-)
%{_libdir}/mono/Glacier2/
@@ -506,6 +527,7 @@ fi
%{_libdir}/pkgconfig/IceGrid.pc
%{_libdir}/pkgconfig/IcePatch2.pc
%{_libdir}/pkgconfig/IceStorm.pc
+%endif
%files python
%defattr(644,root,root,755)
@@ -537,6 +559,9 @@ fi
%{_bindir}/slice2php
%changelog
+* Tue Mar 22 2011 Dan Horák <dan[at]danny.cz> - 3.4.1-2
+- conditionalize CSharp/Mono support
+
* Sat Feb 12 2011 Haïkel Guémar <hguemar at fedoraproject.org> - 3.4.1-1
- upstream 3.4.1
- fix gcc46 build issue
More information about the scm-commits
mailing list