forked from pool/apache-ivy
This commit is contained in:
parent
b22f20dda3
commit
b099623ba7
@ -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
|
||||||
@ -62,7 +72,7 @@ JavaDoc documentation for %{name}
|
|||||||
|
|
||||||
cp %{SOURCE2} pom.xml
|
cp %{SOURCE2} pom.xml
|
||||||
|
|
||||||
%pom_remove_parent .
|
%{pom_remove_parent} .
|
||||||
|
|
||||||
#TODO: return back when bouncycastle-pgp will be available
|
#TODO: return back when bouncycastle-pgp will be available
|
||||||
rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle
|
rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle
|
||||||
@ -70,23 +80,37 @@ 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-agent-proxy
|
||||||
|
export CLASSPATH=${CLASSPATH}:$(build-classpath jsch-agent-proxy)
|
||||||
|
%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