[eclipse-cdt/f19] Add eclipse-cdt-tests sub-package
Jeff Johnston
jjohnstn at fedoraproject.org
Mon Oct 7 22:01:48 UTC 2013
commit d2cc5e8fe968c3d6f16f633f8d1ed7b095e36d31
Author: Jeff Johnston <jjohnstn at redhat.com>
Date: Mon Oct 7 17:48:26 2013 -0400
Add eclipse-cdt-tests sub-package
- Add patch to fix autotools tests build properties
eclipse-cdt-autotools-test.patch | 11 +++++++++
eclipse-cdt.spec | 44 ++++++++++++++++++++++++++++++++++++-
2 files changed, 53 insertions(+), 2 deletions(-)
---
diff --git a/eclipse-cdt-autotools-test.patch b/eclipse-cdt-autotools-test.patch
new file mode 100644
index 0000000..6706e30
--- /dev/null
+++ b/eclipse-cdt-autotools-test.patch
@@ -0,0 +1,11 @@
+diff -up ./build/org.eclipse.cdt.autotools.tests/build.properties.fix ./build/org.eclipse.cdt.autotools.tests/build.properties
+--- ./build/org.eclipse.cdt.autotools.tests/build.properties.fix 2013-10-07 17:04:35.000000000 -0400
++++ ./build/org.eclipse.cdt.autotools.tests/build.properties 2013-10-07 17:04:53.000000000 -0400
+@@ -1,6 +1,7 @@
+ source.. = src/
+ output.. = bin/
+ bin.includes = META-INF/,\
++ .,\
+ plugin.properties,\
+ zip/,\
+ about.html
diff --git a/eclipse-cdt.spec b/eclipse-cdt.spec
index 1aa06db..7c90bed 100644
--- a/eclipse-cdt.spec
+++ b/eclipse-cdt.spec
@@ -24,7 +24,7 @@ Epoch: 1
Summary: Eclipse C/C++ Development Tools (CDT) plugin
Name: eclipse-cdt
Version: %{majmin}.%{micro}
-Release: 1%{?dist}
+Release: 2%{?dist}
License: EPL and CPL
Group: Development/Tools
URL: http://www.eclipse.org/cdt
@@ -56,6 +56,9 @@ Patch4: %{name}-doc-fix.patch
# Following removes unneeded features from Linux Tools build
Patch5: %{name}-linuxtools-features.patch
+# Following adds current directory to autotools tests build.properties
+Patch6: %{name}-autotools-test.patch
+
# Following fixes up Linux Tools top-level pom
Patch7: %{name}-linuxtools-disable-jacoco.patch
@@ -104,6 +107,16 @@ Requires: clang
%description llvm
Optional llvm parsers for the CDT.
+%package tests
+Summary: Eclipse C/C++ Development Tools (CDT) Tests
+Group: Text Editors/Integrated Development Environments (IDE)
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: %{name}-llvm = %{epoch}:%{version}-%{release}
+Requires: %{name}-parsers = %{epoch}:%{version}-%{release}
+
+%description tests
+Test plugins for the CDT.
+
%package sdk
Summary: Eclipse C/C++ Development Tools (CDT) SDK plugin
Group: Text Editors/Integrated Development Environments (IDE)
@@ -118,6 +131,7 @@ Source for Eclipse CDT for use within Eclipse.
pushd %{cdt_snapshot}
%patch0 -p1
%patch4 -p1
+%patch6 -p1
%patch12 -p1
sed -i -e 's/<arch>x86<\/arch>/<arch>%{eclipse_arch}<\/arch>/g' pom.xml
# Add secondary arch support if we are building there
@@ -240,7 +254,9 @@ popd
mkdir -p home
homedir=$(cd home > /dev/null && pwd)
+
installDir=${RPM_BUILD_ROOT}/%{eclipse_base}/dropins/cdt
+testInstallDir=${RPM_BUILD_ROOT}/%{_javadir}/eclipse-cdt-tests/plugins
parsersInstallDir=${installDir}-parsers
llvmInstallDir=${installDir}-llvm
sdkInstallDir=${installDir}-sdk
@@ -248,12 +264,27 @@ install -d -m755 $installDir
install -d -m755 $parsersInstallDir
install -d -m755 $llvmInstallDir
install -d -m755 $sdkInstallDir
+install -d -m755 $testInstallDir
# Unzip contents of the cdt repo, removing all but plugins and features
unzip -q -o %{cdt_snapshot}/releng/org.eclipse.cdt.repo/target/org.eclipse.cdt.repo.zip \
-d $installDir/eclipse
-# Add CDT core tests plugin even though this isn't done upstream
+#tests
+# We need grep to return non-zero status to skip all non eclipse-test-plugins
+pushd %{cdt_snapshot}
+set +e
+for pom in `find . -name pom.xml`; do
+ grep -q '<packaging>eclipse-test-plugin</packaging>' ${pom}
+ if [ $? -eq 0 ]; then
+ testjar=`ls ${pom/pom.xml/}'target/'*.jar | grep -v sources`
+ cp ${testjar} $testInstallDir
+ fi
+done
+set -e
+popd
+
+# Add CDT core tests plugin to main package even though this isn't done upstream
cp %{cdt_snapshot}/core/org.eclipse.cdt.core.tests/target/org.eclipse.cdt.core.tests-*-SNAPSHOT.jar $installDir/eclipse/plugins
# Libhover install
@@ -319,12 +350,21 @@ rm -rf $installDir/eclipse/binary
%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/epl-v10.html
%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
+%files tests
+%{_javadir}/eclipse-cdt-tests
+%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/epl-v10.html
+%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
+
%files llvm
%{eclipse_base}/dropins/cdt-llvm
%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/epl-v10.html
%doc %{cdt_snapshot}/releng/org.eclipse.cdt.releng/notice.html
%changelog
+* Mon Oct 07 2013 Jeff Johnston <jjohnstn at redhat.com> 1:8.2.1-2
+- Add eclipse-cdt-tests sub-package
+- Add patch to fix autotools tests build properties
+
* Mon Sep 30 2013 Jeff Johnston <jjohnstn at redhat.com> 1:8.2.1-1
- Update CDT to 8.2.1 (Kepler SR1)
- Update Libhover to Linux Tools 2.1.0 (Kepler SR1)
More information about the scm-commits
mailing list