xbean/xbean.spec

357 lines
12 KiB
RPMSpec
Raw Normal View History

# Conditionals to help breaking eclipse <-> xbean dependency cycle
# when bootstrapping for new architectures
%if 0%{?fedora}
#%%bcond_without equinox
#%%bcond_without spring
%endif
2010-07-13 08:21:01 +00:00
Name: xbean
2012-10-10 13:36:03 +00:00
Version: 3.12
2010-07-13 08:21:01 +00:00
BuildArch: noarch
Release: 2%{?dist}
2010-07-13 08:21:01 +00:00
Summary: Java plugin based web server
Group: Development/Libraries
License: ASL 2.0
URL: http://geronimo.apache.org/xbean/
# unfortunately no source/binary releases are being made lately, just
# tags in repos and binary releases in maven repositories
2012-10-10 13:36:03 +00:00
# svn export http://svn.apache.org/repos/asf/geronimo/xbean/tags/%{name}-%{version}
# tar caf %{name}-%{version}.tar.xz %{name}-%{version}
2010-07-13 08:21:01 +00:00
Source0: xbean-%{version}.tar.xz
Source1: xbean.depmap
BuildRequires: java-devel
BuildRequires: apache-commons-beanutils
BuildRequires: apache-commons-logging
BuildRequires: objectweb-asm
BuildRequires: ant
BuildRequires: qdox
BuildRequires: slf4j
BuildRequires: maven
2010-07-13 08:21:01 +00:00
BuildRequires: maven-plugin-bundle
BuildRequires: maven-antrun-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-dependency-plugin
2010-07-13 08:21:01 +00:00
BuildRequires: maven-idea-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-plugin
2010-07-13 08:21:01 +00:00
BuildRequires: maven-site-plugin
BuildRequires: maven-shade-plugin
%if %{with equinox}
BuildRequires: eclipse-rcp
%else
BuildRequires: felix-framework
%endif
%if %{with spring}
BuildRequires: apache-commons-jexl
BuildRequires: aries-blueprint
# test deps BuildRequires: cglib
BuildRequires: felix-osgi-compendium
BuildRequires: felix-osgi-core
BuildRequires: geronimo-annotation
BuildRequires: pax-logging
BuildRequires: maven-archiver
BuildRequires: maven-plugin-plugin
BuildRequires: maven-project
BuildRequires: plexus-archiver
BuildRequires: plexus-utils
BuildRequires: springframework
BuildRequires: springframework-beans
BuildRequires: springframework-context
BuildRequires: springframework-web
%endif
2010-07-13 08:21:01 +00:00
Requires: java
Requires: jpackage-utils
2010-07-13 08:21:01 +00:00
Requires: apache-commons-logging
Requires: objectweb-asm
Requires: slf4j
%if %{with equinox}
Requires: eclipse-rcp
2012-09-03 12:45:11 +00:00
%else
Requires: felix-framework
%endif
2010-07-13 08:21:01 +00:00
%description
The goal of XBean project is to create a plugin based server
analogous to Eclipse being a plugin based IDE. XBean will be able to
discover, download and install server plugins from an Internet based
repository. In addition, we include support for multiple IoC systems,
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}
%package blueprint
Summary: Schema-driven namespace handler for Apache Aries Blueprint
Requires: %{name} = %{version}-%{release}
Requires: apache-commons-jexl
Requires: aries-blueprint
Requires: felix-osgi-compendium
Requires: geronimo-annotation
Requires: pax-logging
%description blueprint
This package provides %{summary}.
%package classloader
Summary: A flexibie multi-parent classloader
# maven-xbean-plugin
Requires: %{name} = %{version}-%{release}
Requires: springframework-beans
%description classloader
This package provides %{summary}.
%package spring
Summary: Schema-driven namespace handler for spring contexts
Requires: %{name} = %{version}-%{release}
Requires: springframework-beans
Requires: springframework-context
Requires: springframework-web
%description spring
This package provides %{summary}.
%package -n maven-%{name}-plugin
Summary: XBean plugin for Apache Maven
Requires: %{name}-spring = %{version}-%{release}
Requires: maven
Requires: maven-archiver
Requires: maven-project
Requires: plexus-archiver
Requires: plexus-utils
Requires: qdox
Requires: springframework
Requires: springframework-beans
Requires: springframework-context
Requires: springframework-web
%description -n maven-%{name}-plugin
This package provides %{summary}.
%endif
2010-07-13 08:21:01 +00:00
%package javadoc
Summary: API documentation for %{name}
Group: Documentation
Requires: jpackage-utils
%description javadoc
This package provides %{summary}.
2010-07-13 08:21:01 +00:00
%prep
%setup -q
# build failing on this due to doxia-sitetools problems
rm src/site/site.xml
%pom_remove_parent
2012-07-13 10:37:33 +00:00
%pom_remove_dep mx4j:mx4j
%pom_remove_dep :xbean-asm-shaded xbean-reflect
# These aren't needed for now
2012-07-13 10:37:33 +00:00
%pom_disable_module xbean-asm-shaded
%pom_disable_module xbean-finder-shaded
%pom_disable_module xbean-telnet
2010-07-13 08:21:01 +00:00
# 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
%endif
# Replace generic OSGi dependencies with either Equinox or Felix
%pom_remove_dep :org.osgi.core xbean-bundleutils
%pom_remove_dep org.eclipse:osgi xbean-bundleutils
%if %{with equinox}
%pom_add_dep org.eclipse.osgi:org.eclipse.osgi xbean-bundleutils
%else
rm -rf xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/equinox/
%pom_add_dep org.apache.felix:org.apache.felix.framework xbean-bundleutils
%endif
2010-07-13 08:21:01 +00:00
# Fix dependency on xbean-asm-shaded to original objectweb-asm
sed -i 's/org.apache.xbean.asm/org.objectweb.asm/' \
xbean-reflect/src/main/java/org/apache/xbean/recipe/XbeanAsmParameterNameLoader.java
# disable copy of internal aries-blueprint
sed -i "s|<Private-Package>|<!--Private-Package>|" xbean-blueprint/pom.xml
sed -i "s|</Private-Package>|</Private-Package-->|" xbean-blueprint/pom.xml
# Fix ant groupId
find -name pom.xml -exec sed -i "s|<groupId>ant</groupId>|<groupId>org.apache.ant</groupId>|" {} \;
# Fix cglib artifactId
find -name pom.xml -exec sed -i "s|<artifactId>cglib-nodep</artifactId>|<artifactId>cglib</artifactId>|" {} \;
2010-07-13 08:21:01 +00:00
%build
mvn-rpmbuild -e \
-Dmaven.compiler.source=1.5 \
-Dmaven.compiler.target=1.5 \
-Dmaven.local.depmap.file="%{SOURCE1}" \
-Dmaven.test.skip=true \
install javadoc:aggregate
2010-07-13 08:21:01 +00:00
%install
install -dm 755 $RPM_BUILD_ROOT/%{_javadir}/%{name}
install -dm 755 $RPM_BUILD_ROOT/%{_mavenpomdir}
install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}
install -dm 755 $RPM_BUILD_ROOT/%{_javadocdir}/%{name}
2010-07-13 08:21:01 +00:00
# parent pom
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-main.pom
%add_maven_depmap JPP.%{name}-main.pom
2010-07-13 08:21:01 +00:00
for sub in bundleutils classpath finder naming reflect; do
install -m 644 %{name}-${sub}/target/%{name}-${sub}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-${sub}.jar
install -pm 644 %{name}-${sub}/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-${sub}.pom
%add_maven_depmap JPP.%{name}-%{name}-${sub}.pom %{name}/%{name}-${sub}.jar
2010-07-13 08:21:01 +00:00
done
%if %{with spring}
for m in blueprint classloader spring; do
install -m 644 %{name}-${m}/target/%{name}-${m}-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/%{name}-${m}.jar;
install -pm 644 %{name}-${m}/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-%{name}-${m}.pom
%add_maven_depmap JPP.%{name}-%{name}-${m}.pom %{name}/%{name}-${m}.jar -f ${m}
done
# maven-xbean-plugin
install -m 644 maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT/%{_javadir}/%{name}/maven-%{name}-plugin.jar
install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
%add_maven_depmap JPP.%{name}-maven-%{name}-plugin.pom %{name}/maven-%{name}-plugin.jar -f maven-plugin
%endif
# javadocs
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
2010-07-13 08:21:01 +00:00
%files
%doc LICENSE NOTICE
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/%{name}-bundleutils.jar
%{_javadir}/%{name}/%{name}-classpath.jar
%{_javadir}/%{name}/%{name}-finder.jar
%{_javadir}/%{name}/%{name}-naming.jar
%{_javadir}/%{name}/%{name}-reflect.jar
%{_mavenpomdir}/JPP.%{name}-main.pom
%{_mavenpomdir}/JPP.%{name}-%{name}-bundleutils.pom
%{_mavenpomdir}/JPP.%{name}-%{name}-classpath.pom
%{_mavenpomdir}/JPP.%{name}-%{name}-finder.pom
%{_mavenpomdir}/JPP.%{name}-%{name}-naming.pom
%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
2010-07-13 08:21:01 +00:00
%{_mavendepmapfragdir}/%{name}
%if %{with spring}
%files blueprint
%doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd*
%{_javadir}/%{name}/%{name}-blueprint.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-blueprint.pom
%{_mavendepmapfragdir}/%{name}-blueprint
%files classloader
%doc LICENSE NOTICE
%{_javadir}/%{name}/%{name}-classloader.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-classloader.pom
%{_mavendepmapfragdir}/%{name}-classloader
%files spring
%doc LICENSE NOTICE
%{_javadir}/%{name}/%{name}-spring.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
%{_mavendepmapfragdir}/%{name}-spring
%files -n maven-%{name}-plugin
%doc LICENSE NOTICE
%{_javadir}/%{name}/maven-%{name}-plugin.jar
%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
%{_mavendepmapfragdir}/%{name}-maven-plugin
%endif
2010-07-13 08:21:01 +00:00
%files javadoc
%doc LICENSE NOTICE
2010-07-13 08:21:01 +00:00
%{_javadocdir}/%{name}
%changelog
* Tue Oct 16 2012 gil cattaneo <puntogil@libero.it> - 3.12-2
- Enable xbean-blueprint and xbean-classloader modules
2012-10-10 13:36:03 +00:00
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.12-1
- Update to upstream version 3.12
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-8
- Revert previous changes.
2012-10-10 14:33:14 +00:00
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 3.11.1-7
- Disable parts dependent on Eclipse (for bootstraping purpose).
* Wed Oct 10 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-6
- Implement equinox and spring conditionals
2012-09-03 12:45:11 +00:00
* Mon Sep 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-5
- Fix eclipse requires
2012-08-27 10:52:20 +00:00
* Mon Aug 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-4
- Fix felix-framework enabling patch
* Mon Aug 6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-3
- Enable xbean-spring
- Enable maven-xbean-plugin
- Remove RPM bug workaround
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jul 13 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.11.1-1
- Update to the upstream version 3.11.1
- Force use of Equinox instead of Felix
- Convert patch to POM macros
* Thu May 3 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-5
- Remove mx4j from deps (javax.management provided by JDK 1.5+)
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-4
- BR felix-framework instead of felix-osgi-core.
* Tue Apr 24 2012 Alexander Kurtakov <akurtako@redhat.com> 3.8-3
- Do not build equinox specific parts for RHEL.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 6 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.8-1
- Update to latest upstream version
- Build with maven 3
- Packaging & guidelines fixes
* Sat May 28 2011 Marek Goldmann <mgoldman@redhat.com> - 3.7-7
- Added xbean-finder and xbean-bundleutils submodules
* Fri Mar 4 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-6
- Add comment for removing javadoc
- Fix maven 3 build
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Dec 6 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-4
- Fix pom filename (Resolves rhbz#655827)
- Add depmap for main pom file
- Fixes according to new guidelines (versionless jars, javadocs)
* Fri Jul 30 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-3
- Use javadoc:aggregate to generate javadocs
2010-07-13 08:21:01 +00:00
* Fri Jul 9 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-2
- Add license to javadoc subpackage
* Mon Jun 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.7-1
- First release