2012-03-07 10:13:50 +01:00
|
|
|
#
|
|
|
|
# spec file for package apache-ivy
|
|
|
|
#
|
2022-03-19 08:40:35 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2012-03-07 10:13:50 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-26 11:27:59 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-07 10:13:50 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-03-19 08:40:35 +01:00
|
|
|
%bcond_without httpclient
|
|
|
|
%bcond_without oro
|
|
|
|
%bcond_without sftp
|
2019-06-28 14:21:37 +02:00
|
|
|
%bcond_without vfs
|
2010-02-03 15:10:21 +01:00
|
|
|
Name: apache-ivy
|
2022-03-19 08:40:35 +01:00
|
|
|
Version: 2.5.0
|
2014-07-08 13:01:43 +02:00
|
|
|
Release: 0
|
2010-02-03 15:10:21 +01:00
|
|
|
Summary: Java-based dependency manager
|
2012-01-16 15:56:37 +01:00
|
|
|
License: Apache-2.0
|
2012-03-07 10:13:50 +01:00
|
|
|
Group: Development/Tools/Building
|
2022-03-19 08:40:35 +01:00
|
|
|
URL: https://ant.apache.org/ivy/
|
|
|
|
Source0: https://archive.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz
|
2013-01-03 11:00:09 +01:00
|
|
|
Source1: ivy.1
|
2022-03-19 08:40:35 +01:00
|
|
|
Source2: https://repo1.maven.org/maven2/org/apache/ivy/ivy/%{version}/ivy-%{version}.pom
|
|
|
|
Patch0: apache-ivy-global-settings.patch
|
2010-02-03 15:10:21 +01:00
|
|
|
BuildRequires: ant
|
2019-09-24 18:11:56 +02:00
|
|
|
BuildRequires: bouncycastle-pg
|
2018-05-15 15:28:26 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel >= 1.8
|
2017-05-19 12:10:56 +02:00
|
|
|
BuildRequires: javapackages-local
|
2012-03-07 10:13:50 +01:00
|
|
|
BuildRequires: jsch
|
|
|
|
BuildRequires: oro
|
2018-11-26 11:38:44 +01:00
|
|
|
Provides: ivy = %{version}-%{release}
|
|
|
|
Obsoletes: ivy < %{version}-%{release}
|
2014-07-08 13:01:43 +02:00
|
|
|
BuildArch: noarch
|
2019-06-27 16:33:50 +02:00
|
|
|
%if %{with vfs}
|
|
|
|
BuildRequires: apache-commons-vfs2
|
|
|
|
%endif
|
2022-03-19 08:40:35 +01:00
|
|
|
%if %{with sftp}
|
2019-06-27 16:33:50 +02:00
|
|
|
BuildRequires: jsch-agent-proxy-connector-factory
|
|
|
|
BuildRequires: jsch-agent-proxy-core
|
|
|
|
BuildRequires: jsch-agent-proxy-jsch
|
|
|
|
%endif
|
2022-03-19 08:40:35 +01:00
|
|
|
%if %{with httpclient}
|
|
|
|
BuildRequires: httpcomponents-client
|
|
|
|
%endif
|
|
|
|
%if %{with oro}
|
|
|
|
BuildRequires: oro
|
|
|
|
%endif
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Apache Ivy is a tool for managing (recording, tracking, resolving and
|
|
|
|
reporting) project dependencies. It is designed as process agnostic and is
|
|
|
|
not tied to any methodology or structure. while available as a standalone
|
|
|
|
tool, Apache Ivy works particularly well with Apache Ant providing a number
|
|
|
|
of powerful Ant tasks ranging from dependency resolution to dependency
|
|
|
|
reporting and publication.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: API Documentation for ivy
|
2019-04-08 19:55:59 +02:00
|
|
|
Group: Documentation/HTML
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
JavaDoc documentation for %{name}
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2017-09-07 19:13:02 +02:00
|
|
|
%patch0 -p1
|
2010-02-03 15:10:21 +01:00
|
|
|
|
2019-04-08 19:55:59 +02:00
|
|
|
cp %{SOURCE2} pom.xml
|
|
|
|
|
2019-06-27 16:36:33 +02:00
|
|
|
%pom_remove_parent .
|
2019-04-08 19:55:59 +02:00
|
|
|
|
2022-03-19 08:40:35 +01:00
|
|
|
%pom_remove_dep :jsch.agentproxy
|
2010-02-03 15:10:21 +01:00
|
|
|
|
2022-03-19 08:40:35 +01:00
|
|
|
%if %{without httpclient}
|
|
|
|
%pom_remove_dep :httpclient
|
|
|
|
rm src/java/org/apache/ivy/util/url/HttpClientHandler.java
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without oro}
|
|
|
|
%pom_remove_dep :oro
|
|
|
|
rm src/java/org/apache/ivy/plugins/matcher/GlobPatternMatcher.java
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{without vfs}
|
|
|
|
%pom_remove_dep :commons-vfs2
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/vfs/ivy_vfs.xml
|
|
|
|
rm src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
|
2019-06-27 16:33:50 +02:00
|
|
|
%endif
|
2010-02-03 15:10:21 +01:00
|
|
|
|
2022-03-19 08:40:35 +01:00
|
|
|
%if %{without sftp}
|
|
|
|
%pom_remove_dep :jsch
|
|
|
|
%pom_remove_dep :jsch.agentproxy.connector-factory
|
|
|
|
%pom_remove_dep :jsch.agentproxy.jsch
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/sftp/SFTPResource.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/RemoteScpException.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/Scp.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/repository/ssh/SshResource.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/resolver/AbstractSshBasedResolver.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/resolver/SFTPResolver.java
|
|
|
|
rm src/java/org/apache/ivy/plugins/resolver/SshResolver.java
|
2019-06-27 16:33:50 +02:00
|
|
|
%endif
|
2018-11-26 11:27:59 +01:00
|
|
|
|
2017-05-21 10:00:08 +02:00
|
|
|
%build
|
2010-02-03 15:10:21 +01:00
|
|
|
# Craft class path
|
|
|
|
mkdir -p lib
|
2022-03-19 08:40:35 +01:00
|
|
|
build-jar-repository -s lib ant ant/ant-nodeps jsch bcprov bcpg
|
|
|
|
export CLASSPATH=$(build-classpath ant ant/ant-nodeps jsch httpcomponents bcprov bcpg)
|
|
|
|
%if %{with httpclient}
|
|
|
|
build-jar-repository lib httpcomponents
|
|
|
|
export CLASSPATH=${CLASSPATH}:$(build-classpath httpcomponents)
|
|
|
|
%endif
|
|
|
|
%if %{with oro}
|
|
|
|
build-jar-repository lib oro
|
|
|
|
export CLASSPATH=${CLASSPATH}:$(build-classpath oro)
|
|
|
|
%endif
|
2019-06-27 16:33:50 +02:00
|
|
|
%if %{with vfs}
|
|
|
|
build-jar-repository lib commons-vfs2
|
|
|
|
export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2)
|
|
|
|
%endif
|
2022-03-19 08:40:35 +01:00
|
|
|
%if %{with sftp}
|
|
|
|
build-jar-repository -s lib jsch.agentproxy.core \
|
2019-06-28 14:00:39 +02:00
|
|
|
jsch.agentproxy.connector-factory \
|
|
|
|
jsch.agentproxy.jsch
|
|
|
|
export CLASSPATH=${CLASSPATH}:$(build-classpath jsch.agentproxy.core jsch.agentproxy.connector-factory jsch.agentproxy.jsch)
|
2019-06-27 16:33:50 +02:00
|
|
|
%endif
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
# Build
|
2022-03-19 08:40:35 +01:00
|
|
|
%{ant} -v -Dtarget.ivy.version=%{version} -Dbundle.version=%{version} /localivy /offline jar javadoc
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
# Code
|
2019-02-07 15:48:50 +01:00
|
|
|
install -d %{buildroot}%{_javadir}/%{name}
|
2013-11-06 15:08:27 +01:00
|
|
|
install -p -m644 build/artifact/jars/ivy.jar %{buildroot}%{_javadir}/ivy.jar
|
2019-02-07 15:48:50 +01:00
|
|
|
ln -sf ../ivy.jar %{buildroot}%{_javadir}/%{name}/ivy.jar
|
2013-11-06 15:08:27 +01:00
|
|
|
|
|
|
|
install -d -m 0755 %{buildroot}/%{_mavenpomdir}/
|
2019-04-08 19:55:59 +02:00
|
|
|
install -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-ivy.pom
|
2013-11-06 15:08:27 +01:00
|
|
|
# Maven depmap
|
|
|
|
%add_maven_depmap JPP-ivy.pom ivy.jar
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
# API Documentation
|
2013-11-06 15:08:27 +01:00
|
|
|
install -d %{buildroot}%{_javadocdir}/%{name}
|
2022-03-19 08:40:35 +01:00
|
|
|
cp -rp build/reports/api/. %{buildroot}%{_javadocdir}/%{name}
|
2018-05-15 15:28:26 +02:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
2010-02-03 15:10:21 +01:00
|
|
|
|
2013-01-03 11:00:09 +01:00
|
|
|
# Command line script
|
|
|
|
MAIN_CLASS=`sed -rn 's/^Main-Class: (.*)$/\1/gp' META-INF/MANIFEST.MF | tr -d '\r'`
|
2014-07-08 13:18:13 +02:00
|
|
|
%jpackage_script "${MAIN_CLASS}" "" "" ant:ant/ant-nodeps:ivy:oro:jsch:commons-httpclient ivy
|
2013-11-06 15:08:27 +01:00
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
|
|
|
echo "ivy" > %{buildroot}%{_sysconfdir}/ant.d/%{name}
|
2013-01-03 11:00:09 +01:00
|
|
|
|
|
|
|
# Man page
|
2014-07-08 13:01:43 +02:00
|
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
|
|
install %{SOURCE1} %{buildroot}%{_mandir}/man1/ivy.1
|
2013-01-03 11:00:09 +01:00
|
|
|
|
2019-02-07 16:09:57 +01:00
|
|
|
%files -f .mfiles
|
2019-02-07 16:10:40 +01:00
|
|
|
%license LICENSE NOTICE
|
2022-03-19 08:40:35 +01:00
|
|
|
%doc README.adoc
|
2013-11-06 15:08:27 +01:00
|
|
|
%config %{_sysconfdir}/ant.d/%{name}
|
2019-02-07 15:48:50 +01:00
|
|
|
%{_javadir}/%{name}
|
2013-01-03 11:00:09 +01:00
|
|
|
%attr(755,root,root) %{_bindir}/*
|
|
|
|
%attr(644,root,root) %{_mandir}/man1/*
|
2010-02-03 15:10:21 +01:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/*
|
|
|
|
|
|
|
|
%changelog
|