Install with XMvn

- Update upstream URL
- Build from github source
- Specfile cleanup
This commit is contained in:
Michael Simacek 2017-03-21 18:05:13 +01:00
parent 1ab1ce66c9
commit 5d5cb73d10
8 changed files with 180 additions and 244 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@
/*.src.rpm
/noarch
/.build-*.log
/hamcrest-java-1.3.tar.gz

View File

@ -3,37 +3,37 @@ index 1cfd4fb..5a7c740 100644
--- a/build.xml
+++ b/build.xml
@@ -14,13 +14,13 @@
<target name="generator" description="Build code generator tool">
<java-to-jar srcdir="hamcrest-generator/src/main/java"
modulename="hamcrest-generator-nodeps"
- classpath="lib/generator/qdox-1.12.jar"/>
+ classpath="lib/generator/qdox.jar"/>
<!-- 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.jar"/>
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
+ <zipfileset src="lib/generator/qdox.jar"/>
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
</jarjar>
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
<target name="generator" description="Build code generator tool">
<java-to-jar srcdir="hamcrest-generator/src/main/java"
modulename="hamcrest-generator-nodeps"
- classpath="lib/generator/qdox-1.12.jar"/>
+ classpath="lib/generator/qdox.jar"/>
<!-- 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.jar"/>
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
+ <zipfileset src="lib/generator/qdox.jar"/>
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
</jarjar>
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
@@ -152,7 +152,8 @@
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
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">
+ <arg value="-Xdoclint:none"/>
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
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">
+ <arg value="-Xdoclint:none"/>
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
@@ -313,6 +314,7 @@
<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"
windowtitle="Hamcrest" source="1.6" failonerror="yes">
+ <arg value="-Xdoclint:none"/>
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
<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"
windowtitle="Hamcrest" source="1.6" failonerror="yes">
+ <arg value="-Xdoclint:none"/>
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>

View File

@ -12,14 +12,14 @@ index 1cfd4fb..69acfe8 100644
--- a/build.xml
+++ b/build.xml
@@ -284,7 +284,7 @@
<attribute name="Built-Date" value="${build.timestamp}"/>
</manifest>
<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" fork="true">
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
<attribute name="Built-Date" value="${build.timestamp}"/>
</manifest>
<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" fork="true">
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
--
2.9.3

View File

@ -3,15 +3,15 @@ index ed57763..a4550cb 100644
--- a/build.xml
+++ b/build.xml
@@ -135,11 +135,10 @@
</target>
<target name="javadoc" description="build javadoc jars">
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
<java-to-javadoc-jar modulename="hamcrest-core"/>
<java-to-javadoc-jar modulename="hamcrest-library"/>
<java-to-javadoc-jar modulename="hamcrest-integration"/>
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
</target>
<target name="javadoc" description="build javadoc jars">
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
<java-to-javadoc-jar modulename="hamcrest-core"/>
<java-to-javadoc-jar modulename="hamcrest-library"/>
<java-to-javadoc-jar modulename="hamcrest-integration"/>
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"

View File

@ -3,21 +3,21 @@ index 54d43fe..ed57763 100644
--- a/build.xml
+++ b/build.xml
@@ -13,17 +13,8 @@
<target name="generator" description="Build code generator tool">
<java-to-jar srcdir="hamcrest-generator/src/main/java"
- modulename="hamcrest-generator-nodeps"
+ modulename="hamcrest-generator"
classpath="lib/generator/qdox.jar"/>
-
- <!-- 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"/>
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
- <zipfileset src="lib/generator/qdox.jar"/>
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
- </jarjar>
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
</target>
<target name="core" depends="generator" description="Build core Hamcrest library">
<target name="generator" description="Build code generator tool">
<java-to-jar srcdir="hamcrest-generator/src/main/java"
- modulename="hamcrest-generator-nodeps"
+ modulename="hamcrest-generator"
classpath="lib/generator/qdox.jar"/>
-
- <!-- 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"/>
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
- <zipfileset src="lib/generator/qdox.jar"/>
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
- </jarjar>
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
</target>
<target name="core" depends="generator" description="Build core Hamcrest library">

View File

@ -13,93 +13,93 @@ index efaf615..338178d 100644
--- a/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 @@
package org.hamcrest.generator;
-import com.thoughtworks.qdox.JavaDocBuilder;
+import com.thoughtworks.qdox.JavaProjectBuilder;
import com.thoughtworks.qdox.model.JavaClass;
import java.io.File;
package org.hamcrest.generator;
-import com.thoughtworks.qdox.JavaDocBuilder;
+import com.thoughtworks.qdox.JavaProjectBuilder;
import com.thoughtworks.qdox.model.JavaClass;
import java.io.File;
@@ -16,7 +16,7 @@ import java.io.Reader;
*/
public class QDox {
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
public void addSourceTree(File sourceDir) {
javaDocBuilder.addSourceTree(sourceDir);
*/
public class QDox {
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
public void addSourceTree(File 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
index 5108140..97fce01 100644
--- a/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;
import com.thoughtworks.qdox.model.JavaClass;
import com.thoughtworks.qdox.model.JavaMethod;
import com.thoughtworks.qdox.model.JavaParameter;
-import com.thoughtworks.qdox.model.Type;
+import com.thoughtworks.qdox.model.JavaType;
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import com.thoughtworks.qdox.model.JavaClass;
import com.thoughtworks.qdox.model.JavaMethod;
import com.thoughtworks.qdox.model.JavaParameter;
-import com.thoughtworks.qdox.model.Type;
+import com.thoughtworks.qdox.model.JavaType;
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
JavaMethod methodSource = findMethodInSource(factoryMethod);
if (methodSource != null) {
factoryMethod.setJavaDoc(createJavaDocComment(methodSource));
- JavaParameter[] parametersFromSource
+ List<JavaParameter> parametersFromSource
= methodSource.getParameters();
List<FactoryMethod.Parameter> parametersFromReflection
= factoryMethod.getParameters();
- if (parametersFromReflection.size() == parametersFromSource.length) {
- for (int i = 0; i < parametersFromSource.length; i++) {
+ if (parametersFromReflection.size() == parametersFromSource.size()) {
+ for (int i = 0; i < parametersFromSource.size(); i++) {
parametersFromReflection.get(i).setName(
- parametersFromSource[i].getName());
+ parametersFromSource.get(i).getName());
}
}
}
JavaMethod methodSource = findMethodInSource(factoryMethod);
if (methodSource != null) {
factoryMethod.setJavaDoc(createJavaDocComment(methodSource));
- JavaParameter[] parametersFromSource
+ List<JavaParameter> parametersFromSource
= methodSource.getParameters();
List<FactoryMethod.Parameter> parametersFromReflection
= factoryMethod.getParameters();
- if (parametersFromReflection.size() == parametersFromSource.length) {
- for (int i = 0; i < parametersFromSource.length; i++) {
+ if (parametersFromReflection.size() == parametersFromSource.size()) {
+ for (int i = 0; i < parametersFromSource.size(); i++) {
parametersFromReflection.get(i).setName(
- parametersFromSource[i].getName());
+ parametersFromSource.get(i).getName());
}
}
}
@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
// Note, this doesn't always work - it struggles with some kinds of generics.
// This seems to cover most cases though.
List<FactoryMethod.Parameter> params = factoryMethod.getParameters();
- Type[] types = new Type[params.size()];
+ List<JavaType> types = new ArrayList<JavaType>(params.size());
boolean varArgs = false;
- for (int i = 0; i < types.length; i++) {
+ for (int i = 0; i < params.size(); i++) {
String type = params.get(i).getType();
varArgs = VARARGS_REGEX.matcher(type).find();
// QDox ignores varargs and generics, so we strip them out to help QDox.
type = GENERIC_REGEX.matcher(type).replaceAll("");
type = VARARGS_REGEX.matcher(type).replaceAll("");
- types[i] = new Type(type);
+ types.add(new DefaultJavaClass(type));
}
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
- return methods.length == 1 ? methods[0] : null;
+ List<JavaMethod> methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
+ return methods.size() == 1 ? methods.get(0) : null;
}
/**
// Note, this doesn't always work - it struggles with some kinds of generics.
// This seems to cover most cases though.
List<FactoryMethod.Parameter> params = factoryMethod.getParameters();
- Type[] types = new Type[params.size()];
+ List<JavaType> types = new ArrayList<JavaType>(params.size());
boolean varArgs = false;
- for (int i = 0; i < types.length; i++) {
+ for (int i = 0; i < params.size(); i++) {
String type = params.get(i).getType();
varArgs = VARARGS_REGEX.matcher(type).find();
// QDox ignores varargs and generics, so we strip them out to help QDox.
type = GENERIC_REGEX.matcher(type).replaceAll("");
type = VARARGS_REGEX.matcher(type).replaceAll("");
- types[i] = new Type(type);
+ types.add(new DefaultJavaClass(type));
}
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
- return methods.length == 1 ? methods[0] : null;
+ List<JavaMethod> methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
+ return methods.size() == 1 ? methods.get(0) : null;
}
/**
@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
*/
private static String createJavaDocComment(JavaMethod methodSource) {
String comment = methodSource.getComment();
- DocletTag[] tags = methodSource.getTags();
- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) {
+ List<DocletTag> tags = methodSource.getTags();
+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) {
return null;
}
StringBuilder result = new StringBuilder();
*/
private static String createJavaDocComment(JavaMethod methodSource) {
String comment = methodSource.getComment();
- DocletTag[] tags = methodSource.getTags();
- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) {
+ List<DocletTag> tags = methodSource.getTags();
+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) {
return null;
}
StringBuilder result = new StringBuilder();
--
2.9.3

View File

@ -28,36 +28,14 @@
# 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
Version: 1.3
Release: 18%{?dist}
Release: 19%{?dist}
Epoch: 0
Summary: Library of matchers for building test expressions
License: BSD
URL: http://code.google.com/p/hamcrest/
Group: Development/Tools
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
URL: https://github.com/hamcrest/JavaHamcrest
Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz
Source8: hamcrest-core-MANIFEST.MF
Source9: hamcrest-library-MANIFEST.MF
@ -71,25 +49,17 @@ Patch3: %{name}-%{version}-javadoc.patch
Patch4: %{name}-%{version}-qdox-2.0.patch
Patch5: %{name}-%{version}-fork-javac.patch
Requires: java-headless >= 1:1.6.0
Requires: qdox
Requires: easymock >= 3.0
Requires: %{name}-core = %{epoch}:%{version}-%{release}
BuildRequires: jpackage-utils >= 0:1.7.4
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: ant >= 0:1.6.5
BuildRequires: javapackages-local
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: zip
BuildRequires: easymock >= 3.0
%if %with jarjar
BuildRequires: jarjar
%endif
BuildRequires: easymock
BuildRequires: junit
BuildRequires: qdox
%if %with tests
BuildRequires: testng
%endif
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.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
Javadoc for %{name}.
%package demo
Group: Development/Libraries
Summary: Demos for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: junit
%if %with tests
Requires: testng
%endif
%description demo
Demonstrations and samples for %{name}.
%prep
%setup -q
%setup -q -n JavaHamcrest-%{name}-java-%{version}
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/JMock1Matchers.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
ln -sf $(build-classpath qdox) lib/generator/
# 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
ln -sf $(build-classpath jmock) lib/integration/
# BUILD/hamcrest-1.1/lib/integration/testng-4.6-jdk15.jar.no
%if %with tests
ln -sf $(build-classpath testng-jdk15) lib/integration/
%endif
%patch0 -p1
%if %without jarjar
%patch1 -p1
%endif
%patch3 -p1
%patch4 -p1
%patch5 -p1
@ -194,64 +154,46 @@ touch META-INF/MANIFEST.MF
zip -u build/%{name}-generator-%{version}.jar META-INF/MANIFEST.MF
%install
# jars
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
sed -i 's/@VERSION@/%{version}/g' pom/*.pom
install -m 644 build/%{name}-all-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/all.jar
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-all.pom
%add_maven_depmap JPP.%{name}-all.pom %{name}/all.jar
%mvn_artifact pom/hamcrest-parent.pom
install -m 644 build/%{name}-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core.jar
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-core.pom
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar -f core
for mod in all core generator library integration; do
%mvn_artifact pom/hamcrest-$mod.pom build/%{name}-all-%{version}.jar
done
install -m 644 build/%{name}-generator-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/generator.jar
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-generator.pom
%add_maven_depmap JPP.%{name}-generator.pom %{name}/generator.jar
# hamcrest-text doesn't have a pom
%mvn_artifact org.hamcrest:hamcrest-text:%{version} build/%{name}-text-%{version}.jar
install -m 644 build/%{name}-library-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/library.jar
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-library.pom
%add_maven_depmap JPP.%{name}-library.pom %{name}/library.jar
%mvn_package :hamcrest-parent core
%mvn_package :hamcrest-core core
install -m 644 build/%{name}-integration-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/integration.jar
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}
%mvn_file ':hamcrest-{*}' %{name}/@1
# demo
install -d -m 755 $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
%doc LICENSE.txt
%dir %{_javadir}/%{name}
%if %with tests
%{_javadir}/%{name}/unit-test.jar
%endif
%files core -f .mfiles-core
%license LICENSE.txt
%files javadoc
%{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%files demo
%{_datadir}/%{name}
%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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

View File

@ -1,8 +1 @@
29b18baac02244a9b7568d5bd5bb1c42 hamcrest-all-1.3.pom
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
SHA512 (hamcrest-java-1.3.tar.gz) = 4356df7b5b78f821847fde027b416b49b8456e84ab2ec98c2982adf54e2bdc01a5ca2c2b5425620c5ee34bfe3f95ea43c77190504f76ddc9f8b93b137a4ca54b