8d912b
8d912b
%global base_name  logging
8d912b
%global short_name commons-%{base_name}
8d912b
8d912b
Name:           apache-%{short_name}
8d912b
Version:        1.1.2
8d912b
Release:        7%{?dist}
8d912b
Summary:        Apache Commons Logging
8d912b
License:        ASL 2.0
8d912b
Group:          Development/Libraries
8d912b
URL:            http://commons.apache.org/%{base_name}
8d912b
Source0:        http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
8d912b
Source2:        http://mirrors.ibiblio.org/pub/mirrors/maven2/%{short_name}/%{short_name}-api/1.1/%{short_name}-api-1.1.pom
8d912b
8d912b
BuildArch:      noarch
8d912b
BuildRequires:  maven-local
8d912b
BuildRequires:  java-devel >= 1:1.6.0
8d912b
BuildRequires:  jpackage-utils >= 0:1.6
8d912b
BuildRequires:  avalon-framework >= 4.3
8d912b
BuildRequires:  avalon-logkit
8d912b
BuildRequires:  apache-commons-parent >= 26-7
8d912b
BuildRequires:  maven-dependency-plugin
8d912b
BuildRequires:  maven-failsafe-plugin
8d912b
BuildRequires:  maven-plugin-build-helper
8d912b
BuildRequires:  maven-release-plugin
8d912b
BuildRequires:  maven-site-plugin
8d912b
BuildRequires:  maven-resources-plugin
8d912b
BuildRequires:  servlet
8d912b
8d912b
# This should go away with F-17
8d912b
Provides:       jakarta-%{short_name} = 0:%{version}-%{release}
8d912b
Obsoletes:      jakarta-%{short_name} <= 0:1.0.4
8d912b
8d912b
%description
8d912b
The commons-logging package provides a simple, component oriented
8d912b
interface (org.apache.commons.logging.Log) together with wrappers for
8d912b
logging systems. The user can choose at runtime which system they want
8d912b
to use. In addition, a small number of basic implementations are
8d912b
provided to allow users to use the package standalone.
8d912b
commons-logging was heavily influenced by Avalon's Logkit and Log4J. The
8d912b
commons-logging abstraction is meant to minimize the differences between
8d912b
the two, and to allow a developer to not tie himself to a particular
8d912b
logging implementation.
8d912b
8d912b
%package        javadoc
8d912b
Summary:        API documentation for %{name}
8d912b
Group:          Documentation
8d912b
8d912b
Obsoletes:      jakarta-%{short_name}-javadoc <= 0:1.0.4
8d912b
8d912b
%description    javadoc
8d912b
%{summary}.
8d912b
8d912b
# -----------------------------------------------------------------------------
8d912b
8d912b
%prep
8d912b
%setup -q -n %{short_name}-%{version}-src
8d912b
8d912b
# SecurityAllowedTestCase fails, probably due to environmental hazard
8d912b
# See: rhbz#1056462, https://issues.apache.org/jira/browse/LOGGING-156
8d912b
find -name SecurityAllowedTestCase.java -delete
8d912b
8d912b
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
8d912b
%pom_remove_dep :avalon-framework
8d912b
%pom_add_dep avalon-framework:avalon-framework-api:4.3
8d912b
%pom_add_dep avalon-framework:avalon-framework-impl:4.3:test
8d912b
8d912b
%pom_remove_plugin :cobertura-maven-plugin
8d912b
%pom_remove_plugin :maven-scm-publish-plugin
8d912b
8d912b
# Upstream is changing Maven groupID and OSGi Bundle-SymbolicName back
8d912b
# and forth, even between minor releases (such as 1.1.1 and 1.1.2).
8d912b
# In case of Maven we can provide an alias, so that's not a big
8d912b
# problem.  But there is no alias mechanism for OSGi bundle names.
8d912b
#
8d912b
# I'll use Bundle-SymbolicName equal to "org.apache.commons.logging"
8d912b
# because that's what upstream decided to use in future and because
8d912b
# that's what most of Eclipse plugin are already using.  See also
8d912b
# rhbz#949842 and LOGGING-151.  mizdebsk, 9 Apr 2013
8d912b
%pom_xpath_set pom:commons.osgi.symbolicName org.apache.commons.logging
8d912b
8d912b
sed -i 's/\r//' RELEASE-NOTES.txt LICENSE.txt NOTICE.txt
8d912b
8d912b
%mvn_file ":%{short_name}{*}" "%{short_name}@1" "%{name}@1"
8d912b
%mvn_alias ":%{short_name}{*}" "org.apache.commons:%{short_name}@1"
8d912b
8d912b
%build
8d912b
%mvn_build
8d912b
8d912b
# -----------------------------------------------------------------------------
8d912b
8d912b
%install
8d912b
%mvn_install
8d912b
8d912b
install -p -m 644 target/%{short_name}-api-%{version}.jar %{buildroot}/%{_javadir}/%{name}-api.jar
8d912b
install -p -m 644 target/%{short_name}-adapters-%{version}.jar %{buildroot}/%{_javadir}/%{name}-adapters.jar
8d912b
8d912b
pushd %{buildroot}/%{_javadir}
8d912b
for jar in %{name}-*; do
8d912b
    ln -sf ${jar} `echo ${jar}| sed "s|apache-||g"`
8d912b
done
8d912b
popd
8d912b
8d912b
install -pm 644 %{SOURCE2} %{buildroot}/%{_mavenpomdir}/JPP-%{short_name}-api.pom
8d912b
8d912b
%add_maven_depmap JPP-%{short_name}-api.pom %{short_name}-api.jar -a "org.apache.commons:commons-logging-api"
8d912b
8d912b
%files -f .mfiles
8d912b
%doc LICENSE.txt NOTICE.txt
8d912b
%doc PROPOSAL.html RELEASE-NOTES.txt
8d912b
%{_javadir}/*%{short_name}-api.jar
8d912b
%{_javadir}/*%{short_name}-adapters.jar
8d912b
8d912b
%files javadoc -f .mfiles-javadoc
8d912b
%doc LICENSE.txt NOTICE.txt
8d912b
8d912b
# -----------------------------------------------------------------------------
8d912b
8d912b
%changelog
8d912b
* Mon Jan 27 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-7
8d912b
- Remove unit test as a workaround for upstream bug LOGGING-156
8d912b
- Resolves: rhbz#1056462
8d912b
8d912b
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.1.2-6
8d912b
- Mass rebuild 2013-12-27
8d912b
8d912b
* Fri Sep 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-5
8d912b
- Add BuildRequires on apache-commons-parent >= 26-7
8d912b
8d912b
* Tue Aug 27 2013 Michal Srb <msrb@redhat.com> - 1.1.2-4
8d912b
- Migrate away from mvn-rpmbuild (Resolves: #997523)
8d912b
8d912b
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-3
8d912b
- Rebuild to regenerate API documentation
8d912b
- Resolves: CVE-2013-1571
8d912b
8d912b
* Tue Apr  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-2
8d912b
- Set OSGi Bundle-SymbolicName to org.apache.commons.logging
8d912b
- Resolves: rhbz#949842
8d912b
8d912b
* Mon Apr  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.2-1
8d912b
- Update to upstream version 1.1.2
8d912b
- Convert POM to POM macros
8d912b
- Remove OSGi manifest patch; fixed upstream
8d912b
8d912b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-23
8d912b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8d912b
8d912b
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.1.1-22
8d912b
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
8d912b
- Replace maven BuildRequires with maven-local
8d912b
8d912b
* Thu Nov 22 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.1-21
8d912b
- Install NOTICE file
8d912b
- Resolves: rhbz#879581
8d912b
8d912b
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-20
8d912b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8d912b
8d912b
* Tue May 1 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-19
8d912b
- Bring back jakarta-commons-logging provides/obsoletes - the comment was misleading.
8d912b
8d912b
* Mon Apr 30 2012 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-18
8d912b
- Fix build with latest libs.
8d912b
- Adapt to current guidelines.
8d912b
8d912b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-17
8d912b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8d912b
8d912b
* Thu Apr 21 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-16
8d912b
- Build with maven 3
8d912b
- Fix build for avalon-framework
8d912b
8d912b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-15
8d912b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8d912b
8d912b
* Thu Dec 16 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-14
8d912b
- Bring back commons-logging* symlinks.
8d912b
8d912b
* Thu Dec 16 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-13
8d912b
- Replace tomcat6 BR with servlet25 only
8d912b
- Cleanups according to new packaging guidelines
8d912b
- Install maven metadata for -api jar
8d912b
- Versionless jars/javadocs
8d912b
8d912b
* Tue Nov  9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-12
8d912b
- Add depmaps for api and adapters subpackages
8d912b
- Use apache-commons-parent BR instead of maven-*
8d912b
- Replace tomcat5 BR with tomcat6
8d912b
- Reenable tests
8d912b
8d912b
* Thu Jul  8 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-11
8d912b
- Add license to javadoc subpackage
8d912b
8d912b
* Wed Jun 9 2010 Alexander Kurtakov <akurtako@redhat.com> 1.1.1-10
8d912b
- Add osgi manifest entries.
8d912b
8d912b
* Fri May 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-9
8d912b
- Correct depmap filename for backward compatibility
8d912b
8d912b
* Mon May 17 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-8
8d912b
- Fix wrong depmap JPP name to short_name
8d912b
- Add obsoletes to javadoc subpackage
8d912b
8d912b
* Wed May 12 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-7
8d912b
- Fix symlink problems introduced previously in r5
8d912b
8d912b
* Tue May 11 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-6
8d912b
- Add one more add_to_maven_depmap for backward compatibility
8d912b
8d912b
* Mon May 10 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-5
8d912b
- Fix up add_to_maven_depmap
8d912b
- Add jpackage-utils Requires for javadoc
8d912b
- Cleanup install a bit
8d912b
8d912b
* Fri May  7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-4
8d912b
- Fix provides
8d912b
8d912b
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-3
8d912b
- Revert to using default permissions
8d912b
- Drop "Package" from summary, improve javadoc summary text
8d912b
8d912b
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-2
8d912b
- Fix EOLs on docs
8d912b
- Create javadoc symlinks during install
8d912b
- Use version macro in Source0 URL, use _mavenpomdir macro
8d912b
8d912b
* Thu May  6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.1-1
8d912b
- Rename and rebase from jakarta-commons-logging