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}}
|
||||
|
||||
# This option controls integration which requires easymock2 and jmock
|
||||
%bcond_with integration
|
||||
%bcond_without integration
|
||||
|
||||
# This option controls jarjar on qdox
|
||||
# Since bundling the qdox classes prevents upgrades, we disable it by default
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
Name: hamcrest
|
||||
Version: 1.1
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Library of matchers for building test expressions
|
||||
License: BSD
|
||||
@ -74,7 +74,7 @@ Patch2: hamcrest-1.1-no-integration.patch
|
||||
Requires: java >= 1:1.6.0
|
||||
%if %with integration
|
||||
Requires: easymock2
|
||||
Requires: jmock
|
||||
#Requires: jmock
|
||||
%endif
|
||||
Requires: qdox
|
||||
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-junit
|
||||
BuildRequires: zip
|
||||
%if %with integration
|
||||
BuildRequires: easymock2
|
||||
%endif
|
||||
%if %with jarjar
|
||||
BuildRequires: jarjar
|
||||
%endif
|
||||
%if %with integration
|
||||
BuildRequires: jmock
|
||||
%endif
|
||||
BuildRequires: junit
|
||||
BuildRequires: qdox
|
||||
%if %with tests
|
||||
@ -128,6 +122,9 @@ Demonstrations and samples for %{name}.
|
||||
%prep
|
||||
%setup -q
|
||||
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/
|
||||
@ -153,7 +150,7 @@ ln -sf $(build-classpath testng-jdk15) lib/integration/
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%if %without integration
|
||||
%patch2 -p1
|
||||
#%patch2 -p1
|
||||
%endif
|
||||
|
||||
perl -pi -e 's/\r$//g' LICENSE.txt
|
||||
@ -161,11 +158,7 @@ perl -pi -e 's/\r$//g' LICENSE.txt
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath qdox)
|
||||
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
|
||||
%endif
|
||||
|
||||
# inject OSGi manifests
|
||||
mkdir -p META-INF
|
||||
@ -234,9 +227,6 @@ cp -pr build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
|
||||
# demo
|
||||
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}/
|
||||
|
||||
%files
|
||||
@ -263,6 +253,9 @@ cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%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
|
||||
- Add OSGi metadata to hamcrest-integration.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user