SHA256
1
0
forked from pool/apache-ivy
Fridrich Strba 2019-06-27 14:33:50 +00:00 committed by Git OBS Bridge
parent b22f20dda3
commit b099623ba7

View File

@ -16,6 +16,8 @@
#
%bcond_without ssh
%bcond_without vfs
Name: apache-ivy
Version: 2.4.0
Release: 0
@ -39,6 +41,14 @@ BuildRequires: oro
Provides: ivy = %{version}-%{release}
Obsoletes: ivy < %{version}-%{release}
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
Apache Ivy is a tool for managing (recording, tracking, resolving and
@ -62,7 +72,7 @@ JavaDoc documentation for %{name}
cp %{SOURCE2} pom.xml
%pom_remove_parent .
%{pom_remove_parent} .
#TODO: return back when bouncycastle-pgp will be available
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
rm -rf doc build/doc
# How to properly disable a plugin?
# we disable vfs plugin since commons-vfs is not available
rm -rf src/java/org/apache/ivy/plugins/repository/vfs \
src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
# Port from commons-vfs 1.x to 2.x
%if %{with vfs}
sed -i "s/commons.vfs/&2/" {src,test}/java/org/apache/ivy/plugins/repository/vfs/*
%else
sed -i /commons-vfs/d ivy.xml
sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \
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 src/java/org/apache/ivy/plugins/resolver/*{Ssh,SFTP}*.java
%endif
%build
# Craft class path
mkdir -p lib
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
export CLASSPATH=$(build-classpath ant ant/ant-nodeps oro jsch commons-httpclient)
ant -Dtarget.ivy.version=%{version} /localivy /offline jar javadoc
%install