slf4j/slf4j.spec

158 lines
5.1 KiB
RPMSpec
Raw Normal View History

2020-02-20 10:05:22 +08:00
Name: slf4j
Version: 1.7.25
2020-03-15 21:10:44 +08:00
Release: 8
2020-02-20 10:05:22 +08:00
Epoch: 0
Summary: Simple Logging Facade for Java(SLF4J)
License: MIT and ASL 2.0
URL: http://www.slf4j.org/
2020-03-15 21:10:44 +08:00
Source0: http://www.slf4j.org/dist/slf4j-%{version}.tar.gz
2020-02-20 10:05:22 +08:00
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildArch: noarch
2020-03-15 21:10:44 +08:00
BuildRequires: mvn(ch.qos.cal10n:cal10n-api) mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) mvn(commons-lang:commons-lang)
BuildRequires: mvn(commons-logging:commons-logging) mvn(javassist:javassist) maven-local
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) mvn(log4j:log4j:1.2.17)
# Disallow EventData deserialization by default
Patch0000: 0001-Disallow-EventData-deserialization-by-default.patch
2020-02-20 10:05:22 +08:00
%description
The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various
logging frameworks (e.g. java.util.logging, logback, log4j) allowing the end user to plug in the
desired logging framework at deployment time.Before you start using SLF4J, we highly recommend
2020-03-15 21:10:44 +08:00
that you read the two-page SLF4J user manual. Note that SLF4J-enabling your library implies the
addition of only a single mandatory dependency, namely slf4j-api.jar. If no binding is found on
the class path, then SLF4J will default to a no-operation implementation. In case you wish to
migrate your Java source files to SLF4J, consider our migrator tool which can migrate your project
to use the SLF4J API in just a few minutes. In case an externally-maintained component you depend
on uses a logging API other than SLF4J, such as commons logging, log4j or java.util.logging, have
a look at SLF4J's binary-support for legacy APIs.
%package help
Summary: Help documentation for slf4j
Provides: slf4j-javadoc = %{epoch}:%{version}-%{release} slf4j-manual = %{epoch}:%{version}-%{release}
Obsoletes: slf4j-javedoc < %{epoch}:%{version}-%{release} slf4j-manual < %{epoch}:%{version}-%{release}
%description help
Help documentation for slf4j.
%package jdk14
2020-02-20 10:05:22 +08:00
Summary: JDK14 Binding of SLF4J
2020-03-15 21:10:44 +08:00
%description jdk14
2020-02-20 10:05:22 +08:00
JDK14 Binding of SLF4J.
2020-03-15 21:10:44 +08:00
%package log4j12
2020-02-20 10:05:22 +08:00
Summary: LOG4J-12 Binding of SLF4J
2020-03-15 21:10:44 +08:00
%description log4j12
2020-02-20 10:05:22 +08:00
LOG4J-12 Binding of SLF4J.
2020-03-15 21:10:44 +08:00
%package jcl
2020-02-20 10:05:22 +08:00
Summary: JCL Binding of SLF4J
2020-03-15 21:10:44 +08:00
%description jcl
2020-02-20 10:05:22 +08:00
JCL Binding of SLF4J.
2020-03-15 21:10:44 +08:00
%package ext
Summary: Extensions Module of SLF4J
%description ext
Extensions Module of SLF4J.
%package -n jcl-over-slf4j
2020-02-20 10:05:22 +08:00
Summary: JCL 1.1.1 implemented over SLF4J
%description -n jcl-over-slf4j
JCL 1.1.1 implemented over SLF4J.
2020-03-15 21:10:44 +08:00
%package -n log4j-over-slf4j
2020-02-20 10:05:22 +08:00
Summary: Log4j implemented over SLF4J
%description -n log4j-over-slf4j
Log4j implemented over SLF4J.
2020-03-15 21:10:44 +08:00
%package -n jul-to-slf4j
Summary: JUL to SLF4J bridge
2020-02-20 10:05:22 +08:00
2020-03-15 21:10:44 +08:00
%description -n jul-to-slf4j
JUL to SLF4J bridge.
2020-02-20 10:05:22 +08:00
2020-03-15 21:10:44 +08:00
%package sources
2020-02-20 10:05:22 +08:00
Summary: Source JARs of SLF4J
2020-03-15 21:10:44 +08:00
%description sources
Source JARs of SLF4J.
2020-02-20 10:05:22 +08:00
%prep
2020-03-15 21:10:44 +08:00
%autosetup -p1
find . -name "*.jar" | xargs rm
2020-02-20 10:05:22 +08:00
cp -p %{SOURCE1} APACHE-LICENSE
%pom_disable_module integration
%pom_disable_module osgi-over-slf4j
%pom_disable_module slf4j-android
%pom_disable_module slf4j-migrator
%pom_xpath_inject "pom:project/pom:properties" "
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>"
%pom_xpath_remove "pom:links"
2020-03-15 21:10:44 +08:00
2020-02-20 10:05:22 +08:00
%pom_xpath_inject "pom:plugin[pom:artifactId[text()='maven-javadoc-plugin']]/pom:configuration" "
<detectJavaApiLink>false</detectJavaApiLink>
<isOffline>false</isOffline>
<links><link>/usr/share/javadoc/java</link></links>"
find -name "*.css" -o -name "*.js" -o -name "*.txt" | xargs -t sed -i 's/\r$//'
%pom_xpath_remove pom:extensions
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-jar-plugin']/pom:executions" "
<execution>
<id>default-jar</id>
<phase>skip</phase>
</execution>" slf4j-api
sed -i "/Import-Package/s/.$/;resolution:=optional&/" slf4j-api/src/main/resources/META-INF/MANIFEST.MF
%mvn_package :::sources: sources
%mvn_package :slf4j-parent __noinstall
%mvn_package :slf4j-site __noinstall
%mvn_package :slf4j-api
%mvn_package :slf4j-simple
%mvn_package :slf4j-nop
%build
%mvn_build -f -s
%install
2020-03-15 21:10:44 +08:00
%mvn_file ':slf4j-{*}' slf4j/slf4j-@1 slf4j/@1
2020-02-20 10:05:22 +08:00
%mvn_install
install -d -m 0755 $RPM_BUILD_ROOT%{_defaultdocdir}/slf4j-manual
2020-03-15 21:10:44 +08:00
rm -rf target/site/{.htaccess,apidocs}
cp -pr target/site/* $RPM_BUILD_ROOT%{_defaultdocdir}/slf4j-manual
2020-02-20 10:05:22 +08:00
%files -f .mfiles
2020-03-15 21:10:44 +08:00
%doc LICENSE.txt APACHE-LICENSE
2020-02-20 10:05:22 +08:00
%files jdk14 -f .mfiles-slf4j-jdk14
%files log4j12 -f .mfiles-slf4j-log4j12
%files jcl -f .mfiles-slf4j-jcl
2020-03-15 21:10:44 +08:00
%files ext -f .mfiles-slf4j-ext
2020-02-20 10:05:22 +08:00
%files -n jcl-over-slf4j -f .mfiles-jcl-over-slf4j
%files -n log4j-over-slf4j -f .mfiles-log4j-over-slf4j
2020-03-15 21:10:44 +08:00
%files -n jul-to-slf4j -f .mfiles-jul-to-slf4j
2020-02-20 10:05:22 +08:00
%files sources -f .mfiles-sources
2020-03-15 21:10:44 +08:00
%doc LICENSE.txt APACHE-LICENSE
2020-02-20 10:05:22 +08:00
%files help -f .mfiles-javadoc
%{_defaultdocdir}/slf4j-manual
%changelog
2020-03-15 21:10:44 +08:00
* Sun Mar 15 2020 Ling Yang <lingyang2@huawei.com> - 0:1.7.25-8
- Fix format
2020-02-20 10:05:22 +08:00
* Wed Dec 04 2019 daiqianwen <daiqianwen@huawei.com> - 0:1.7.25-7
- Package init