Blame SPECS/mockito.spec

60961a
%{?scl:%scl_package mockito}
60961a
%{!?scl:%global pkg_name %{name}}
60961a
60961a
Name:           %{?scl_prefix}mockito
60961a
Version:        1.10.19
60961a
Release:        12.2%{?dist}
60961a
Summary:        A Java mocking framework
60961a
60961a
License:        MIT
60961a
URL:            http://%{pkg_name}.org
60961a
Source0:        %{pkg_name}-%{version}.tar.xz
60961a
Source1:        make-%{pkg_name}-sourcetarball.sh
60961a
Patch0:         fixup-ant-script.patch
60961a
Patch1:         fix-bnd-config.patch
60961a
Patch2:         %{pkg_name}-matcher.patch
60961a
# Workaround for NPE in setting NamingPolicy in cglib
60961a
Patch3:         setting-naming-policy.patch
60961a
# because we have old objenesis
60961a
Patch4:         fix-incompatible-types.patch
60961a
60961a
BuildArch:      noarch
60961a
BuildRequires:  %{?scl_prefix}javapackages-local
60961a
BuildRequires:  java-devel
60961a
BuildRequires:  %{?scl_prefix}ant
60961a
BuildRequires:  %{?scl_prefix}objenesis
60961a
BuildRequires:  %{?scl_prefix}cglib
60961a
BuildRequires:  %{?scl_prefix}junit
60961a
BuildRequires:  %{?scl_prefix}hamcrest
60961a
BuildRequires:  %{?scl_prefix}aqute-bnd
60961a
60961a
Requires:       %{?scl_prefix}objenesis
60961a
Requires:       %{?scl_prefix}cglib
60961a
Requires:       %{?scl_prefix}junit
60961a
Requires:       %{?scl_prefix}hamcrest
60961a
60961a
%description
60961a
Mockito is a mocking framework that tastes really good. It lets you write
60961a
beautiful tests with clean & simple API. Mockito doesn't give you hangover
60961a
because the tests are very readable and they produce clean verification
60961a
errors.
60961a
60961a
%package javadoc
60961a
Summary:        Javadocs for %{pkg_name}
60961a
60961a
%description javadoc
60961a
This package contains the API documentation for %{pkg_name}.
60961a
60961a
%prep
60961a
%setup -n %{pkg_name}-%{version} -q
60961a
%patch0
60961a
%patch1
60961a
%patch2 -p1
60961a
%patch3 -p1
60961a
%patch4 -p1
60961a
# workaround rhbz#1292777 Files not found for javadoc generation
60961a
touch javadoc/stylesheet.css
60961a
60961a
%pom_add_dep net.sf.cglib:cglib:3.1 maven/mockito-core.pom
60961a
find . -name "*.java" -exec sed -i "s|org\.%{pkg_name}\.cglib|net\.sf\.cglib|g" {} +
60961a
mkdir -p lib/compile
60961a
60961a
%build
60961a
build-jar-repository lib/compile objenesis cglib junit hamcrest/core
60961a
ant jar javadoc
60961a
60961a
# Convert to OSGi bundle
60961a
pushd target
60961a
bnd wrap \
60961a
 --version %{version} \
60961a
 --output %{pkg_name}-core-%{version}.bar \
60961a
 --properties ../conf/%{pkg_name}-core.bnd \
60961a
 %{pkg_name}-core-%{version}.jar
60961a
mv %{pkg_name}-core-%{version}.bar %{pkg_name}-core-%{version}.jar
60961a
60961a
# Explicit Require-Bundle on hamcrest
60961a
unzip mockito-core-%{version}.jar META-INF/MANIFEST.MF
60961a
sed -i -e '2iRequire-Bundle: org.hamcrest.core' META-INF/MANIFEST.MF
60961a
jar umf META-INF/MANIFEST.MF mockito-core-%{version}.jar
60961a
popd
60961a
60961a
sed -i -e "s|@version@|%{version}|g" maven/%{pkg_name}-core.pom
60961a
%mvn_artifact maven/%{pkg_name}-core.pom target/%{pkg_name}-core-%{version}.jar
60961a
%mvn_alias org.%{pkg_name}:%{pkg_name}-core org.%{pkg_name}:%{pkg_name}-all
60961a
60961a
%install
60961a
%mvn_install -J target/javadoc
60961a
60961a
%files -f .mfiles
60961a
%license LICENSE NOTICE
60961a
60961a
%files javadoc -f .mfiles-javadoc
60961a
%license LICENSE NOTICE
60961a
60961a
%changelog
60961a
* Thu Jun 22 2017 Michael Simacek <msimacek@redhat.com> - 1.10.19-12.2
60961a
- Mass rebuild 2017-06-22
60961a
60961a
* Wed Jun 21 2017 Java Maintainers <java-maint@redhat.com> - 1.10.19-12.1
60961a
- Automated package import and SCL-ization
60961a
60961a
* Thu Feb 16 2017 Michael Simacek <msimacek@redhat.com> - 1.10.19-12
60961a
- Remove conditional for EOL Fedora
60961a
60961a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.19-11
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
60961a
60961a
* Mon Feb 22 2016 Mat Booth <mat.booth@redhat.com> - 1.10.19-10
60961a
- Explicitly import more cglib packages in OSGi metadata to prevent mockito
60961a
  failing under certain circumstances during Eclipse test suites
60961a
60961a
* Fri Feb 12 2016 Mat Booth <mat.booth@redhat.com> - 1.10.19-9
60961a
- Require hamcrest explicitly in OSGi metadata
60961a
60961a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.19-8
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
60961a
60961a
* Fri Dec 25 2015 Raphael Groner <projects.rg@smart.ms> - 1.10.19-7
60961a
- introduce License tag
60961a
60961a
* Fri Dec 25 2015 Raphael Groner <projects.rg@smart.ms> - 1.10.19-6
60961a
- reenable osgi
60961a
60961a
* Fri Dec 18 2015 Raphael Groner <projects.rg@smart.ms> - 1.10.19-5
60961a
- workaround rhbz#1292777 stylesheet.css not found
60961a
60961a
* Thu Jul 16 2015 Michael Simacek <msimacek@redhat.com> - 1.10.19-4
60961a
- Use aqute-bnd-2.4.1
60961a
60961a
* Mon Jun 22 2015 Mat Booth <mat.booth@redhat.com> - 1.10.19-3
60961a
- Switch to mvn_install
60961a
60961a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.19-2
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
60961a
60961a
* Wed Apr 29 2015 Michal Srb <msrb@redhat.com> - 1.10.19-1
60961a
- Update to 1.10.19
60961a
60961a
* Mon Aug 25 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.9.0-18
60961a
- First build for EPEL7
60961a
- Resolves: BZ#1110030
60961a
60961a
* Mon Jun 09 2014 Omair Majid <omajid@redhat.com> - 1.9.0-17
60961a
- Use .mfiles to pick up xmvn metadata
60961a
- Don't use obsolete _mavenpomdir and _mavendepmapfragdir macros
60961a
- Fix FTBFS
60961a
60961a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-17
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
60961a
60961a
* Thu May 22 2014 Severin Gehwolf <sgehwolf@redhat.com> - 1.9.0-16
60961a
- Use junit R/BR over junit4.
60961a
60961a
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 1.9.0-15
60961a
- Use Requires: java-headless rebuild (#1067528)
60961a
60961a
* Wed Dec 11 2013 Michael Simacek <msimacek@redhat.com> - 1.9.0-14
60961a
- Workaround for NPE in setting NamingPolicy
60961a
60961a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-13
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
60961a
60961a
* Mon Mar 25 2013 Tomas Radej <tradej@redhat.com> - 1.9.0-12
60961a
- Patched LocalizedMatcher due to hamcrest update, (bug upstream)
60961a
60961a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-11
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
60961a
60961a
* Thu Sep 6 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.9.0-10
60961a
- More Import-Package fixes. Note that fix-cglib-refs.patch is
60961a
  not suitable for upstream: issue id=373
60961a
60961a
* Tue Sep 4 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.9.0-9
60961a
- Fix missing Import-Package in manifest.
60961a
60961a
* Mon Aug 27 2012 Severin Gehwolf <sgehwolf@redhat.com> 1.9.0-8
60961a
- Add aqute bnd instructions for OSGi metadata
60961a
60961a
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-7
60961a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
60961a
60961a
* Mon Apr 30 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-6
60961a
- Place JavaDoc in directly under %{_javadocdir}/%{pkg_name} instead
60961a
  of %{_javadocdir}/%{pkg_name}/javadoc
60961a
60961a
* Wed Apr 25 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-5
60961a
- Removed post/postun hook for update_maven_depmap
60961a
60961a
* Tue Apr 24 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-4
60961a
- Fix groupId of cglib dependency
60961a
- Add additional depmap for mockito-all
60961a
- Update depmap on post and postun
60961a
- Fix version in pom
60961a
60961a
* Wed Feb 22 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-3
60961a
- Added cglib dependency to pom
60961a
60961a
* Tue Feb 21 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-2
60961a
- Include upstream Maven pom.xml in package
60961a
- Added missing Requires for cglib, junit4, hamcrest, objenesis
60961a
- Added source tarball generating script to sources
60961a
60961a
* Thu Feb 16 2012 Roman Kennke <rkennke@redhat.com> 1.9.0-1
60961a
- Initial package