Install with XMvn
- Update upstream URL - Build from github source - Specfile cleanup
This commit is contained in:
parent
1ab1ce66c9
commit
5d5cb73d10
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@
|
|||||||
/*.src.rpm
|
/*.src.rpm
|
||||||
/noarch
|
/noarch
|
||||||
/.build-*.log
|
/.build-*.log
|
||||||
|
/hamcrest-java-1.3.tar.gz
|
||||||
|
@ -3,37 +3,37 @@ index 1cfd4fb..5a7c740 100644
|
|||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -14,13 +14,13 @@
|
@@ -14,13 +14,13 @@
|
||||||
<target name="generator" description="Build code generator tool">
|
<target name="generator" description="Build code generator tool">
|
||||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||||
modulename="hamcrest-generator-nodeps"
|
modulename="hamcrest-generator-nodeps"
|
||||||
- classpath="lib/generator/qdox-1.12.jar"/>
|
- classpath="lib/generator/qdox-1.12.jar"/>
|
||||||
+ classpath="lib/generator/qdox.jar"/>
|
+ classpath="lib/generator/qdox.jar"/>
|
||||||
|
|
||||||
<!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
<!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
||||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar-1.3.jar"/>
|
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar-1.3.jar"/>
|
||||||
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||||
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||||
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||||
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
|
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
|
||||||
+ <zipfileset src="lib/generator/qdox.jar"/>
|
+ <zipfileset src="lib/generator/qdox.jar"/>
|
||||||
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||||
</jarjar>
|
</jarjar>
|
||||||
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||||
@@ -152,7 +152,8 @@
|
@@ -152,7 +152,8 @@
|
||||||
|
|
||||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||||
- windowtitle="Hamcrest" source="1.6" failonerror="yes" overview="overview.html">
|
- windowtitle="Hamcrest" source="1.6" failonerror="yes" overview="overview.html">
|
||||||
+ windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
+ windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
||||||
+ <arg value="-Xdoclint:none"/>
|
+ <arg value="-Xdoclint:none"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="lib/integration">
|
<fileset dir="lib/integration">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
@@ -313,6 +314,7 @@
|
@@ -313,6 +314,7 @@
|
||||||
<javadoc packagenames="org.hamcrest.*" sourcepath="build/temp/@{modulename}-${version}-sources.jar.contents" defaultexcludes="yes"
|
<javadoc packagenames="org.hamcrest.*" sourcepath="build/temp/@{modulename}-${version}-sources.jar.contents" defaultexcludes="yes"
|
||||||
destdir="build/temp/@{modulename}-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
destdir="build/temp/@{modulename}-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||||
windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
||||||
+ <arg value="-Xdoclint:none"/>
|
+ <arg value="-Xdoclint:none"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="lib/integration">
|
<fileset dir="lib/integration">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
|
@ -12,14 +12,14 @@ index 1cfd4fb..69acfe8 100644
|
|||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -284,7 +284,7 @@
|
@@ -284,7 +284,7 @@
|
||||||
<attribute name="Built-Date" value="${build.timestamp}"/>
|
<attribute name="Built-Date" value="${build.timestamp}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
<mkdir dir="build/temp/@{modulename}-${version}.jar.contents"/>
|
<mkdir dir="build/temp/@{modulename}-${version}.jar.contents"/>
|
||||||
- <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false">
|
- <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false">
|
||||||
+ <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false" fork="true">
|
+ <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="lib/integration">
|
<fileset dir="lib/integration">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
--
|
--
|
||||||
2.9.3
|
2.9.3
|
||||||
|
|
||||||
|
@ -3,15 +3,15 @@ index ed57763..a4550cb 100644
|
|||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -135,11 +135,10 @@
|
@@ -135,11 +135,10 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="javadoc" description="build javadoc jars">
|
<target name="javadoc" description="build javadoc jars">
|
||||||
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
||||||
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
|
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
|
||||||
<java-to-javadoc-jar modulename="hamcrest-core"/>
|
<java-to-javadoc-jar modulename="hamcrest-core"/>
|
||||||
<java-to-javadoc-jar modulename="hamcrest-library"/>
|
<java-to-javadoc-jar modulename="hamcrest-library"/>
|
||||||
<java-to-javadoc-jar modulename="hamcrest-integration"/>
|
<java-to-javadoc-jar modulename="hamcrest-integration"/>
|
||||||
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
|
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
|
||||||
|
|
||||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||||
|
@ -3,21 +3,21 @@ index 54d43fe..ed57763 100644
|
|||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -13,17 +13,8 @@
|
@@ -13,17 +13,8 @@
|
||||||
|
|
||||||
<target name="generator" description="Build code generator tool">
|
<target name="generator" description="Build code generator tool">
|
||||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||||
- modulename="hamcrest-generator-nodeps"
|
- modulename="hamcrest-generator-nodeps"
|
||||||
+ modulename="hamcrest-generator"
|
+ modulename="hamcrest-generator"
|
||||||
classpath="lib/generator/qdox.jar"/>
|
classpath="lib/generator/qdox.jar"/>
|
||||||
-
|
-
|
||||||
- <!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
- <!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
||||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||||
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||||
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||||
- <zipfileset src="lib/generator/qdox.jar"/>
|
- <zipfileset src="lib/generator/qdox.jar"/>
|
||||||
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||||
- </jarjar>
|
- </jarjar>
|
||||||
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="core" depends="generator" description="Build core Hamcrest library">
|
<target name="core" depends="generator" description="Build core Hamcrest library">
|
||||||
|
@ -13,93 +13,93 @@ index efaf615..338178d 100644
|
|||||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
package org.hamcrest.generator;
|
package org.hamcrest.generator;
|
||||||
|
|
||||||
-import com.thoughtworks.qdox.JavaDocBuilder;
|
-import com.thoughtworks.qdox.JavaDocBuilder;
|
||||||
+import com.thoughtworks.qdox.JavaProjectBuilder;
|
+import com.thoughtworks.qdox.JavaProjectBuilder;
|
||||||
import com.thoughtworks.qdox.model.JavaClass;
|
import com.thoughtworks.qdox.model.JavaClass;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -16,7 +16,7 @@ import java.io.Reader;
|
@@ -16,7 +16,7 @@ import java.io.Reader;
|
||||||
*/
|
*/
|
||||||
public class QDox {
|
public class QDox {
|
||||||
|
|
||||||
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
|
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
|
||||||
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
|
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
|
||||||
|
|
||||||
public void addSourceTree(File sourceDir) {
|
public void addSourceTree(File sourceDir) {
|
||||||
javaDocBuilder.addSourceTree(sourceDir);
|
javaDocBuilder.addSourceTree(sourceDir);
|
||||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||||
index 5108140..97fce01 100644
|
index 5108140..97fce01 100644
|
||||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||||
@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag;
|
@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag;
|
||||||
import com.thoughtworks.qdox.model.JavaClass;
|
import com.thoughtworks.qdox.model.JavaClass;
|
||||||
import com.thoughtworks.qdox.model.JavaMethod;
|
import com.thoughtworks.qdox.model.JavaMethod;
|
||||||
import com.thoughtworks.qdox.model.JavaParameter;
|
import com.thoughtworks.qdox.model.JavaParameter;
|
||||||
-import com.thoughtworks.qdox.model.Type;
|
-import com.thoughtworks.qdox.model.Type;
|
||||||
+import com.thoughtworks.qdox.model.JavaType;
|
+import com.thoughtworks.qdox.model.JavaType;
|
||||||
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
|
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
|
||||||
|
|
||||||
+import java.util.ArrayList;
|
+import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||||
JavaMethod methodSource = findMethodInSource(factoryMethod);
|
JavaMethod methodSource = findMethodInSource(factoryMethod);
|
||||||
if (methodSource != null) {
|
if (methodSource != null) {
|
||||||
factoryMethod.setJavaDoc(createJavaDocComment(methodSource));
|
factoryMethod.setJavaDoc(createJavaDocComment(methodSource));
|
||||||
- JavaParameter[] parametersFromSource
|
- JavaParameter[] parametersFromSource
|
||||||
+ List<JavaParameter> parametersFromSource
|
+ List<JavaParameter> parametersFromSource
|
||||||
= methodSource.getParameters();
|
= methodSource.getParameters();
|
||||||
List<FactoryMethod.Parameter> parametersFromReflection
|
List<FactoryMethod.Parameter> parametersFromReflection
|
||||||
= factoryMethod.getParameters();
|
= factoryMethod.getParameters();
|
||||||
|
|
||||||
- if (parametersFromReflection.size() == parametersFromSource.length) {
|
- if (parametersFromReflection.size() == parametersFromSource.length) {
|
||||||
- for (int i = 0; i < parametersFromSource.length; i++) {
|
- for (int i = 0; i < parametersFromSource.length; i++) {
|
||||||
+ if (parametersFromReflection.size() == parametersFromSource.size()) {
|
+ if (parametersFromReflection.size() == parametersFromSource.size()) {
|
||||||
+ for (int i = 0; i < parametersFromSource.size(); i++) {
|
+ for (int i = 0; i < parametersFromSource.size(); i++) {
|
||||||
parametersFromReflection.get(i).setName(
|
parametersFromReflection.get(i).setName(
|
||||||
- parametersFromSource[i].getName());
|
- parametersFromSource[i].getName());
|
||||||
+ parametersFromSource.get(i).getName());
|
+ parametersFromSource.get(i).getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||||
// Note, this doesn't always work - it struggles with some kinds of generics.
|
// Note, this doesn't always work - it struggles with some kinds of generics.
|
||||||
// This seems to cover most cases though.
|
// This seems to cover most cases though.
|
||||||
List<FactoryMethod.Parameter> params = factoryMethod.getParameters();
|
List<FactoryMethod.Parameter> params = factoryMethod.getParameters();
|
||||||
- Type[] types = new Type[params.size()];
|
- Type[] types = new Type[params.size()];
|
||||||
+ List<JavaType> types = new ArrayList<JavaType>(params.size());
|
+ List<JavaType> types = new ArrayList<JavaType>(params.size());
|
||||||
boolean varArgs = false;
|
boolean varArgs = false;
|
||||||
- for (int i = 0; i < types.length; i++) {
|
- for (int i = 0; i < types.length; i++) {
|
||||||
+ for (int i = 0; i < params.size(); i++) {
|
+ for (int i = 0; i < params.size(); i++) {
|
||||||
String type = params.get(i).getType();
|
String type = params.get(i).getType();
|
||||||
varArgs = VARARGS_REGEX.matcher(type).find();
|
varArgs = VARARGS_REGEX.matcher(type).find();
|
||||||
// QDox ignores varargs and generics, so we strip them out to help QDox.
|
// QDox ignores varargs and generics, so we strip them out to help QDox.
|
||||||
type = GENERIC_REGEX.matcher(type).replaceAll("");
|
type = GENERIC_REGEX.matcher(type).replaceAll("");
|
||||||
type = VARARGS_REGEX.matcher(type).replaceAll("");
|
type = VARARGS_REGEX.matcher(type).replaceAll("");
|
||||||
- types[i] = new Type(type);
|
- types[i] = new Type(type);
|
||||||
+ types.add(new DefaultJavaClass(type));
|
+ types.add(new DefaultJavaClass(type));
|
||||||
}
|
}
|
||||||
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
||||||
- return methods.length == 1 ? methods[0] : null;
|
- return methods.length == 1 ? methods[0] : null;
|
||||||
+ List<JavaMethod> methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
+ List<JavaMethod> methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
||||||
+ return methods.size() == 1 ? methods.get(0) : null;
|
+ return methods.size() == 1 ? methods.get(0) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||||
*/
|
*/
|
||||||
private static String createJavaDocComment(JavaMethod methodSource) {
|
private static String createJavaDocComment(JavaMethod methodSource) {
|
||||||
String comment = methodSource.getComment();
|
String comment = methodSource.getComment();
|
||||||
- DocletTag[] tags = methodSource.getTags();
|
- DocletTag[] tags = methodSource.getTags();
|
||||||
- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) {
|
- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) {
|
||||||
+ List<DocletTag> tags = methodSource.getTags();
|
+ List<DocletTag> tags = methodSource.getTags();
|
||||||
+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) {
|
+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
--
|
--
|
||||||
2.9.3
|
2.9.3
|
||||||
|
|
||||||
|
118
hamcrest.spec
118
hamcrest.spec
@ -28,36 +28,14 @@
|
|||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
|
||||||
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
|
||||||
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
|
||||||
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
|
||||||
|
|
||||||
# This option controls jarjar on qdox
|
|
||||||
# Since bundling the qdox classes prevents upgrades, we disable it by default
|
|
||||||
%bcond_with jarjar
|
|
||||||
|
|
||||||
# This option controls tests which requires ant-junit and testng
|
|
||||||
%bcond_with tests
|
|
||||||
|
|
||||||
Name: hamcrest
|
Name: hamcrest
|
||||||
Version: 1.3
|
Version: 1.3
|
||||||
Release: 18%{?dist}
|
Release: 19%{?dist}
|
||||||
Epoch: 0
|
Epoch: 0
|
||||||
Summary: Library of matchers for building test expressions
|
Summary: Library of matchers for building test expressions
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://code.google.com/p/hamcrest/
|
URL: https://github.com/hamcrest/JavaHamcrest
|
||||||
Group: Development/Tools
|
Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz
|
||||||
Source0: http://%{name}.googlecode.com/files/%{name}-1.3.tgz
|
|
||||||
Source1: http://repo1.maven.org/maven2/org/%{name}/%{name}-parent/%{version}/%{name}-parent-%{version}.pom
|
|
||||||
Source2: http://repo1.maven.org/maven2/org/%{name}/%{name}-library/%{version}/%{name}-library-%{version}.pom
|
|
||||||
Source3: http://repo1.maven.org/maven2/org/%{name}/%{name}-integration/%{version}/%{name}-integration-%{version}.pom
|
|
||||||
Source4: http://repo1.maven.org/maven2/org/%{name}/%{name}-generator/%{version}/%{name}-generator-%{version}.pom
|
|
||||||
Source5: http://repo1.maven.org/maven2/org/%{name}/%{name}-core/%{version}/%{name}-core-%{version}.pom
|
|
||||||
Source6: http://repo1.maven.org/maven2/org/%{name}/%{name}-all/%{version}/%{name}-all-%{version}.pom
|
|
||||||
# This file was added by the maintainer for compatibility with maven dep
|
|
||||||
# solving system
|
|
||||||
Source7: %{name}-text-%{version}.pom
|
|
||||||
|
|
||||||
Source8: hamcrest-core-MANIFEST.MF
|
Source8: hamcrest-core-MANIFEST.MF
|
||||||
Source9: hamcrest-library-MANIFEST.MF
|
Source9: hamcrest-library-MANIFEST.MF
|
||||||
@ -71,25 +49,17 @@ Patch3: %{name}-%{version}-javadoc.patch
|
|||||||
Patch4: %{name}-%{version}-qdox-2.0.patch
|
Patch4: %{name}-%{version}-qdox-2.0.patch
|
||||||
Patch5: %{name}-%{version}-fork-javac.patch
|
Patch5: %{name}-%{version}-fork-javac.patch
|
||||||
|
|
||||||
Requires: java-headless >= 1:1.6.0
|
|
||||||
Requires: qdox
|
Requires: qdox
|
||||||
Requires: easymock >= 3.0
|
Requires: easymock >= 3.0
|
||||||
Requires: %{name}-core = %{epoch}:%{version}-%{release}
|
Requires: %{name}-core = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
BuildRequires: jpackage-utils >= 0:1.7.4
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: java-devel >= 1:1.6.0
|
BuildRequires: ant
|
||||||
BuildRequires: ant >= 0:1.6.5
|
|
||||||
BuildRequires: ant-junit
|
BuildRequires: ant-junit
|
||||||
BuildRequires: zip
|
BuildRequires: easymock
|
||||||
BuildRequires: easymock >= 3.0
|
|
||||||
%if %with jarjar
|
|
||||||
BuildRequires: jarjar
|
|
||||||
%endif
|
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
BuildRequires: qdox
|
BuildRequires: qdox
|
||||||
%if %with tests
|
|
||||||
BuildRequires: testng
|
BuildRequires: testng
|
||||||
%endif
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -108,34 +78,27 @@ The core API of hamcrest matcher framework to be used by third-party framework p
|
|||||||
This includes the a foundation set of matcher implementations for common operations.
|
This includes the a foundation set of matcher implementations for common operations.
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Group: Documentation
|
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc for %{name}.
|
Javadoc for %{name}.
|
||||||
|
|
||||||
%package demo
|
%package demo
|
||||||
Group: Development/Libraries
|
|
||||||
Summary: Demos for %{name}
|
Summary: Demos for %{name}
|
||||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||||
Requires: junit
|
Requires: junit
|
||||||
%if %with tests
|
|
||||||
Requires: testng
|
Requires: testng
|
||||||
%endif
|
|
||||||
|
|
||||||
%description demo
|
%description demo
|
||||||
Demonstrations and samples for %{name}.
|
Demonstrations and samples for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n JavaHamcrest-%{name}-java-%{version}
|
||||||
|
|
||||||
find . -type f -name "*.jar" | xargs -t rm
|
find . -type f -name "*.jar" | xargs -t rm
|
||||||
rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java
|
||||||
rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java
|
||||||
rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java
|
rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java
|
||||||
# BUILD/hamcrest-%{version}/lib/generator/jarjar-1.0rc3.jar.no
|
|
||||||
%if %with jarjar
|
|
||||||
ln -sf $(build-classpath jarjar) lib/generator/
|
|
||||||
%endif
|
|
||||||
# BUILD/hamcrest-1.1/lib/generator/qdox-1.6.1.jar.no
|
# BUILD/hamcrest-1.1/lib/generator/qdox-1.6.1.jar.no
|
||||||
ln -sf $(build-classpath qdox) lib/generator/
|
ln -sf $(build-classpath qdox) lib/generator/
|
||||||
# BUILD/hamcrest-1.1/lib/integration/easymock-2.2.jar.no
|
# BUILD/hamcrest-1.1/lib/integration/easymock-2.2.jar.no
|
||||||
@ -143,13 +106,10 @@ ln -sf $(build-classpath easymock3) lib/integration/
|
|||||||
# BUILD/hamcrest-1.1/lib/integration/jmock-1.10RC1.jar.no
|
# BUILD/hamcrest-1.1/lib/integration/jmock-1.10RC1.jar.no
|
||||||
ln -sf $(build-classpath jmock) lib/integration/
|
ln -sf $(build-classpath jmock) lib/integration/
|
||||||
# BUILD/hamcrest-1.1/lib/integration/testng-4.6-jdk15.jar.no
|
# BUILD/hamcrest-1.1/lib/integration/testng-4.6-jdk15.jar.no
|
||||||
%if %with tests
|
|
||||||
ln -sf $(build-classpath testng-jdk15) lib/integration/
|
ln -sf $(build-classpath testng-jdk15) lib/integration/
|
||||||
%endif
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%if %without jarjar
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
@ -194,64 +154,46 @@ touch META-INF/MANIFEST.MF
|
|||||||
zip -u build/%{name}-generator-%{version}.jar META-INF/MANIFEST.MF
|
zip -u build/%{name}-generator-%{version}.jar META-INF/MANIFEST.MF
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jars
|
sed -i 's/@VERSION@/%{version}/g' pom/*.pom
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
|
|
||||||
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-parent.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-parent.pom -f core
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/all.jar
|
%mvn_artifact pom/hamcrest-parent.pom
|
||||||
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-all.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-all.pom %{name}/all.jar
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core.jar
|
for mod in all core generator library integration; do
|
||||||
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-core.pom
|
%mvn_artifact pom/hamcrest-$mod.pom build/%{name}-all-%{version}.jar
|
||||||
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar -f core
|
done
|
||||||
|
|
||||||
install -m 644 build/%{name}-generator-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/generator.jar
|
# hamcrest-text doesn't have a pom
|
||||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-generator.pom
|
%mvn_artifact org.hamcrest:hamcrest-text:%{version} build/%{name}-text-%{version}.jar
|
||||||
%add_maven_depmap JPP.%{name}-generator.pom %{name}/generator.jar
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-library-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/library.jar
|
%mvn_package :hamcrest-parent core
|
||||||
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-library.pom
|
%mvn_package :hamcrest-core core
|
||||||
%add_maven_depmap JPP.%{name}-library.pom %{name}/library.jar
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-integration-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/integration.jar
|
%mvn_file ':hamcrest-{*}' %{name}/@1
|
||||||
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-integration.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-integration.pom %{name}/integration.jar
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-text-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/text.jar
|
|
||||||
install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-text.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-text.pom %{name}/text.jar
|
|
||||||
|
|
||||||
%if %with tests
|
|
||||||
install -m 644 build/%{name}-unit-test-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/unit-test.jar
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# javadoc
|
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
cp -pr build/temp/hamcrest-all-1.3-javadoc.jar.contents/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
||||||
|
|
||||||
# demo
|
# demo
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||||
cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
||||||
|
|
||||||
|
%mvn_install -J build/temp/hamcrest-all-1.3-javadoc.jar.contents/
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%doc LICENSE.txt
|
|
||||||
%dir %{_javadir}/%{name}
|
|
||||||
%if %with tests
|
|
||||||
%{_javadir}/%{name}/unit-test.jar
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files core -f .mfiles-core
|
%files core -f .mfiles-core
|
||||||
|
%license LICENSE.txt
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc -f .mfiles-javadoc
|
||||||
%{_javadocdir}/%{name}
|
%license LICENSE.txt
|
||||||
|
|
||||||
%files demo
|
%files demo
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Mar 21 2017 Michael Simacek <msimacek@redhat.com> - 0:1.3-19
|
||||||
|
- Install with XMvn
|
||||||
|
- Update upstream URL
|
||||||
|
- Build from github source
|
||||||
|
- Specfile cleanup
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3-18
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3-18
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
9
sources
9
sources
@ -1,8 +1 @@
|
|||||||
29b18baac02244a9b7568d5bd5bb1c42 hamcrest-all-1.3.pom
|
SHA512 (hamcrest-java-1.3.tar.gz) = 4356df7b5b78f821847fde027b416b49b8456e84ab2ec98c2982adf54e2bdc01a5ca2c2b5425620c5ee34bfe3f95ea43c77190504f76ddc9f8b93b137a4ca54b
|
||||||
7cd680c223f3807e1ef353466b9a4b25 hamcrest-core-1.3.pom
|
|
||||||
ba3c980bbf7d7b91d63d99da503aa3f4 hamcrest-generator-1.3.pom
|
|
||||||
442fa9ad7a4dfbd6a2ab5fca6e9b36c1 hamcrest-integration-1.3.pom
|
|
||||||
f09e58cd2a1ea76816c17141db41b2e1 hamcrest-library-1.3.pom
|
|
||||||
7591ddb3581de8684c17e51741a7461d hamcrest-parent-1.3.pom
|
|
||||||
de8c4213de11a0c2f83821bb700ac5eb hamcrest-text-1.3.pom
|
|
||||||
92e91c2754d44e49b72d70c10a04cb08 hamcrest-1.3.tgz
|
|
||||||
|
Loading…
Reference in New Issue
Block a user