[eclipse-testng/f20: 2/5] Update to latest upstream release.
Mat Booth
mbooth at fedoraproject.org
Thu Jun 19 08:00:08 UTC 2014
commit 817ccdb924c14dabec0a5dab73268264b0026304
Author: Mat Booth <mat.booth at redhat.com>
Date: Thu Jun 12 15:57:57 2014 +0100
Update to latest upstream release.
.gitignore | 6 +++
eclipse-testng-manifest.patch | 35 +++++++++++++++++
eclipse-testng.spec | 86 +++++++++++++++++++++++++++++++---------
3 files changed, 107 insertions(+), 20 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4f4e68b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/noarch
+/.project
+/*.src.rpm
+/*.tar.gz
+/testng-eclipse-*/
+/.build-*.log
diff --git a/eclipse-testng-manifest.patch b/eclipse-testng-manifest.patch
new file mode 100644
index 0000000..5d4dd70
--- /dev/null
+++ b/eclipse-testng-manifest.patch
@@ -0,0 +1,35 @@
+--- META-INF/MANIFEST.MF.orig 2013-06-07 15:43:58.000000000 +0100
++++ META-INF/MANIFEST.MF 2013-06-25 16:26:35.758015714 +0100
+@@ -30,9 +30,11 @@
+ Bundle-ActivationPolicy: lazy
+ Bundle-ClassPath: .,
+ lib/testng.jar,
+- lib/guava-base-r03.jar,
+- lib/guava-collections-r03.jar,
+- lib/junit-4.8.2.jar
++ lib/beust-jcommander.jar,
++ lib/google-guice.jar,
++ lib/guava.jar,
++ lib/junit.jar,
++ lib/snakeyaml.jar
+ Export-Package:
+ org.testng.eclipse,
+ org.testng.eclipse.buildpath,
+--- build.properties.orig 2013-06-07 15:43:58.000000000 +0100
++++ build.properties 2013-06-25 16:27:20.262194591 +0100
+@@ -6,10 +6,10 @@
+ plugin.properties,\
+ icons/,\
+ schema/,\
+- lib/guava-collections-r03.jar,\
+- lib/guava-base-r03.jar,\
+ lib/testng.jar,\
+- lib/testng-sources.jar,\
+- lib/junit-4.8.2.jar
+-
++ lib/beust-jcommander.jar,\
++ lib/google-guice.jar,\
++ lib/guava.jar,\
++ lib/junit.jar,\
++ lib/snakeyaml.jar
+
diff --git a/eclipse-testng.spec b/eclipse-testng.spec
index 3fe1199..e18a7c7 100644
--- a/eclipse-testng.spec
+++ b/eclipse-testng.spec
@@ -1,37 +1,83 @@
-Name: eclipse-testng
-Version: 6.8.6
-Release: 1%{?dist}
-Summary: Summary of the package
+%global eclipse_dropin %{_datadir}/eclipse/dropins
-License: GPL
-URL: http://
-Source0: archive_name-%{version}
+%global git_rev 86c0d14265995c53ef7a28f5a57e0150eff529cd
-BuildRequires:
-Requires:
+Name: eclipse-testng
+Version: 6.8.6
+Release: 1%{?dist}
+Summary: TestNG plug-in for Eclipse
+License: ASL 2.0
+URL: http://testng.org
-%description
+BuildArch: noarch
+
+# This is a git snapshot because upstream do not tag their releases. Inspection of the contained classes
+# shows that this is the code that makes up the 6.8.6 release available in upstream's update site.
+Source0: https://github.com/cbeust/testng-eclipse/archive/%{git_rev}.tar.gz
+Patch0: eclipse-testng-manifest.patch
+
+Requires: eclipse-platform
+Requires: eclipse-jdt
+Requires: guava
+Requires: google-guice
+Requires: junit
+Requires: testng >= 6.8
+BuildRequires: java-devel
+BuildRequires: eclipse-pde
+BuildRequires: eclipse-jdt
+BuildRequires: guava
+BuildRequires: google-guice
+BuildRequires: junit
+BuildRequires: testng >= 6.8
+
+%description
+The Eclipse TestNG plug-in integrates the TestNG testing framework into the
+Eclipse IDE.
%prep
-%setup -q
+%setup -q -n testng-eclipse-%{git_rev}
+%patch0 -p0
+# remove bundled libs
+rm -f lib/*
+find -name '*.class' -exec rm -f '{}' \;
+find -name '*.jar' -exec rm -f '{}' \;
-%build
-%configure
-make %{?_smp_mflags}
+# build against fedora packaged libs
+build-jar-repository -s -p lib guava testng junit snakeyaml google-guice beust-jcommander
+
+# the version of the plugin was (and remains) typo'd, see comments on the following commit:
+# https://github.com/cbeust/testng-eclipse/commit/86199dbcc081404466a3f7bc7117fad9461b7067
+sed -i -e 's at 6\.8\.1\.20130330_0839@%{version}.qualifier at g' META-INF/MANIFEST.MF
+sed -i -e 's at 6\.1\.1\.20110823_1537@%{version}.qualifier at g' testng-eclipse-feature/feature.xml
+%build
+eclipse-pdebuild -a "-DjavacSource=1.5 -DjavacTarget=1.5"
%install
-rm -rf $RPM_BUILD_ROOT
-%make_install
+install -d -m 755 %{buildroot}%{eclipse_dropin}
+unzip -q -n -d %{buildroot}%{eclipse_dropin}/testng-eclipse build/rpmBuild/org.testng.eclipse.zip
+# need to recreate the symlinks to libraries that were setup in "prep"
+# because for some reason the ant copy task doesn't preserve them, this will
+# cause some benign dangling-symlink rpmlint warnings
+pushd %{buildroot}%{eclipse_dropin}/testng-eclipse/eclipse/plugins/org.testng.eclipse_*
+rm lib/*.jar
+build-jar-repository -s -p lib guava testng junit snakeyaml google-guice beust-jcommander
+popd
%files
-%doc
+# there is no separate licence file, but this file contains an embedded copy of it
+%doc testng-eclipse-feature/feature.xml
+%{eclipse_dropin}/testng-eclipse
+%changelog
+* Thu Jun 12 2014 Mat Booth <mat.booth at redhat.com> - 6.8.6-1
+- Update to latest upstream release.
+* Fri Mar 14 2014 Mat Booth <fedora at matbooth.co.uk> - 6.8.5-2.20130625gite0f6037
+- Add BR/R on google-guice.
-%changelog
-* Thu Jun 12 2014 Mat Booth <mat.booth at redhat.com>
--
+* Tue Jun 25 2013 Mat Booth <fedora at matbooth.co.uk> - 6.8.5-1.20130625gite0f6037
+- Initial package.
diff --git a/sources b/sources
new file mode 100644
index 0000000..e69de29
More information about the scm-commits
mailing list