This commit is contained in:
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<flavor>extras</flavor>
|
||||
</multibuild>
|
@@ -16,7 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
Name: apache-sshd
|
||||
%if "%{flavor}" == "extras"
|
||||
%bcond_without extras
|
||||
%else
|
||||
%bcond_with extras
|
||||
%endif
|
||||
Version: 2.12.0
|
||||
Release: 0
|
||||
Summary: Apache SSHD
|
||||
@@ -34,8 +38,6 @@ BuildRequires: maven-local
|
||||
BuildRequires: mvn(junit:junit)
|
||||
BuildRequires: mvn(net.i2p.crypto:eddsa)
|
||||
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit47)
|
||||
BuildRequires: mvn(org.apache.maven:maven-archiver)
|
||||
@@ -43,11 +45,33 @@ BuildRequires: mvn(org.apache:apache-jar-resource-bundle)
|
||||
BuildRequires: mvn(org.apache:apache:pom:) >= 30
|
||||
BuildRequires: mvn(org.bouncycastle:bcpg-jdk18on)
|
||||
BuildRequires: mvn(org.bouncycastle:bcpkix-jdk18on)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
|
||||
BuildRequires: mvn(org.slf4j:jcl-over-slf4j)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-api)
|
||||
BuildArch: noarch
|
||||
%if %{with extras}
|
||||
Name: apache-sshd-extras
|
||||
BuildRequires: mvn(io.netty:netty-bom:pom:)
|
||||
BuildRequires: mvn(io.netty:netty-handler)
|
||||
BuildRequires: mvn(io.netty:netty-transport)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
||||
BuildRequires: mvn(org.apache.sshd:sshd-common)
|
||||
BuildRequires: mvn(org.apache.sshd:sshd-core)
|
||||
BuildRequires: mvn(org.apache.sshd:sshd-putty)
|
||||
BuildRequires: mvn(org.apache.sshd:sshd-scp)
|
||||
BuildRequires: mvn(org.apache.sshd:sshd-sftp)
|
||||
BuildRequires: mvn(org.assertj:assertj-core)
|
||||
BuildRequires: mvn(org.bouncycastle:bcprov-jdk18on)
|
||||
BuildRequires: mvn(org.bouncycastle:bcutil-jdk18on)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
|
||||
BuildRequires: mvn(org.eclipse.jgit:org.eclipse.jgit)
|
||||
BuildRequires: mvn(org.eclipse.jgit:org.eclipse.jgit.pgm)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-jdk14)
|
||||
%else
|
||||
Name: apache-sshd
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
|
||||
%endif
|
||||
|
||||
%description
|
||||
Apache SSHD is a 100% pure java library to support the SSH protocols on both
|
||||
@@ -60,7 +84,7 @@ Summary: API documentation for %{name}
|
||||
This package provides %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n apache-sshd-%{version}
|
||||
|
||||
# Avoid optional dep on tomcat native APR library
|
||||
%patch -P 0 -p1
|
||||
@@ -73,20 +97,31 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix
|
||||
%pom_remove_dep :spring-framework-bom
|
||||
%pom_remove_dep :testcontainers-bom sshd-sftp sshd-core
|
||||
|
||||
# Build the core modules only
|
||||
# We don't have dependencies for these modules
|
||||
%pom_disable_module sshd-mina
|
||||
%pom_remove_dep -r org.apache.sshd:sshd-mina
|
||||
%pom_disable_module sshd-spring-sftp
|
||||
%pom_remove_dep -r org.apache.sshd:sshd-spring-sftp
|
||||
%pom_disable_module sshd-openpgp
|
||||
%pom_remove_dep -r org.apache.sshd:sshd-openpgp
|
||||
# don't require bom that we don't package
|
||||
%pom_remove_dep org.testcontainers:testcontainers-bom sshd-scp
|
||||
|
||||
%if %{with extras}
|
||||
%pom_disable_module sshd-common
|
||||
%pom_disable_module sshd-core
|
||||
%pom_disable_module sshd-osgi
|
||||
%pom_disable_module sshd-putty
|
||||
%pom_disable_module sshd-scp
|
||||
%pom_disable_module sshd-sftp
|
||||
%else
|
||||
%pom_disable_module sshd-netty
|
||||
%pom_disable_module sshd-ldap
|
||||
%pom_disable_module sshd-git
|
||||
%pom_disable_module sshd-contrib
|
||||
%pom_disable_module sshd-spring-sftp
|
||||
%pom_remove_dep -r org.apache.sshd:sshd-spring-sftp
|
||||
%pom_disable_module sshd-cli
|
||||
%pom_disable_module sshd-openpgp
|
||||
%pom_disable_module assembly
|
||||
# don't require bom that we don't package
|
||||
%pom_remove_dep org.testcontainers:testcontainers-bom sshd-scp
|
||||
%endif
|
||||
|
||||
# Disable plugins we don't need for RPM builds
|
||||
%pom_remove_plugin :apache-rat-plugin
|
||||
@@ -96,6 +131,7 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix
|
||||
%pom_remove_plugin :maven-pmd-plugin
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin
|
||||
%pom_remove_plugin :impsort-maven-plugin
|
||||
%pom_remove_plugin :maven-clean-plugin
|
||||
%pom_remove_plugin :formatter-maven-plugin . sshd-core
|
||||
|
||||
# Suppress generation of uses clauses
|
||||
@@ -103,6 +139,10 @@ rm -rf sshd-core/src/main/java/org/apache/sshd/agent/unix
|
||||
|
||||
%pom_remove_plugin :maven-antrun-plugin sshd-osgi
|
||||
|
||||
%{mvn_file} :{*} apache-sshd/@1
|
||||
|
||||
%{mvn_package} :apache-sshd __noinstall
|
||||
|
||||
%build
|
||||
# Can't run tests, they require ch.ethz.ganymed:ganymed-ssh2
|
||||
%{mvn_build} -f -- -Dworkspace.root.dir=$(pwd) \
|
||||
|
Reference in New Issue
Block a user