Actually build integration.
This commit is contained in:
parent
9f29e3c2de
commit
97dfbde0e3
@ -34,7 +34,7 @@
|
|||||||
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
||||||
|
|
||||||
# This option controls integration which requires easymock2 and jmock
|
# This option controls integration which requires easymock2 and jmock
|
||||||
%bcond_with integration
|
%bcond_without integration
|
||||||
|
|
||||||
# This option controls jarjar on qdox
|
# This option controls jarjar on qdox
|
||||||
# Since bundling the qdox classes prevents upgrades, we disable it by default
|
# Since bundling the qdox classes prevents upgrades, we disable it by default
|
||||||
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
Name: hamcrest
|
Name: hamcrest
|
||||||
Version: 1.1
|
Version: 1.1
|
||||||
Release: 17%{?dist}
|
Release: 18%{?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
|
||||||
@ -74,7 +74,7 @@ Patch2: hamcrest-1.1-no-integration.patch
|
|||||||
Requires: java >= 1:1.6.0
|
Requires: java >= 1:1.6.0
|
||||||
%if %with integration
|
%if %with integration
|
||||||
Requires: easymock2
|
Requires: easymock2
|
||||||
Requires: jmock
|
#Requires: jmock
|
||||||
%endif
|
%endif
|
||||||
Requires: qdox
|
Requires: qdox
|
||||||
BuildRequires: jpackage-utils >= 0:1.7.4
|
BuildRequires: jpackage-utils >= 0:1.7.4
|
||||||
@ -82,15 +82,9 @@ BuildRequires: java-devel >= 1:1.6.0
|
|||||||
BuildRequires: ant >= 0:1.6.5
|
BuildRequires: ant >= 0:1.6.5
|
||||||
BuildRequires: ant-junit
|
BuildRequires: ant-junit
|
||||||
BuildRequires: zip
|
BuildRequires: zip
|
||||||
%if %with integration
|
|
||||||
BuildRequires: easymock2
|
|
||||||
%endif
|
|
||||||
%if %with jarjar
|
%if %with jarjar
|
||||||
BuildRequires: jarjar
|
BuildRequires: jarjar
|
||||||
%endif
|
%endif
|
||||||
%if %with integration
|
|
||||||
BuildRequires: jmock
|
|
||||||
%endif
|
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
BuildRequires: qdox
|
BuildRequires: qdox
|
||||||
%if %with tests
|
%if %with tests
|
||||||
@ -128,6 +122,9 @@ Demonstrations and samples for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
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/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
|
# BUILD/hamcrest-%{version}/lib/generator/jarjar-1.0rc3.jar.no
|
||||||
%if %with jarjar
|
%if %with jarjar
|
||||||
ln -sf $(build-classpath jarjar) lib/generator/
|
ln -sf $(build-classpath jarjar) lib/generator/
|
||||||
@ -153,7 +150,7 @@ ln -sf $(build-classpath testng-jdk15) lib/integration/
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
%endif
|
||||||
%if %without integration
|
%if %without integration
|
||||||
%patch2 -p1
|
#%patch2 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
perl -pi -e 's/\r$//g' LICENSE.txt
|
perl -pi -e 's/\r$//g' LICENSE.txt
|
||||||
@ -161,11 +158,7 @@ perl -pi -e 's/\r$//g' LICENSE.txt
|
|||||||
%build
|
%build
|
||||||
export CLASSPATH=$(build-classpath qdox)
|
export CLASSPATH=$(build-classpath qdox)
|
||||||
export OPT_JAR_LIST="junit ant/ant-junit"
|
export OPT_JAR_LIST="junit ant/ant-junit"
|
||||||
%if %with integration
|
|
||||||
ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=first all javadoc
|
|
||||||
%else
|
|
||||||
ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=first clean core generator library text bigjar javadoc
|
ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=first clean core generator library text bigjar javadoc
|
||||||
%endif
|
|
||||||
|
|
||||||
# inject OSGi manifests
|
# inject OSGi manifests
|
||||||
mkdir -p META-INF
|
mkdir -p META-INF
|
||||||
@ -234,9 +227,6 @@ cp -pr build/javadoc/* $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}
|
||||||
%if %with integration
|
|
||||||
install -m 644 build/%{name}-examples-%{version}.jar $RPM_BUILD_ROOT%{_datadir}/%{name}
|
|
||||||
%endif
|
|
||||||
cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -263,6 +253,9 @@ cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
|||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 31 2012 Alexander Kurtakov <akurtako@redhat.com> 0:1.1-18
|
||||||
|
- Actually build integration.
|
||||||
|
|
||||||
* Tue Jul 31 2012 Alexander Kurtakov <akurtako@redhat.com> 0:1.1-17
|
* Tue Jul 31 2012 Alexander Kurtakov <akurtako@redhat.com> 0:1.1-17
|
||||||
- Add OSGi metadata to hamcrest-integration.
|
- Add OSGi metadata to hamcrest-integration.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user