From b88118db6b10d38d5fe7b530226cb731f691003b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 5 Jun 2021 10:52:22 +0200 Subject: [PATCH] Implement Ivy build conditional --- javapackages-tools.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 20069c3..da3b01e 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -1,5 +1,11 @@ %bcond_with bootstrap +%if 0%{?fedora} +%bcond_without ivy +%else +%bcond_with ivy +%endif + # Don't generate requires on jpackage-utils and java-headless for # provided pseudo-artifacts: com.sun:tools and sun.jdk:jconsole. %global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}/maven-metadata/javapackages-metadata.xml$ @@ -77,6 +83,7 @@ Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin) %description -n maven-local This package provides macros and scripts to support packaging Maven artifacts. +%if %{with ivy} %package -n ivy-local Summary: Local mode for Apache Ivy Requires: %{name} = %{version}-%{release} @@ -87,6 +94,7 @@ Requires: xmvn-connector-ivy %description -n ivy-local This package implements local mode for Apache Ivy, which allows artifact resolution using XMvn resolver. +%endif %package -n %{python_prefix}-javapackages Summary: Module for handling various files for Java packaging @@ -149,6 +157,10 @@ sed -e 's/.[17]$/&*/' -i files-* rm -rf %{buildroot}%{_bindir}/gradle-local rm -rf %{buildroot}%{_datadir}/gradle-local rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7 +%if %{without ivy} +rm -rf %{buildroot}%{_sysconfdir}/ivy +rm -rf %{buildroot}%{_sysconfdir}/ant.d +%endif mkdir -p %{buildroot}%{_datadir}/xmvn/conf/ cp -p %{SOURCE2} %{buildroot}%{_datadir}/xmvn/conf/toolchains.xml @@ -170,7 +182,9 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config %files -n maven-local +%if %{with ivy} %files -n ivy-local -f files-ivy +%endif %files -n maven-local-openjdk8 %{_datadir}/xmvn/conf