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