Update to latest packaging guidelines

This commit is contained in:
Stanislav Ochotnicky 2013-08-08 13:34:49 +02:00
parent 53770c367a
commit b9433e80c4

View File

@ -9,15 +9,13 @@ Name: xbean
Version: 3.13 Version: 3.13
BuildArch: noarch BuildArch: noarch
Release: 3%{?dist} Release: 4%{?dist}
Summary: Java plugin based web server Summary: Java plugin based web server
Group: Development/Libraries
License: ASL 2.0 License: ASL 2.0
URL: http://geronimo.apache.org/xbean/ URL: http://geronimo.apache.org/xbean/
Source0: http://repo2.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip Source0: http://repo2.maven.org/maven2/org/apache/%{name}/%{name}/%{version}/%{name}-%{version}-source-release.zip
Source1: xbean.depmap
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: apache-commons-beanutils BuildRequires: apache-commons-beanutils
@ -62,16 +60,6 @@ BuildRequires: springframework-context
BuildRequires: springframework-web BuildRequires: springframework-web
%endif %endif
Requires: java
Requires: apache-commons-logging
Requires: objectweb-asm
Requires: slf4j
%if %{with equinox}
Requires: eclipse-equinox-osgi
%else
Requires: felix-framework
%endif
%description %description
The goal of XBean project is to create a plugin based server 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 analogous to Eclipse being a plugin based IDE. XBean will be able to
@ -86,12 +74,6 @@ integration.
%if 0 %if 0
%package blueprint %package blueprint
Summary: Schema-driven namespace handler for Apache Aries 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 %description blueprint
This package provides %{summary}. This package provides %{summary}.
@ -99,9 +81,6 @@ This package provides %{summary}.
%package classloader %package classloader
Summary: A flexibie multi-parent classloader Summary: A flexibie multi-parent classloader
# maven-xbean-plugin
Requires: %{name} = %{version}-%{release}
Requires: springframework-beans
%description classloader %description classloader
This package provides %{summary}. This package provides %{summary}.
@ -109,26 +88,12 @@ This package provides %{summary}.
%package spring %package spring
Summary: Schema-driven namespace handler for spring contexts Summary: Schema-driven namespace handler for spring contexts
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: springframework-beans
Requires: springframework-context
Requires: springframework-web
%description spring %description spring
This package provides %{summary}. This package provides %{summary}.
%package -n maven-%{name}-plugin %package -n maven-%{name}-plugin
Summary: XBean plugin for Apache Maven 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 %description -n maven-%{name}-plugin
This package provides %{summary}. This package provides %{summary}.
@ -136,7 +101,6 @@ This package provides %{summary}.
%package javadoc %package javadoc
Summary: API documentation for %{name} Summary: API documentation for %{name}
Group: Documentation
%description javadoc %description javadoc
This package provides %{summary}. This package provides %{summary}.
@ -162,6 +126,10 @@ rm src/site/site.xml
%pom_disable_module xbean-classloader %pom_disable_module xbean-classloader
%pom_disable_module xbean-spring %pom_disable_module xbean-spring
%pom_disable_module maven-xbean-plugin %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 %endif
# blueprint FTBFS, disable for now # blueprint FTBFS, disable for now
%pom_disable_module xbean-blueprint %pom_disable_module xbean-blueprint
@ -192,95 +160,38 @@ find -name pom.xml -exec sed -i "s|<groupId>ant</groupId>|<groupId>org.apache.an
find -name pom.xml -exec sed -i "s|<artifactId>cglib-nodep</artifactId>|<artifactId>cglib</artifactId>|" {} \; find -name pom.xml -exec sed -i "s|<artifactId>cglib-nodep</artifactId>|<artifactId>cglib</artifactId>|" {} \;
%build %build
mvn-rpmbuild -e \ %mvn_build -f
-Dmaven.compiler.source=1.5 \
-Dmaven.compiler.target=1.5 \
-Dmaven.local.depmap.file="%{SOURCE1}" \
-Dmaven.test.skip=true \
install javadoc:aggregate
%install %install
install -dm 755 $RPM_BUILD_ROOT/%{_javadir}/%{name} %mvn_install
install -dm 755 $RPM_BUILD_ROOT/%{_mavenpomdir}
install -dm 755 $RPM_BUILD_ROOT/%{_mavendepmapfragdir}
install -dm 755 $RPM_BUILD_ROOT/%{_javadocdir}/%{name}
# parent pom %files -f .mfiles
install -pm 644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-main.pom
%add_maven_depmap JPP.%{name}-main.pom
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
done
%if %{with spring}
for m in classloader spring; do # blueprint should be there too
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}
%files
%doc LICENSE NOTICE %doc LICENSE NOTICE
%dir %{_javadir}/%{name} %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
%{_mavendepmapfragdir}/%{name}
%if %{with spring} %if %{with spring}
%if 0 %if 0
%files blueprint %files blueprint -f .mfiles-blueprint
%doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd* %doc LICENSE NOTICE %{name}-blueprint/target/restaurant.xsd*
%{_javadir}/%{name}/%{name}-blueprint.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-blueprint.pom
%{_mavendepmapfragdir}/%{name}-blueprint
%endif %endif
%files classloader %files classloader -f .mfiles-classloader
%doc LICENSE NOTICE %doc LICENSE NOTICE
%{_javadir}/%{name}/%{name}-classloader.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-classloader.pom
%{_mavendepmapfragdir}/%{name}-classloader
%files spring %files spring -f .mfiles-spring
%doc LICENSE NOTICE %doc LICENSE NOTICE
%{_javadir}/%{name}/%{name}-spring.jar
%{_mavenpomdir}/JPP.%{name}-%{name}-spring.pom
%{_mavendepmapfragdir}/%{name}-spring
%files -n maven-%{name}-plugin %files -n maven-%{name}-plugin -f .mfiles-maven-%{name}-plugin
%doc LICENSE NOTICE %doc LICENSE NOTICE
%{_javadir}/%{name}/maven-%{name}-plugin.jar
%{_mavenpomdir}/JPP.%{name}-maven-%{name}-plugin.pom
%{_mavendepmapfragdir}/%{name}-maven-plugin
%endif %endif
%files javadoc %files javadoc -f .mfiles-javadoc
%doc LICENSE NOTICE %doc LICENSE NOTICE
%{_javadocdir}/%{name}
%changelog %changelog
* Thu Aug 08 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.13-4
- Update to latest packaging guidelines
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-3 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild