diff --git a/apache-ivy-pack200.patch b/apache-ivy-pack200.patch new file mode 100644 index 0000000..9d50983 --- /dev/null +++ b/apache-ivy-pack200.patch @@ -0,0 +1,21 @@ +--- apache-ivy-2.5.2/build.xml 2023-10-30 16:09:23.892302634 +0100 ++++ apache-ivy-2.5.2/build.xml 2023-10-30 16:12:01.143389848 +0100 +@@ -185,6 +185,7 @@ + + +- Added patch: + * apache-ivy-pack200.patch + + conditionally apply to allow building against standalone + pack200 implementation + ------------------------------------------------------------------- Tue Sep 19 11:31:58 UTC 2023 - Fridrich Strba diff --git a/apache-ivy.spec b/apache-ivy.spec index 6b452d5..624dc28 100644 --- a/apache-ivy.spec +++ b/apache-ivy.spec @@ -20,6 +20,7 @@ %bcond_without oro %bcond_without sftp %bcond_without vfs +%bcond_with pack200 Name: apache-ivy Version: 2.5.2 Release: 0 @@ -32,6 +33,7 @@ Source1: ivy.1 Source2: https://repo1.maven.org/maven2/org/apache/ivy/ivy/%{version}/ivy-%{version}.pom Patch0: apache-ivy-global-settings.patch Patch1: apache-ivy-publication-date.patch +Patch2: apache-ivy-pack200.patch BuildRequires: ant BuildRequires: bouncycastle-pg BuildRequires: fdupes @@ -39,10 +41,14 @@ BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local >= 6 BuildRequires: jsch BuildRequires: oro -BuildConflicts: java-devel >= 14 Provides: ivy = %{version}-%{release} Obsoletes: ivy < %{version}-%{release} BuildArch: noarch +%if %{with pack200} +BuildRequires: pack200 +%else +BuildConflicts: java-devel >= 14 +%endif %if %{with vfs} BuildRequires: apache-commons-vfs2 %endif @@ -117,21 +123,26 @@ rm src/java/org/apache/ivy/plugins/resolver/SFTPResolver.java rm src/java/org/apache/ivy/plugins/resolver/SshResolver.java %endif +%if %{with pack200} +%pom_add_dep io.pack200:pack200:14:provided +%patch2 -p1 +%endif + %build # Craft class path mkdir -p lib 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 +build-jar-repository -s lib httpcomponents export CLASSPATH=${CLASSPATH}:$(build-classpath httpcomponents) %endif %if %{with oro} -build-jar-repository lib oro +build-jar-repository -s lib oro export CLASSPATH=${CLASSPATH}:$(build-classpath oro) %endif %if %{with vfs} -build-jar-repository lib commons-vfs2 +build-jar-repository -s lib commons-vfs2 export CLASSPATH=${CLASSPATH}:$(build-classpath commons-vfs2) %endif %if %{with sftp} @@ -140,6 +151,10 @@ build-jar-repository -s lib jsch.agentproxy.core \ jsch.agentproxy.jsch export CLASSPATH=${CLASSPATH}:$(build-classpath jsch.agentproxy.core jsch.agentproxy.connector-factory jsch.agentproxy.jsch) %endif +%if %{with pack200} +build-jar-repository -s lib pack200 +export CLASSPATH=${CLASSPATH}:$(build-classpath pack200) +%endif # Build %{ant} -v -Dtarget.ivy.version=%{version} -Dbundle.version=%{version} /localivy /offline jar javadoc