Expand conditionals

This commit is contained in:
Mikolaj Izdebski 2018-11-29 12:42:46 +00:00
parent 352353d990
commit 8624c6012d

View File

@ -1,4 +1,3 @@
%bcond_without avalon
Name: apache-commons-logging
Version: 1.2
@ -15,11 +14,6 @@ Patch0: 0001-Generate-different-Bundle-SymbolicName-for-different.patch
Patch1: 0002-Port-to-maven-jar-plugin-3.0.0.patch
BuildRequires: maven-local
%if %{with avalon}
BuildRequires: mvn(avalon-framework:avalon-framework-api)
BuildRequires: mvn(avalon-framework:avalon-framework-impl)
BuildRequires: mvn(logkit:logkit)
%endif
BuildRequires: mvn(javax.servlet:servlet-api)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(log4j:log4j:12)
@ -44,20 +38,11 @@ logging implementation.
%prep
%autosetup -p1 -n commons-logging-%{version}-src
%if %{with avalon}
# Sent upstream https://issues.apache.org/jira/browse/LOGGING-143
%pom_remove_dep :avalon-framework
%pom_add_dep avalon-framework:avalon-framework-api:4.3:provided
%pom_add_dep avalon-framework:avalon-framework-impl:4.3:test
%pom_xpath_inject "pom:dependency[pom:artifactId='logkit']" '<scope>provided</scope>'
%else
%pom_remove_dep -r :avalon-framework
%pom_remove_dep -r :logkit
rm -r src/test/java/org/apache/commons/logging/{avalon,logkit}
rm src/main/java/org/apache/commons/logging/impl/AvalonLogger.java
rm src/main/java/org/apache/commons/logging/impl/LogKitLogger.java
%endif
%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :maven-scm-publish-plugin