Files
slf4j2/slf4j2.spec

186 lines
5.3 KiB
RPMSpec

#
# spec file for package slf4j2
#
# Copyright (c) 2025 SUSE LLC
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global base_name slf4j
Name: %{base_name}2
Version: 2.0.17
Release: 0
Summary: Simple Logging Facade for Java
# the log4j-over-slf4j and jcl-over-slf4j submodules are ASL 2.0, rest is MIT
License: Apache-2.0 AND MIT
Group: Development/Libraries/Java
URL: https://www.slf4j.org/
Source0: %{base_name}-%{version}.tar.xz
Source1: %{name}-build.tar.xz
Source2: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildRequires: ant >= 1.6.5
BuildRequires: cal10n
BuildRequires: fdupes
BuildRequires: java-devel >= 9
BuildRequires: javapackages-local >= 6
BuildRequires: javassist >= 3.4
BuildRequires: reload4j
BuildArch: noarch
%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 jdk14
Summary: SLF4J JDK14 Binding
Group: Development/Libraries/Java
%description jdk14
SLF4J JDK14 Binding.
%package jdk-platform-logging
Summary: SLF4J Platform Logging Binding
Group: Development/Libraries/Java
%description jdk-platform-logging
SLF4J Platform Logging Binding.
%package reload4j
Summary: SLF4J LOG4J-12 Binding
Group: Development/Libraries/Java
%description reload4j
SLF4J LOG4J-12 Binding.
%package ext
Summary: SLF4J Extensions Module
Group: Development/Libraries/Java
%description ext
Extensions to the SLF4J API.
%package -n jcl-over-%{name}
Summary: JCL 1.1.1 implemented over SLF4J
Group: Development/Libraries/Java
%description -n jcl-over-%{name}
JCL 1.1.1 implemented over SLF4J.
%package -n jul-to-%{name}
Summary: JUL to SLF4J bridge
Group: Development/Libraries/Java
%description -n jul-to-%{name}
JUL to SLF4J bridge.
%package -n log4j-over-%{name}
Summary: Log4j implemented over SLF4J
Group: Development/Libraries/Java
%description -n log4j-over-%{name}
Log4j implemented over SLF4J.
%package migrator
Summary: SLF4J Migrator
Group: Development/Libraries/Java
%description migrator
SLF4J Migrator.
%prep
%setup -q -n %{base_name}-%{version} -a1
install -p -m 0644 %{SOURCE2} LICENSE-2.0.txt
%build
mkdir -p lib
build-jar-repository -s lib cal10n/cal10n-api javassist reload4j/reload4j
ant package javadoc
%install
# jars
install -d -m 0755 %{buildroot}%{_javadir}/%{name}
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
for i in api ext jdk14 jdk-platform-logging migrator nop reload4j simple; do
install -m 644 slf4j-${i}/target/slf4j-${i}-%{version}.jar \
%{buildroot}%{_javadir}/%{name}/${i}.jar
cp -pr slf4j-${i}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/slf4j-${i}
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
cp -pr ${i}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/${i}
done
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
for i in api ext jdk14 jdk-platform-logging migrator nop reload4j simple; do
%{mvn_install_pom} slf4j-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/${i}.pom
done
for i in jcl-over-slf4j jul-to-slf4j log4j-over-slf4j; do
%{mvn_install_pom} ${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 -v %{version}
done
for i in ext jdk14 jdk-platform-logging migrator jcl-over-slf4j jul-to-slf4j log4j-over-slf4j reload4j; do
%add_maven_depmap %{name}/${i}.pom %{name}/${i}.jar -f ${i} -v %{version}
done
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE.txt LICENSE-2.0.txt
%files jdk14 -f .mfiles-jdk14
%files reload4j -f .mfiles-reload4j
%files ext -f .mfiles-ext
%files -n jcl-over-%{name} -f .mfiles-jcl-over-%{base_name}
%files -n log4j-over-%{name} -f .mfiles-log4j-over-%{base_name}
%files -n jul-to-%{name} -f .mfiles-jul-to-%{base_name}
%files jdk-platform-logging -f .mfiles-jdk-platform-logging
%files migrator -f .mfiles-migrator
%files javadoc
%{_javadocdir}/%{name}
%changelog