From 3f27a4e90f60c678a6581e3a19430dd4cfa3ccafc94be038082e8c5424f925cd Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 23 Jan 2019 18:06:33 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/xbean?expand=0&rev=3 --- xbean.spec | 124 +++++------------------------------------------------ 1 file changed, 11 insertions(+), 113 deletions(-) diff --git a/xbean.spec b/xbean.spec index 89d0d97..62d4ca5 100644 --- a/xbean.spec +++ b/xbean.spec @@ -16,9 +16,6 @@ # -%bcond_with equinox -%bcond_with groovy -%bcond_with spring Name: xbean Version: 4.5 Release: 0 @@ -29,8 +26,6 @@ URL: http://geronimo.apache.org/xbean/ Source0: http://repo2.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip # Fix dependency on xbean-asm4-shaded to original objectweb-asm Patch0: 0001-Unshade-ASM.patch -# Compatibility with Eclipse Luna (rhbz#1087461) -Patch1: 0002-Port-to-Eclipse-Luna-OSGi.patch Patch2: 0003-Port-to-QDox-2.0.patch BuildRequires: apache-commons-logging BuildRequires: asm5 @@ -49,28 +44,6 @@ Requires: asm5 Requires: log4j Requires: slf4j BuildArch: noarch -%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(com.thoughtworks.qdox:qdox) -BuildRequires: mvn(commons-logging:commons-logging) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) -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.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 @@ -81,40 +54,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 -Group: Development/Libraries/Java - -%description blueprint -This package provides %{summary}. -%endif - -%package classloader -Summary: A flexibie multi-parent classloader -Group: Development/Libraries/Java - -%description classloader -This package provides %{summary}. - -%package spring -Summary: Schema-driven namespace handler for spring contexts -Group: Development/Libraries/Java -Requires: %{name} = %{version}-%{release} - -%description spring -This package provides %{summary}. - -%package -n maven-%{name}-plugin -Summary: XBean plugin for Apache Maven -Group: Development/Libraries/Java - -%description -n maven-%{name}-plugin -This package provides %{summary}. -%endif - %package javadoc Summary: API documentation for %{name} Group: Development/Libraries/Java @@ -128,9 +67,6 @@ This package provides %{summary}. rm src/site/site.xml %patch0 -p1 -%if %{with equinox} -%patch1 -p1 -%endif %patch2 -p1 %pom_remove_parent @@ -145,30 +81,19 @@ rm src/site/site.xml %pom_xpath_remove pom:optional xbean-asm-util # 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 - rm -rf maven-xbean-plugin -%else -# %mvn_package :xbean-classloader classloader -# %mvn_package :xbean-spring spring -# %mvn_package :maven-xbean-plugin maven-xbean-plugin -%endif +%pom_remove_dep org.springframework: +%pom_disable_module xbean-classloader +%pom_disable_module xbean-spring +%pom_disable_module maven-xbean-plugin +rm -rf maven-xbean-plugin # 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 +%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 -%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 @@ -199,49 +124,22 @@ javadoc -d build/apidoc -source 6 -encoding utf-8 \ # jars && poms install -dm 755 %{buildroot}%{_javadir}/%{name} install -dm 755 %{buildroot}%{_mavenpomdir}/%{name} +install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%add_maven_depmap %{name}/%{name}.pom for i in xbean-asm-util xbean-classpath xbean-finder xbean-naming xbean-reflect; do install -m 0644 $i/$i.jar %{buildroot}%{_javadir}/%{name} install -m 0644 $i/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/$i.pom %add_maven_depmap %{name}/$i.pom %{name}/$i.jar done -install -m 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom -%add_maven_depmap %{name}/%{name}.pom # javadoc install -dm 755 %{buildroot}/%{_javadocdir}/%{name} cp -aL build/apidoc/* %{buildroot}/%{_javadocdir}/%{name} %fdupes -s %{buildroot}/%{_javadocdir}/%{name} -%files +%files -f .mfiles %license LICENSE %doc NOTICE -%{_javadir}/%{name} -%{_mavenpomdir}/%{name} -%if %{defined _maven_repository} -%{_mavendepmapfragdir}/%{name} -%else -%{_datadir}/maven-metadata/%{name}.xml* -%endif - -%if %{with spring} -%if 0 -%files blueprint -f .mfiles-blueprint -%license LICENSE -%doc NOTICE %{name}-blueprint/target/restaurant.xsd* -%endif - -%files classloader -f .mfiles-classloader -%license LICENSE -%doc NOTICE - -%files spring -f .mfiles-spring -%license LICENSE -%doc NOTICE - -%files -n maven-%{name}-plugin -f .mfiles-maven-%{name}-plugin -%license LICENSE -%doc NOTICE -%endif %files javadoc %license LICENSE