%define javahome %{_jvmdir}/jdk Name: java-jmock1 Version: 1.2.0 Release: 3mamba Summary: Test Java code using mock objects Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://jmock.codehaus.org/ # svn export http://svn.codehaus.org/jmock/tags/1.2.0/ jmock-1.2.0.svn-src # tar czf jmock-1.2.0.svn-src.tar.gz jmock-1.2.0.svn-src Source0: jmock-%{version}.svn-src.tar.gz Patch0: java-jmock-1.2.0-AssertMo.patch Patch1: java-jmock-1.2.0-build_xml.patch License: Open Source ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END BuildRequires: apache-ant #BuildRequires: java-cglib21 #BuildRequires: java-junit3 BuildRequires: jpackage-utils #BuildRequires: objectweb-asm1 %description JMock is a library that supports test-driven development1 of Java2 code with mock objects3. Mock objects help you design and test the interactions between the objects in your programs. The jMock library: * makes it quick and easy to define mock objects, so you don't break the rhythm of programming. * lets you precisely specify the interactions between your objects, reducing the brittleness of your tests. * works well with the autocompletion and refactoring features of your IDE * plugs into your favourite test framework * is easy to extend. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc JMock is a library that supports test-driven development1 of Java2 code with mock objects3. Mock objects help you design and test the interactions between the objects in your programs. This package contains documentation for %{name}. %prep %setup -q -n jmock-%{version}.svn-src for j in $(find . -name "*.jar"); do mv $j $j.no done %patch0 -p0 -b .sav %patch1 -b .sav pushd lib ln -sf $(build-classpath junit-3.8.2) junit-3.8.1.jar ln -sf $(build-classpath cglib21-nodep) cglib-nodep-2.1_3.jar ln -sf $(build-classpath cglib21) cglib-2.1_3.jar popd %build export JAVA_HOME=%javahome %if "%{stage1}" != "1" export CLASSPATH=$(build-classpath cglib21 asm1/asm asm1/asm-util asm1/asm-tree asm1/asm-xml junit-3.8.2 ant/ant-junit):build/classes %else export CLASSPATH=$(build-classpath asm1/asm asm1/asm-util asm1/asm-tree asm1/asm-xml junit-3.8.2 ant/ant-junit):build/classes %endif ant package #-Dbuild.sysclasspath=only %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} install -pm 644 build/jmock-core-%{version}.jar \ %{buildroot}%{_javadir}/jmock1-%{version}.jar install -pm 644 build/jmock-cglib-%{version}.jar \ %{buildroot}%{_javadir}/jmock1-cglib-%{version}.jar install -pm 644 build/jmock-tests-%{version}.jar \ %{buildroot}%{_javadir}/jmock1-tests-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) mkdir -p %{buildroot}%{_javadocdir}/jmock-%{version} cp -pr build/javadoc-%{version}/* %{buildroot}%{_javadocdir}/jmock-%{version} ln -s jmock-%{version} %{buildroot}%{_javadocdir}/jmock #%{_bindir}/aot-compile-rpm %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_javadir}/jmock1-%{version}.jar %{_javadir}/jmock1-cglib-%{version}.jar %{_javadir}/jmock1-cglib.jar %{_javadir}/jmock1-tests-%{version}.jar %{_javadir}/jmock1-tests.jar %{_javadir}/jmock1.jar %files javadoc %defattr(-,root,root) %{_javadocdir}/jmock-%{version} %{_javadocdir}/jmock %changelog * Sat Mar 26 2011 gil 1.2.0-3mamba - rebuilt with java-openjdk support * Thu Nov 04 2010 gil 1.2.0-2mamba - rebuilt devel * Tue Mar 03 2009 gil 1.2.0-1mamba - package created by autospec