2012-05-14 14:21:48 +00:00
|
|
|
#
|
|
|
|
# spec file for package slf4j
|
|
|
|
#
|
2019-02-26 09:24:20 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-05-14 14:21:48 +00:00
|
|
|
# Copyright (c) 2000-2009, JPackage Project
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-15 14:53:05 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-05-14 14:21:48 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: slf4j
|
2018-10-22 10:45:14 +00:00
|
|
|
Version: 1.7.25
|
2015-10-23 08:56:41 +00:00
|
|
|
Release: 0
|
2012-05-14 14:21:48 +00:00
|
|
|
Summary: Simple Logging Facade for Java
|
2019-03-18 09:40:51 +00:00
|
|
|
# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT
|
|
|
|
License: MIT AND Apache-2.0
|
2012-05-14 14:21:48 +00:00
|
|
|
Group: Development/Libraries/Java
|
2018-10-15 14:53:05 +00:00
|
|
|
URL: http://www.slf4j.org/
|
2012-05-14 14:21:48 +00:00
|
|
|
Source0: http://www.slf4j.org/dist/%{name}-%{version}.tar.gz
|
2019-03-18 09:40:51 +00:00
|
|
|
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
|
|
Source2: build.xml.tar.bz2
|
2012-05-14 14:21:48 +00:00
|
|
|
Patch1: build-remove-slf4j_api-binder.patch
|
2017-10-11 09:09:14 +00:00
|
|
|
Patch2: slf4j-commons-lang3.patch
|
2018-05-18 09:30:58 +00:00
|
|
|
Patch3: slf4j-Disallow-EventData-deserialization-by-default.patch
|
2012-05-14 14:21:48 +00:00
|
|
|
BuildRequires: ant >= 1.6.5
|
|
|
|
BuildRequires: ant-junit >= 1.6.5
|
2017-10-11 09:09:14 +00:00
|
|
|
BuildRequires: apache-commons-lang3
|
2012-05-14 14:21:48 +00:00
|
|
|
BuildRequires: apache-commons-logging
|
|
|
|
BuildRequires: cal10n
|
|
|
|
BuildRequires: java-devel >= 1.5.0
|
2018-10-15 14:53:05 +00:00
|
|
|
BuildRequires: javapackages-local
|
2013-09-11 11:37:51 +00:00
|
|
|
BuildRequires: javapackages-tools
|
2012-05-14 14:21:48 +00:00
|
|
|
BuildRequires: javassist >= 3.4
|
|
|
|
BuildRequires: junit >= 3.8.2
|
2019-10-01 09:05:31 +00:00
|
|
|
BuildRequires: log4j12-mini
|
2012-05-14 14:21:48 +00:00
|
|
|
Requires: cal10n
|
|
|
|
Requires: java
|
2019-03-18 09:40:51 +00:00
|
|
|
# this is ugly hack, which creates package which requires the same,
|
2013-09-19 14:23:19 +00:00
|
|
|
# however slf4j is not splitted between -api and -impl, but pom files are modeled as it was
|
|
|
|
Provides: osgi(slf4j.api)
|
2017-05-19 16:48:36 +00:00
|
|
|
BuildArch: noarch
|
2012-05-14 14:21:48 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The Simple Logging Facade for Java or (SLF4J) is intended to serve
|
|
|
|
as a simple facade for various logging APIs allowing to the end-user
|
|
|
|
to plug in the desired implementation at deployment time. SLF4J also
|
|
|
|
allows for a gradual migration path away from
|
|
|
|
Jakarta Commons Logging (JCL).
|
|
|
|
|
|
|
|
Logging API implementations can either choose to implement the
|
|
|
|
SLF4J interfaces directly, e.g. NLOG4J or SimpleLogger. Alternatively,
|
|
|
|
it is possible (and rather easy) to write SLF4J adapters for the given
|
|
|
|
API implementation, e.g. Log4jLoggerAdapter or JDK14LoggerAdapter..
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
API documentation for %{name}.
|
|
|
|
|
|
|
|
%package manual
|
|
|
|
Summary: Documents for %{name}
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
Manual for %{name}.
|
|
|
|
|
2019-03-18 09:40:51 +00:00
|
|
|
%package jdk14
|
|
|
|
Summary: SLF4J JDK14 Binding
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description jdk14
|
|
|
|
SLF4J JDK14 Binding.
|
|
|
|
|
|
|
|
%package log4j12
|
|
|
|
Summary: SLF4J LOG4J-12 Binding
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description log4j12
|
|
|
|
SLF4J LOG4J-12 Binding.
|
|
|
|
|
|
|
|
%package jcl
|
|
|
|
Summary: SLF4J JCL Binding
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(commons-logging:commons-logging)
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description jcl
|
|
|
|
SLF4J JCL Binding.
|
|
|
|
|
|
|
|
%package ext
|
|
|
|
Summary: SLF4J Extensions Module
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description ext
|
|
|
|
Extensions to the SLF4J API.
|
|
|
|
|
|
|
|
%package -n jcl-over-slf4j
|
|
|
|
Summary: JCL 1.1.1 implemented over SLF4J
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description -n jcl-over-slf4j
|
|
|
|
JCL 1.1.1 implemented over SLF4J.
|
|
|
|
|
|
|
|
%package -n log4j-over-slf4j
|
|
|
|
Summary: Log4j implemented over SLF4J
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description -n log4j-over-slf4j
|
|
|
|
Log4j implemented over SLF4J.
|
|
|
|
|
|
|
|
%package -n jul-to-slf4j
|
|
|
|
Summary: JUL to SLF4J bridge
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.slf4j:slf4j-api) = %{version}
|
|
|
|
|
|
|
|
%description -n jul-to-slf4j
|
|
|
|
JUL to SLF4J bridge.
|
|
|
|
|
2012-05-14 14:21:48 +00:00
|
|
|
%prep
|
2019-03-18 09:40:51 +00:00
|
|
|
%setup -q -a2
|
2012-05-14 14:21:48 +00:00
|
|
|
%patch1 -p1
|
2017-10-11 09:09:14 +00:00
|
|
|
%patch2 -p1
|
2018-05-18 09:30:58 +00:00
|
|
|
%patch3 -p1
|
2012-05-14 14:21:48 +00:00
|
|
|
find . -name "*.jar" | xargs rm
|
2019-03-18 09:40:51 +00:00
|
|
|
cp -p %{SOURCE1} APACHE-LICENSE
|
2012-05-14 14:21:48 +00:00
|
|
|
|
|
|
|
sed -i -e "s|ant<|org.apache.ant<|g" integration/pom.xml
|
|
|
|
|
|
|
|
%{_bindir}/find -name "*.css" -o -name "*.js" -o -name "*.txt" | \
|
2017-05-19 16:48:36 +00:00
|
|
|
%{_bindir}/xargs -t perl -pi -e 's/\r$//g'
|
2012-05-14 14:21:48 +00:00
|
|
|
|
2019-03-19 05:32:35 +00:00
|
|
|
# Unexpanded variable in the manifests
|
2019-03-19 09:54:29 +00:00
|
|
|
for i in */src/main/resources/META-INF/MANIFEST.MF; do
|
2019-03-20 10:49:31 +00:00
|
|
|
echo "" >> ${i}
|
2019-03-19 09:54:29 +00:00
|
|
|
echo "Bundle-Version: %{version}" >> ${i}
|
2019-03-20 10:49:31 +00:00
|
|
|
sed -i '/^$/d' ${i}
|
2019-03-19 09:54:29 +00:00
|
|
|
perl -pi -e 's#\$\{parsedVersion\.osgiVersion\}#%{version}#g' ${i}
|
|
|
|
perl -pi -e 's#\$\{slf4j\.api\.minimum\.compatible\.version\}#1\.6\.0#g' ${i}
|
|
|
|
done
|
2019-03-19 05:32:35 +00:00
|
|
|
|
2013-09-19 14:23:19 +00:00
|
|
|
# The general pattern is that the API package exports API classes and does
|
|
|
|
# # not require impl classes. slf4j was breaking that causing "A cycle was
|
|
|
|
# # detected when generating the classpath slf4j.api, slf4j.nop, slf4j.api."
|
|
|
|
# # The API bundle requires impl package, so to avoid cyclic dependencies
|
|
|
|
# # during build time, it is necessary to mark the imported package as an
|
|
|
|
# # optional one.
|
|
|
|
# # Reported upstream: http://bugzilla.slf4j.org/show_bug.cgi?id=283
|
|
|
|
sed -i "/Import-Package/s/.$/;resolution:=optional&/" slf4j-api/src/main/resources/META-INF/MANIFEST.MF
|
|
|
|
|
2012-05-14 14:21:48 +00:00
|
|
|
%build
|
2019-10-01 09:03:41 +00:00
|
|
|
export CLASSPATH=$(build-classpath log4j12/log4j-12 \
|
2012-05-14 14:21:48 +00:00
|
|
|
commons-logging \
|
2017-10-11 09:09:14 +00:00
|
|
|
commons-lang3 \
|
2012-05-14 14:21:48 +00:00
|
|
|
javassist-3.14.0 \
|
|
|
|
cal10n)
|
|
|
|
export CLASSPATH=$CLASSPATH:$(pwd)/slf4j-api/target/slf4j-api-%{version}.jar
|
2015-10-23 08:56:41 +00:00
|
|
|
export MAVEN_REPO_LOCAL=$(pwd)/.m2
|
2012-05-14 14:21:48 +00:00
|
|
|
ant -Dmaven2.jpp.mode=true \
|
|
|
|
-Dmaven.test.skip=true \
|
|
|
|
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
|
|
|
|
package javadoc \
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2017-05-19 16:48:36 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
|
2019-03-18 09:40:51 +00:00
|
|
|
for i in api ext jcl jdk14 log4j12 nop simple; do
|
|
|
|
install -m 644 slf4j-${i}/target/slf4j-${i}-%{version}.jar \
|
|
|
|
%{buildroot}%{_javadir}/%{name}/${i}.jar
|
|
|
|
ln -sf ${i}.jar %{buildroot}%{_javadir}/%{name}/%{name}-${i}.jar
|
|
|
|
done
|
|
|
|
for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
|
|
|
|
install -m 644 ${i}/target/${i}-%{version}.jar %{buildroot}%{_javadir}/%{name}/${i}.jar
|
|
|
|
done
|
2012-05-14 14:21:48 +00:00
|
|
|
|
2019-03-18 09:40:51 +00:00
|
|
|
# poms
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
|
|
|
|
for i in api ext jcl jdk14 log4j12 nop simple; do
|
2019-10-05 13:00:04 +00:00
|
|
|
%pom_remove_parent slf4j-${i}
|
|
|
|
%pom_xpath_inject "pom:project" "
|
|
|
|
<groupId>org.slf4j</groupId>
|
|
|
|
<version>%{version}</version>" slf4j-${i}
|
2019-03-18 09:40:51 +00:00
|
|
|
install -pm 644 slf4j-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom
|
2018-10-15 14:53:05 +00:00
|
|
|
done
|
|
|
|
for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
|
2019-10-05 13:00:04 +00:00
|
|
|
%pom_remove_parent ${i}
|
|
|
|
%pom_xpath_inject "pom:project" "
|
|
|
|
<groupId>org.slf4j</groupId>
|
|
|
|
<version>%{version}</version>" ${i}
|
2019-03-18 09:40:51 +00:00
|
|
|
install -pm 644 ${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom
|
|
|
|
done
|
|
|
|
for i in api nop simple; do
|
|
|
|
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar
|
|
|
|
done
|
|
|
|
for i in ext jcl jdk14 log4j12 jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
|
|
|
|
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar -f ${i}
|
2018-10-15 14:53:05 +00:00
|
|
|
done
|
|
|
|
|
2012-05-14 14:21:48 +00:00
|
|
|
# manual
|
2017-05-19 16:48:36 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_docdir}/%{name}-%{version}
|
2012-05-14 14:21:48 +00:00
|
|
|
rm -f target/site/.htaccess
|
2017-05-19 16:48:36 +00:00
|
|
|
cp -pr target/site %{buildroot}%{_docdir}/%{name}-%{version}/
|
|
|
|
install -m 644 LICENSE.txt %{buildroot}%{_docdir}/%{name}-%{version}/
|
2012-05-14 14:21:48 +00:00
|
|
|
|
|
|
|
# javadoc
|
2017-05-19 16:48:36 +00:00
|
|
|
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr target/site/* %{buildroot}%{_javadocdir}/%{name}/
|
2012-05-14 14:21:48 +00:00
|
|
|
rm -rf target/site
|
|
|
|
|
2019-02-26 09:24:20 +00:00
|
|
|
%files -f .mfiles
|
2012-05-14 14:21:48 +00:00
|
|
|
%dir %{_docdir}/%{name}-%{version}
|
2018-10-15 14:53:05 +00:00
|
|
|
%license %{_docdir}/%{name}-%{version}/LICENSE.txt
|
2019-03-18 09:40:51 +00:00
|
|
|
%{_javadir}/%{name}/%{name}-api.jar
|
|
|
|
%{_javadir}/%{name}/%{name}-nop.jar
|
|
|
|
%{_javadir}/%{name}/%{name}-simple.jar
|
|
|
|
|
|
|
|
%files jdk14 -f .mfiles-jdk14
|
|
|
|
%{_javadir}/%{name}/%{name}-jdk14.jar
|
|
|
|
|
|
|
|
%files log4j12 -f .mfiles-log4j12
|
|
|
|
%{_javadir}/%{name}/%{name}-log4j12.jar
|
|
|
|
|
|
|
|
%files jcl -f .mfiles-jcl
|
|
|
|
%{_javadir}/%{name}/%{name}-jcl.jar
|
|
|
|
|
|
|
|
%files ext -f .mfiles-ext
|
|
|
|
%{_javadir}/%{name}/%{name}-ext.jar
|
|
|
|
|
|
|
|
%files -n jcl-over-slf4j -f .mfiles-jcl-over-slf4j
|
|
|
|
|
|
|
|
%files -n log4j-over-slf4j -f .mfiles-log4j-over-slf4j
|
|
|
|
|
|
|
|
%files -n jul-to-slf4j -f .mfiles-jul-to-slf4j
|
2012-05-14 14:21:48 +00:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%{_docdir}/%{name}-%{version}/site
|
|
|
|
|
|
|
|
%changelog
|