Blame SPECS/easymock2.spec

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