Expand conditionals

This commit is contained in:
Mikolaj Izdebski 2018-11-29 12:42:46 +00:00
parent c6babfe8bb
commit 899a5404c8

View File

@ -1,8 +1,3 @@
%if 0%{?fedora}
%bcond_without obr
%bcond_without reporting
%endif
%global site_name maven-bundle-plugin %global site_name maven-bundle-plugin
Name: maven-plugin-bundle Name: maven-plugin-bundle
@ -37,17 +32,6 @@ BuildRequires: mvn(org.apache.maven.shared:maven-dependency-tree)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.sonatype.plexus:plexus-build-api) BuildRequires: mvn(org.sonatype.plexus:plexus-build-api)
%if %{with obr}
BuildRequires: mvn(net.sf.kxml:kxml2)
BuildRequires: mvn(org.apache.felix:org.apache.felix.bundlerepository)
BuildRequires: mvn(xpp3:xpp3)
%endif
%if %{with reporting}
BuildRequires: mvn(org.apache.maven.doxia:doxia-core)
BuildRequires: mvn(org.apache.maven.doxia:doxia-sink-api)
BuildRequires: mvn(org.apache.maven.doxia:doxia-site-renderer)
BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl)
%endif
%description %description
Provides a maven plugin that supports creating an OSGi bundle Provides a maven plugin that supports creating an OSGi bundle
@ -81,21 +65,13 @@ rm -r src/main/java/org/apache/felix/bundleplugin/pom
# There is forked version of maven-osgi in # There is forked version of maven-osgi in
# src/{main,test}/java/org/apache/maven # src/{main,test}/java/org/apache/maven
%if %{with obr}
# Deps unbundled from felix-bundlerepository
%pom_add_dep xpp3:xpp3
%pom_add_dep net.sf.kxml:kxml2
%else
rm -rf src/main/java/org/apache/felix/obrplugin/ rm -rf src/main/java/org/apache/felix/obrplugin/
%pom_remove_dep :org.apache.felix.bundlerepository %pom_remove_dep :org.apache.felix.bundlerepository
%endif
%if %{without reporting}
rm -f src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java rm -f src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
%pom_remove_dep :doxia-sink-api %pom_remove_dep :doxia-sink-api
%pom_remove_dep :doxia-site-renderer %pom_remove_dep :doxia-site-renderer
%pom_remove_dep :maven-reporting-impl %pom_remove_dep :maven-reporting-impl
%endif
%build %build
# Tests depend on bundled JARs # Tests depend on bundled JARs