Expand conditionals

This commit is contained in:
Mikolaj Izdebski 2018-11-29 12:42:46 +00:00
parent 09968fdf69
commit 6e782991cf

View File

@ -1,8 +1,5 @@
# Conditionals to help breaking eclipse <-> xbean dependency cycle
# when bootstrapping for new architectures
%bcond_without equinox
%bcond_without groovy
%bcond_without spring
Name: xbean
Version: 4.8
@ -28,30 +25,8 @@ BuildRequires: mvn(org.ow2.asm:asm)
BuildRequires: mvn(org.ow2.asm:asm-commons)
BuildRequires: mvn(org.slf4j:slf4j-api)
%if %{with equinox}
BuildRequires: mvn(org.eclipse:osgi)
%endif
%if %{with groovy}
BuildRequires: mvn(org.codehaus.groovy:groovy-all)
%endif
%if %{with spring}
BuildRequires: mvn(ant:ant)
BuildRequires: mvn(commons-logging:commons-logging)
BuildRequires: mvn(com.thoughtworks.qdox:qdox)
BuildRequires: mvn(org.apache.maven:maven-archiver)
BuildRequires: mvn(org.apache.maven:maven-artifact)
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
BuildRequires: mvn(org.apache.maven:maven-project)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.codehaus.plexus:plexus-archiver)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: mvn(org.springframework:spring-beans)
BuildRequires: mvn(org.springframework:spring-context)
BuildRequires: mvn(org.springframework:spring-web)
%endif
%description
The goal of XBean project is to create a plugin based server
@ -62,35 +37,6 @@ support for running with no IoC system, JMX without JMX code,
lifecycle and class loader management, and a rock solid Spring
integration.
%if %{with spring}
# For now blueprint module fails to compile. Disable it.
%if 0
%package blueprint
Summary: Schema-driven namespace handler for Apache Aries Blueprint
%description blueprint
This package provides %{summary}.
%endif
%package classloader
Summary: A flexibie multi-parent classloader
%description classloader
This package provides %{summary}.
%package spring
Summary: Schema-driven namespace handler for spring contexts
Requires: %{name} = %{version}-%{release}
%description spring
This package provides %{summary}.
%package -n maven-%{name}-plugin
Summary: XBean plugin for Apache Maven
%description -n maven-%{name}-plugin
This package provides %{summary}.
%endif
%package javadoc
Summary: API documentation for %{name}
@ -103,9 +49,6 @@ This package provides %{summary}.
# build failing on this due to doxia-sitetools problems
rm src/site/site.xml
%if %{with equinox}
%patch1 -p1
%endif
%patch2 -p1
%pom_remove_parent
@ -122,29 +65,19 @@ rm src/site/site.xml
sed -i 's/org\.apache\.xbean\.asm6/org.objectweb.asm/g' `find xbean-reflect -name '*.java'`
# Prevent modules depending on springframework from building.
%if %{without spring}
%pom_remove_dep org.springframework:
#%%pom_disable_module xbean-blueprint
%pom_disable_module xbean-classloader
%pom_disable_module xbean-spring
%pom_disable_module maven-xbean-plugin
%else
%mvn_package :xbean-classloader classloader
%mvn_package :xbean-spring spring
%mvn_package :maven-xbean-plugin maven-xbean-plugin
%endif
# blueprint FTBFS, disable for now
%pom_disable_module xbean-blueprint
%if %{without equinox}
%pom_remove_dep :xbean-bundleutils xbean-finder
rm -r xbean-finder/src/main/java/org/apache/xbean/finder{,/archive}/Bundle*
%pom_disable_module xbean-bundleutils
%endif
%if %{without groovy}
%pom_disable_module xbean-telnet
%endif
# maven-xbean-plugin invocation makes no sense as there are no namespaces
%pom_remove_plugin :maven-xbean-plugin xbean-classloader
@ -166,21 +99,6 @@ sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
%doc LICENSE NOTICE
%dir %{_javadir}/%{name}
%if %{with spring}
%if 0
%files blueprint -f .mfiles-blueprint
%doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd*
%endif
%files classloader -f .mfiles-classloader
%doc LICENSE NOTICE
%files spring -f .mfiles-spring
%doc LICENSE NOTICE
%files -n maven-%{name}-plugin -f .mfiles-maven-%{name}-plugin
%doc LICENSE NOTICE
%endif
%files javadoc -f .mfiles-javadoc
%doc LICENSE NOTICE