forked from pool/apache-ivy
Accepting request 713014 from Java:packages
add ssh and vfs integration OBS-URL: https://build.opensuse.org/request/show/713014 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-ivy?expand=0&rev=17
This commit is contained in:
commit
9cae7b473b
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 2 09:22:21 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Add possibility to build with ssh and vfs integration, since
|
||||||
|
we have all the dependencies in openSUSE.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 8 18:12:07 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
Mon Apr 8 18:12:07 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_without ssh
|
||||||
|
%bcond_without vfs
|
||||||
Name: apache-ivy
|
Name: apache-ivy
|
||||||
Version: 2.4.0
|
Version: 2.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -39,6 +41,14 @@ BuildRequires: oro
|
|||||||
Provides: ivy = %{version}-%{release}
|
Provides: ivy = %{version}-%{release}
|
||||||
Obsoletes: ivy < %{version}-%{release}
|
Obsoletes: ivy < %{version}-%{release}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with vfs}
|
||||||
|
BuildRequires: apache-commons-vfs2
|
||||||
|
%endif
|
||||||
|
%if %{with ssh}
|
||||||
|
BuildRequires: jsch-agent-proxy-connector-factory
|
||||||
|
BuildRequires: jsch-agent-proxy-core
|
||||||
|
BuildRequires: jsch-agent-proxy-jsch
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Apache Ivy is a tool for managing (recording, tracking, resolving and
|
Apache Ivy is a tool for managing (recording, tracking, resolving and
|
||||||
@ -70,23 +80,39 @@ rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle
|
|||||||
# Remove prebuilt documentation
|
# Remove prebuilt documentation
|
||||||
rm -rf doc build/doc
|
rm -rf doc build/doc
|
||||||
|
|
||||||
# How to properly disable a plugin?
|
# Port from commons-vfs 1.x to 2.x
|
||||||
# we disable vfs plugin since commons-vfs is not available
|
%if %{with vfs}
|
||||||
rm -rf src/java/org/apache/ivy/plugins/repository/vfs \
|
sed -i "s/commons.vfs/&2/" {src,test}/java/org/apache/ivy/plugins/repository/vfs/*
|
||||||
src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
|
%else
|
||||||
|
sed -i /commons-vfs/d ivy.xml
|
||||||
sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \
|
sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \
|
||||||
src/java/org/apache/ivy/core/settings/typedef.properties
|
src/java/org/apache/ivy/core/settings/typedef.properties
|
||||||
|
rm -rf src/java/org/apache/ivy/plugins/repository/vfs
|
||||||
|
rm -rf src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without ssh}
|
||||||
rm -r src/java/org/apache/ivy/plugins/repository/{ssh,sftp}
|
rm -r src/java/org/apache/ivy/plugins/repository/{ssh,sftp}
|
||||||
rm src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java
|
rm src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Craft class path
|
# Craft class path
|
||||||
mkdir -p lib
|
mkdir -p lib
|
||||||
build-jar-repository lib ant ant/ant-nodeps oro jsch commons-httpclient
|
build-jar-repository lib ant ant/ant-nodeps oro jsch commons-httpclient
|
||||||
|
export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient)
|
||||||
|
%if %{with vfs}
|
||||||
|
build-jar-repository lib commons-vfs2
|
||||||
|
export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2)
|
||||||
|
%endif
|
||||||
|
%if %{with ssh}
|
||||||
|
build-jar-repository lib jsch.agentproxy.core \
|
||||||
|
jsch.agentproxy.connector-factory \
|
||||||
|
jsch.agentproxy.jsch
|
||||||
|
export CLASSPATH=${CLASSPATH}:$(build-classpath jsch.agentproxy.core jsch.agentproxy.connector-factory jsch.agentproxy.jsch)
|
||||||
|
%endif
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient)
|
|
||||||
ant -Dtarget.ivy.version=%{version} /localivy /offline jar javadoc
|
ant -Dtarget.ivy.version=%{version} /localivy /offline jar javadoc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Loading…
Reference in New Issue
Block a user