%global pkg_name easymock2
%{?scl:%scl_package %{pkg_name}}
%{?java_common_find_provides_and_requires}
Name: %{?scl_prefix}%{pkg_name}
Version: 2.5.2
Release: 12.15%{?dist}
Summary: Easy mock objects
License: ASL 2.0
URL: http://easymock.org/
# generated by sh fetch-easymock.sh
Source0: easymock-%{version}.tgz
# extracted from http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/org.easymock_2.4.0.v20090202-0900.jar#META-INF/MANIFEST.MF
Source1: easymock-MANIFEST.MF
# generated by mvn ant:ant
Source2: build.xml.tar.gz
Source3: fetch-easymock.sh
Patch0: easymock2-nameClash.patch
BuildRequires: %{?scl_prefix}javapackages-tools
BuildRequires: %{?scl_prefix}ant >= 0:1.6
BuildRequires: %{?scl_prefix}junit >= 3.8.1
BuildRequires: zip
BuildArch: noarch
Requires: %{?scl_prefix}javapackages-tools >= 0:1.7.2
%description
EasyMock provides Mock Objects for interfaces in JUnit tests by generating
them on the fly using Java's proxy mechanism. Due to EasyMock's unique style
of recording expectations, most refactorings will not affect the Mock Objects.
So EasyMock is a perfect fit for Test-Driven Development.
%package javadoc
Summary: Javadoc for %{pkg_name}
%description javadoc
Javadoc for %{pkg_name}.
%prep
%setup -q -n easymock
%{?scl:scl enable %{scl_maven} %{scl} - <<"EOF"}
set -e -x
%patch0 -p2
mkdir -p .m2/repository/JPP/maven2/default_poms
tar xzf %{SOURCE2}
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%{?scl:EOF}
%build
%{?scl:scl enable %{scl_maven} %{scl} - <<"EOF"}
set -e -x
ant -Dmaven.mode.offline=true -Dmaven.repo.local=.m2 -Dmaven.test.skip=true package javadoc
mv target/easymock-2.5.jar target/%{pkg_name}-%{version}.jar
# inject OSGi manifests
mkdir -p META-INF
cp -p %{SOURCE1} META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u target/%{pkg_name}-%{version}.jar META-INF/MANIFEST.MF
%{?scl:EOF}
%install
%{?scl:scl enable %{scl_maven} %{scl} - <<"EOF"}
set -e -x
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 target/%{pkg_name}-%{version}.jar \
%{buildroot}%{_javadir}/%{pkg_name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{pkg_name}.pom
%add_maven_depmap -v 2.4,2.5.2
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%{?scl:EOF}
%files -f .mfiles
%doc LICENSE.txt
%files javadoc
%doc LICENSE.txt
%doc %{_javadocdir}/*
%changelog
* Tue Jan 13 2015 Michael Simacek <msimacek@redhat.com> - 2.5.2-12.15
- Mass rebuild 2015-01-13
* Fri Jan 9 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.14
- Add compat version 2.5.2
* Fri Jan 09 2015 Michal Srb <msrb@redhat.com> - 2.5.2-12.13
- Mass rebuild 2015-01-09
* Wed Jan 07 2015 Michal Srb <msrb@redhat.com> - 2.5.2-12.12
- Migrate to .mfiles
* Tue Dec 16 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.11
- Migrate requires and build-requires to rh-java-common
* Mon Dec 15 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.10
- Mass rebuild 2014-12-15
* Mon Dec 15 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.9
- Rebuild for rh-java-common collection
* Mon Jun 2 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.8
- Install javadocs to unversioned directory
* Mon May 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.7
- Mass rebuild 2014-05-26
* Wed Feb 19 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.6
- Mass rebuild 2014-02-19
* Tue Feb 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.5
- Mass rebuild 2014-02-18
* Tue Feb 18 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.4
- Remove requires on java
* Mon Feb 17 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.3
- SCL-ize build-requires
* Thu Feb 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.2
- Rebuild to regenerate auto-requires
* Tue Feb 11 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-12.1
- First maven30 software collection build
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.5.2-12
- Mass rebuild 2013-12-27
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-11
- Rebuild to regenerate API documentation
- Resolves: CVE-2013-1571
* Fri May 31 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-10
- Convert to a compat package
- Resolves: rhbz#969376
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Aug 16 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.2-8
- Install LICENSE with javadoc package
- Don't own _mavendepmapfragdir
- Install POM in _mavenpomdir instead of _datadir/maven2/poms
- Update to current packaging guidelines
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Feb 23 2012 Jiri Vanek <jvanek@redhat.com> - 2.5.2-6
- Fixed for JDK7 - https://fedoraproject.org/wiki/Java7_Package_Rebuild_Status
- Added and aplied patch0, easymock2-nameClash.patch.
This patch is removing (in easymock3 deprecated) methods, and is keeping new
easymock3 api in EasyMock.java for capture set of methods.
Old methods cant be kept as deprecated as JDK7 can not compile them.
Test was derived from easymock3' one too.
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 8 2010 Alexander Kurtakov <akurtako@redhat.com> 2.5.2-3
- BR zip.
- Don't install versioned jar.
- Use standard file permissions.
* Wed Jul 21 2010 Alexander Kurtakov <akurtako@redhat.com> 2.5.2-2
- Fix maven depmap.
* Fri Jan 15 2010 Alexander Kurtakov <akurtako@redhat.com> 2.5.2-1
- Update to upstream 2.5.2.
- Now under ASL 2.0 license.
* Wed Oct 21 2009 Alexander Kurtakov <akurtako@redhat.com> 2.5-4
- Fix empty jar. Bug #530110.
* Mon Aug 17 2009 Alexander Kurtakov <akurtako@redhat.com> 2.5-3
- Renamed to easymock2.
* Mon Aug 17 2009 Alexander Kurtakov <akurtako@redhat.com> 2.5-2
- Use %%{buildroot} instead of $RPM_BUILD_ROOT.
- Add comment for MANIFEST.MF origin.
* Fri Aug 14 2009 Alexander Kurtakov <akurtako@redhat.com> 2.5-1
- Initial package.