packages java-mockmaker.spec
      Pages: < 1 >  DOWNLOAD      
Name:          java-mockmaker
Version:       1.12.0
Release:       2mamba
Summary:       a program for automatically creating source code for mock object
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://mockmaker.sourceforge.net/
# cvs -d:pserver:anonymous@...:/cvsroot/mockmaker login
# cvs -z3 -d:pserver:anonymous@...:/cvsroot/mockmaker co -P MockMaker
Source0:       MockMaker-%{version}-src-cvs.tar.gz
Source1:       mockmaker-script
Source2:       mmmockobjects-%{version}.pom
Patch0:        java-mockmaker-1.12.0-build_xml.patch
License:       BSD, MIT
BuildRequires: apache-ant
BuildRequires: java-junit3
BuildRequires: java-qdox16
BuildRequires: java-mockobjects
Requires:      java-mockobjects
Requires:      java-qdox16
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
MockMaker is a program for automatically creating source
code for mock object. MockObjects can be used in
automated Unit testing. See also www.Junit.org and
www.mockobjects.com

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
MockMaker is a program for automatically creating source
code for mock object. MockObjects can be used in
automated Unit testing. See also www.Junit.org and
www.mockobjects.com

This package contains javadoc for %{name}.

%prep

%setup -q -n MockMaker
chmod -R go=u-w *

%patch0 -p1

for j in $(find . -name "*.jar"); do
     mv $j $j.no
done

pushd lib
   	ln -sf $(build-classpath ant-1.7.1) ant.jar
   	ln -sf $(build-classpath junit-3.8.2) junit.jar
   	ln -sf $(build-classpath mockobjects-core) mmmockobjects.jar
   	ln -sf $(build-classpath qdox16) qdox.jar
popd

%build

ant

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
unzip -q MockMaker1_12_0.zip

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -m 644 MockMaker/lib/MockMaker.jar \
	%{buildroot}%{_javadir}/mockmaker-%{version}.jar

install -pm 644 %{SOURCE2} %{buildroot}%{_datadir}/maven2/poms/JPP-mockmaker.pom
%add_to_maven_depmap mockmaker mmmockobjects %{version} JPP mockmaker

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}*; do
		ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`
	done
)

mkdir -p %{buildroot}%{_datadir}/mockmaker
mkdir -p %{buildroot}%{_datadir}/mockmaker/config
install -m 644 MockMaker/mockmaker.cfg %{buildroot}%{_datadir}/mockmaker/config
install -m 644 MockMaker/old.cfg %{buildroot}%{_datadir}/mockmaker/config
mkdir -p %{buildroot}%{_datadir}/mockmaker/tests
install -m 644 MockMaker/mockmaker/tests/AcceptableInterface.class \
	%{buildroot}%{_datadir}/mockmaker/tests

mkdir -p %{buildroot}%{_bindir}
install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/mockmaker

mkdir -p %{buildroot}%{_javadocdir}/mockmaker-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/mockmaker-%{version}
ln -s mockmaker-%{version} %{buildroot}%{_javadocdir}/mockmaker

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_bindir}/mockmaker
%{_javadir}/mockmaker-%{version}.jar
%{_javadir}/mockmaker.jar
%{_datadir}/mockmaker
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc MockMaker/*.html

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/mockmaker-%{version}
%{_javadocdir}/mockmaker

%changelog
* Sun Dec 19 2010 gil <puntogil@...> 1.12.0-2mamba
- ... add a changelog entry

* Tue Jun 30 2009 gil <puntogil@...> 1.12.0-1mamba
- package created by autospec