Fridrich Strba 2023-05-30 16:16:48 +00:00 committed by Git OBS Bridge
parent b8f023dd78
commit 68bb2a988c
2 changed files with 21 additions and 3 deletions

10
jsch-log4j.patch Normal file
View File

@ -0,0 +1,10 @@
--- a/src/main/java9/module-info.java
+++ b/src/main/java9/module-info.java
@@ -3,7 +3,6 @@ module com.jcraft.jsch {
requires static java.security.jgss;
requires static java.logging;
- requires static org.apache.logging.log4j;
requires static org.slf4j;
requires static org.bouncycastle.provider;
requires static com.sun.jna;

View File

@ -26,6 +26,7 @@ URL: https://www.jcraft.com/jsch/
Source0: https://github.com/mwiede/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
Source1: %{name}-build.xml
Patch0: jsch-junixsocket.patch
Patch1: jsch-log4j.patch
BuildRequires: ant
BuildRequires: fdupes
# We build different multiversion overrides for 9, 10, 11, 15 and 16
@ -34,7 +35,6 @@ BuildRequires: bouncycastle
BuildRequires: javapackages-local >= 6
BuildRequires: jna
BuildRequires: jna-contrib
BuildRequires: log4j
BuildRequires: slf4j
# The jar still works with Java 8
Requires: java >= 1.8
@ -69,12 +69,20 @@ cp %{SOURCE1} build.xml
# We don't have junixsocket
%pom_remove_dep com.kohlschutter.junixsocket:
rm src/main/java/com/jcraft/jsch/JUnixSocketFactory.java
rm -f \
src/main/java/com/jcraft/jsch/JUnixSocketFactory.java
%patch0 -p1
# Do not depend on log4j
%pom_remove_dep org.apache.logging.log4j:
rm -f \
src/main/java/com/jcraft/jsch/Log4j2Logger.java \
src/test/java/com/jcraft/jsch/Log4j2LoggerTest.java
%patch1 -p1
%build
mkdir -p lib
build-jar-repository -s lib jna jna-platform slf4j/api bcprov log4j/log4j-api
build-jar-repository -s lib jna jna-platform slf4j/api bcprov
ant jar javadoc
%install