5a6092
# Copyright (c) 2000-2009, JPackage Project
5a6092
# All rights reserved.
5a6092
#
5a6092
# Redistribution and use in source and binary forms, with or without
5a6092
# modification, are permitted provided that the following conditions
5a6092
# are met:
5a6092
#
5a6092
# 1. Redistributions of source code must retain the above copyright
5a6092
#    notice, this list of conditions and the following disclaimer.
5a6092
# 2. Redistributions in binary form must reproduce the above copyright
5a6092
#    notice, this list of conditions and the following disclaimer in the
5a6092
#    documentation and/or other materials provided with the
5a6092
#    distribution.
5a6092
# 3. Neither the name of the JPackage Project nor the names of its
5a6092
#    contributors may be used to endorse or promote products derived
5a6092
#    from this software without specific prior written permission.
5a6092
#
5a6092
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5a6092
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5a6092
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5a6092
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5a6092
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5a6092
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5a6092
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5a6092
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5a6092
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5a6092
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5a6092
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5a6092
#
5a6092
5a6092
Name:           slf4j
5a6092
Version:        1.7.4
5a6092
Release:        2%{?dist}
5a6092
Epoch:          0
5a6092
Summary:        Simple Logging Facade for Java
5a6092
Group:          Development/Libraries
5a6092
# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT
5a6092
License:        MIT and ASL 2.0
5a6092
URL:            http://www.slf4j.org/
5a6092
Source0:        http://www.slf4j.org/dist/%{name}-%{version}.tar.gz
5a6092
Source1:        http://www.apache.org/licenses/LICENSE-2.0.txt
5a6092
BuildArch:      noarch
5a6092
5a6092
BuildRequires:  jpackage-utils >= 0:1.7.5
5a6092
BuildRequires:  java-devel >= 0:1.5.0
5a6092
BuildRequires:  ant >= 0:1.6.5
5a6092
BuildRequires:  ant-junit >= 0:1.6.5
5a6092
BuildRequires:  javassist >= 0:3.4
5a6092
BuildRequires:  junit >= 0:3.8.2
5a6092
BuildRequires:  maven-local
5a6092
BuildRequires:  maven-antrun-plugin
5a6092
BuildRequires:  maven-compiler-plugin
5a6092
BuildRequires:  maven-install-plugin
5a6092
BuildRequires:  maven-jar-plugin
5a6092
BuildRequires:  maven-javadoc-plugin
5a6092
BuildRequires:  maven-resources-plugin
5a6092
BuildRequires:  maven-source-plugin
5a6092
BuildRequires:  maven-site-plugin
5a6092
BuildRequires:  maven-doxia-sitetools
5a6092
BuildRequires:  maven-surefire-plugin
5a6092
BuildRequires:  maven-surefire-provider-junit
5a6092
BuildRequires:  maven-plugin-build-helper
5a6092
BuildRequires:  log4j
5a6092
BuildRequires:  apache-commons-logging
5a6092
BuildRequires:  cal10n
5a6092
5a6092
%description
5a6092
The Simple Logging Facade for Java or (SLF4J) is intended to serve
5a6092
as a simple facade for various logging APIs allowing to the end-user
5a6092
to plug in the desired implementation at deployment time. SLF4J also
5a6092
allows for a gradual migration path away from
5a6092
Jakarta Commons Logging (JCL).
5a6092
5a6092
Logging API implementations can either choose to implement the
5a6092
SLF4J interfaces directly, e.g. NLOG4J or SimpleLogger. Alternatively,
5a6092
it is possible (and rather easy) to write SLF4J adapters for the given
5a6092
API implementation, e.g. Log4jLoggerAdapter or JDK14LoggerAdapter..
5a6092
5a6092
%package javadoc
5a6092
Group:          Documentation
5a6092
Summary:        API documentation for %{name}
5a6092
5a6092
%description javadoc
5a6092
This package provides %{summary}.
5a6092
5a6092
%package manual
5a6092
Group:          Documentation
5a6092
Summary:        Manual for %{name}
5a6092
5a6092
%description manual
5a6092
This package provides documentation for %{name}.
5a6092
5a6092
%prep
5a6092
%setup -q
5a6092
find . -name "*.jar" | xargs rm
5a6092
cp -p %{SOURCE1} APACHE-LICENSE
5a6092
5a6092
%pom_disable_module integration
5a6092
%pom_disable_module osgi-over-slf4j
5a6092
%pom_remove_plugin :maven-source-plugin
5a6092
5a6092
# Because of a non-ASCII comment in slf4j-api/src/main/java/org/slf4j/helpers/MessageFormatter.java
5a6092
%pom_xpath_inject "pom:project/pom:properties" "
5a6092
    <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>"
5a6092
5a6092
# Fix javadoc links
5a6092
%pom_xpath_remove "pom:links"
5a6092
%pom_xpath_inject "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration" "
5a6092
    <detectJavaApiLink>false</detectJavaApiLink>
5a6092
    <isOffline>false</isOffline>
5a6092
    <links><link>/usr/share/javadoc/java</link></links>"
5a6092
5a6092
# dos2unix
5a6092
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
5a6092
    %{_bindir}/xargs -t %{__perl} -pi -e 's/\r$//g'
5a6092
5a6092
# The general pattern is that the API package exports API classes and does
5a6092
# not require impl classes. slf4j was breaking that causing "A cycle was
5a6092
# detected when generating the classpath slf4j.api, slf4j.nop, slf4j.api."
5a6092
# The API bundle requires impl package, so to avoid cyclic dependencies
5a6092
# during build time, it is necessary to mark the imported package as an
5a6092
# optional one.
5a6092
# Reported upstream: http://bugzilla.slf4j.org/show_bug.cgi?id=283
5a6092
sed -i "/Import-Package/s/.$/;resolution:=optional&/" slf4j-api/src/main/resources/META-INF/MANIFEST.MF
5a6092
5a6092
%build
5a6092
%mvn_build -f
5a6092
5a6092
%install
5a6092
%mvn_install
5a6092
5a6092
# Compat symlinks
5a6092
(cd $RPM_BUILD_ROOT/%{_javadir}/%{name}; for jar in %{name}-*; do
5a6092
    ln -s $jar ${jar/%{name}-/}; done)
5a6092
5a6092
# manual
5a6092
install -d -m 0755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-manual-%{version}
5a6092
rm -rf target/site/{.htaccess,apidocs}
5a6092
cp -pr target/site/* $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-manual-%{version}
5a6092
5a6092
%files -f .mfiles
5a6092
%doc LICENSE.txt APACHE-LICENSE
5a6092
%{_javadir}/%{name}
5a6092
5a6092
%files javadoc -f .mfiles-javadoc
5a6092
%doc LICENSE.txt APACHE-LICENSE
5a6092
5a6092
%files manual
5a6092
%doc LICENSE.txt APACHE-LICENSE
5a6092
5a6092
%changelog
5a6092
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.4-2
5a6092
- Rebuild to regenerate API documentation
5a6092
- Resolves: CVE-2013-1571
5a6092
5a6092
* Wed Mar 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.4-1
5a6092
- Update to upstream version 1.7.4
5a6092
5a6092
* Fri Mar 15 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.3-1
5a6092
- Update to upstream version 1.7.3
5a6092
5a6092
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.7.2-9
5a6092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5a6092
5a6092
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 0:1.7.2-8
5a6092
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
5a6092
- Replace maven BuildRequires with maven-local
5a6092
5a6092
* Wed Jan  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-7
5a6092
- Fix install location of manual
5a6092
5a6092
* Tue Jan  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-6
5a6092
- Rebuild to generate maven provides
5a6092
5a6092
* Fri Nov 30 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-5
5a6092
- Build with xmvn
5a6092
5a6092
* Wed Nov 21 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-4
5a6092
- Install Apache license file
5a6092
- Resolves: rhbz#878996
5a6092
5a6092
* Thu Nov 15 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-3
5a6092
- Avoid cyclic OSGi dependencies
5a6092
5a6092
* Thu Nov 08 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0:1.7.2-2
5a6092
- Fix license to ASL 2.0 and MIT
5a6092
- Update to add_maven_depmap macro
5a6092
- Use generated .mfiles list
5a6092
- Small packaging cleanups
5a6092
5a6092
* Mon Oct 15 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.2-1
5a6092
- Update to upstream version 1.7.2
5a6092
5a6092
* Mon Sep 17 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.1-1
5a6092
- Update to upstream version 1.7.1
5a6092
5a6092
* Mon Sep 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.7.0-1
5a6092
- Update to upstream version 1.7.0
5a6092
5a6092
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.6-2
5a6092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5a6092
5a6092
* Wed Jul 11 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:1.6.6-1
5a6092
- Update to upstream version 1.6.6
5a6092
- Convert patches to POM macros
5a6092
5a6092
* Fri Jan 13 2012 Ville Skyttä <ville.skytta@iki.fi> - 0:1.6.1-5
5a6092
- Crosslink with local JDK API docs.
5a6092
5a6092
* Fri Jan 13 2012 Ville Skyttä <ville.skytta@iki.fi> - 0:1.6.1-4
5a6092
- Specify explicit source encoding to fix build with Java 1.7.
5a6092
- Remove no longer needed javadoc dir upgrade hack.
5a6092
5a6092
* Wed Jun 8 2011 Alexander Kurtakov <akurtako@redhat.com> 0:1.6.1-3
5a6092
- Build with maven 3.x.
5a6092
5a6092
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:1.6.1-2
5a6092
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5a6092
5a6092
* Tue Jan 25 2011 Alexander Kurtakov <akurtako@redhat.com> 0:1.6.1-1
5a6092
- Update to new upstream version.
5a6092
- Various guidelines fixes.
5a6092
5a6092
* Wed Sep 8 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.11-3
5a6092
- Add maven-site-pugin BR.
5a6092
- Use new package names.
5a6092
5a6092
* Wed Sep 8 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.11-2
5a6092
- Skip installing tests jar that is no longer produced.
5a6092
- Use javadoc aggregate.
5a6092
- Use mavenpomdir macro.
5a6092
5a6092
* Thu Feb 25 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.11-1
5a6092
- Update to 1.5.11.
5a6092
- Drop depmap and component info files.
5a6092
5a6092
* Wed Feb 10 2010 Mary Ellen Foster <mefoster at gmail.com> 0:1.5.10-5
5a6092
- Require cal10n
5a6092
5a6092
* Wed Feb 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.10-4
5a6092
- Fix javadoc files.
5a6092
5a6092
* Wed Feb 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.10-3
5a6092
- BR maven-plugin-build-helper.
5a6092
5a6092
* Wed Feb 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.10-2
5a6092
- BR cal10n.
5a6092
5a6092
* Wed Feb 10 2010 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.10-1
5a6092
- Update to upstream 1.5.10.
5a6092
5a6092
* Fri Sep 4 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.8-5
5a6092
- Skip tests.
5a6092
5a6092
* Wed Sep 2 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.8-4
5a6092
- Fix other line lenghts.
5a6092
5a6092
* Wed Sep 2 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.8-3
5a6092
- Fix permissions.
5a6092
- Fixed descriptions.
5a6092
- Fix file lengths.
5a6092
5a6092
* Wed Sep 2 2009 Alexander Kurtakov <akurtako@redhat.com> 0:1.5.8-2
5a6092
- Adapt for Fedora.
5a6092
5a6092
* Wed Jul 29 2009 Yong Yang <yyang@redhat.com> 0:1.5.8-1
5a6092
- 1.5.8
5a6092
- Replace slf4j-1.5.6-integration-tests-current-only.patch with
5a6092
  slf4j-1.5.8-skip-integration-tests.patch because of the failure of "testMatch"
5a6092
5a6092
* Fri Jun 12 2009 Ralph Apel <r.apel at r-apel.de> 0:1.5.6-2
5a6092
- Add -ext jar, depmap and pom
5a6092
- Save jcl104-over-slf4j as symlink
5a6092
5a6092
* Tue Feb 18 2009 David Walluck <dwalluck@redhat.com> 0:1.5.6-1
5a6092
- 1.5.6
5a6092
- add repolib
5a6092
- fix file eol
5a6092
- fix Release tag
5a6092
5a6092
* Fri Jul 18 2008 David Walluck <dwalluck@redhat.com> 0:1.5.2-2
5a6092
- use excalibur for avalon
5a6092
- remove javadoc scriptlets
5a6092
- GCJ fixes
5a6092
- fix maven directory ownership
5a6092
- fix -bc --short-circuit by moving some of %%build to %%prep
5a6092
5a6092
* Sun Jul 06 2008 Ralph Apel <r.apel at r-apel.de> 0:1.5.2-1.jpp5
5a6092
- 1.5.2
5a6092
5a6092
* Mon Feb 04 2008 Ralph Apel <r.apel at r-apel.de> 0:1.4.2-2jpp
5a6092
- Fix macro misprint
5a6092
- Add maven2-plugin BRs
5a6092
5a6092
* Wed Jul 18 2007 Ralph Apel <r.apel at r-apel.de> 0:1.4.2-1jpp
5a6092
- Upgrade to 1.4.2
5a6092
- Build with maven2
5a6092
- Add poms and depmap frags
5a6092
- Add gcj_support option
5a6092
5a6092
* Mon Jan 30 2006 Ralph Apel <r.apel at r-apel.de> 0:1.0-0.rc5.1jpp
5a6092
- First JPackage release.