Blame SPECS/easymock2.spec

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