[eclipse-cdt] Use %{eclipse_arch} where possible and make it work on all secondary arches

Dan Horák sharkcz at fedoraproject.org
Mon May 7 21:03:35 UTC 2012


commit 3f4444536c847e338c1b06b0642134b3e75e48b6
Author: Dan Horák <dan at danny.cz>
Date:   Mon May 7 23:03:30 2012 +0200

    Use %{eclipse_arch} where possible and make it work on all secondary arches

 eclipse-cdt.spec |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec
index a416133..231b4a7 100644
--- a/eclipse-cdt.spec
+++ b/eclipse-cdt.spec
@@ -17,13 +17,17 @@ Epoch: 1
 %ifarch %{ix86}
 %define eclipse_arch    x86
 %else
+%ifarch %{arm}
+%define eclipse_arch    arm
+%else
 %define eclipse_arch   %{_arch}
 %endif
+%endif
 
 Summary:        Eclipse C/C++ Development Tools (CDT) plugin
 Name:           eclipse-cdt
 Version:        %{majmin}.%{micro}
-Release:        0.8.junom6%{?dist}
+Release:        0.9.junom6%{?dist}
 License:        EPL and CPL
 Group:          Development/Tools
 URL:            http://www.eclipse.org/cdt
@@ -107,28 +111,28 @@ Source for Eclipse CDT for use within Eclipse.
 pushd %{cdt_snapshot}
 %patch0 -p1
 sed -i -e 's/<arch>x86<\/arch>/<arch>%{eclipse_arch}<\/arch>/g' pom.xml
-# Add arm support if we are building on arm
-%ifarch %{arm}
+# Add secondary arch support if we are building there
+%ifarch %{arm} s390 s390x
 pushd core
-cp -r org.eclipse.cdt.core.linux.x86 org.eclipse.cdt.core.linux.arm
+cp -r org.eclipse.cdt.core.linux.x86 org.eclipse.cdt.core.linux.%{eclipse_arch}
 pushd org.eclipse.cdt.core.linux
 sed -i -e 's/<arch>x86<\/arch>/<arch>%{eclipse_arch}<\/arch>/g' pom.xml
 popd
-pushd org.eclipse.cdt.core.linux.arm
-sed -i -e 's/x86/arm/g' pom.xml
+pushd org.eclipse.cdt.core.linux.%{eclipse_arch}
+sed -i -e 's/x86/%{eclipse_arch}/g' pom.xml
 pushd META-INF
-sed -i -e 's/x86/arm/g' MANIFEST.MF
+sed -i -e 's/x86/%{eclipse_arch}/g' MANIFEST.MF
 popd
 pushd os/linux
-mv x86 arm
+mv x86 %{eclipse_arch}
 popd
 popd
 popd
 pushd releng/org.eclipse.cdt.platform-feature
-sed -i -e 's/"org.eclipse.cdt.core.linux.x86"/"org.eclipse.cdt.core.linux.arm"/g' feature.xml
-sed -i -e 's/arch="x86"/arch="arm"/' feature.xml
+sed -i -e 's/"org.eclipse.cdt.core.linux.x86"/"org.eclipse.cdt.core.linux.%{eclipse_arch}"/g' feature.xml
+sed -i -e 's/arch="x86"/arch="%{eclipse_arch}"/' feature.xml
 popd
-sed -i -e"/<module>core\/org.eclipse.cdt.core.linux<\/module>/ a\ \t\t<module>core\/org.eclipse.cdt.core.linux.arm<\/module>" pom.xml
+sed -i -e"/<module>core\/org.eclipse.cdt.core.linux<\/module>/ a\ \t\t<module>core\/org.eclipse.cdt.core.linux.%{eclipse_arch}<\/module>" pom.xml
 %endif
 popd
 
@@ -278,6 +282,9 @@ rm -rf $installDir/eclipse/binary
 %doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
 
 %changelog
+* Mon May 07 2012 Dan Horák <dan[at]danny.cz> 1:8.1.0-0.9.junom6
+- Use %%{eclipse_arch} where possible and make it work on all secondary arches
+
 * Mon May 07 2012 Jeff Johnston <jjohnstn at redhat.com> 1:8.1.0-0.8.junom6
 - Fix arm build so that the arm fragment for CDT core gets built.
 


More information about the scm-commits mailing list