From 2cf299b9b4cbb16d5b057371caca4893bd63bd24 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Thu, 16 Dec 2010 17:05:37 +0100 Subject: [PATCH] Add compatibility depmap - Use new maven plugin names - Use versionless jars/javadocs --- plexus-utils.spec | 50 +++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/plexus-utils.spec b/plexus-utils.spec index bd4d1bc..3493675 100644 --- a/plexus-utils.spec +++ b/plexus-utils.spec @@ -33,7 +33,7 @@ Name: plexus-utils Version: 2.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Plexus Common Utilities License: ASL 1.1 and ASL 2.0 and MIT Group: Development/Libraries @@ -42,20 +42,18 @@ Source0: plexus-utils-%{version}.tar.gz # svn export http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.1/ Patch0: plexus-utils-remove-release-plugin.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - BuildArch: noarch BuildRequires: jpackage-utils >= 0:1.6 Requires: jpackage-utils Requires(postun): jpackage-utils BuildRequires: maven2 -BuildRequires: maven2-plugin-compiler -BuildRequires: maven2-plugin-install -BuildRequires: maven2-plugin-jar -BuildRequires: maven2-plugin-javadoc -BuildRequires: maven2-plugin-resources -BuildRequires: maven2-plugin-surefire +BuildRequires: maven-compiler-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-resources-plugin +BuildRequires: maven-surefire-plugin BuildRequires: maven-doxia-sitetools BuildRequires: maven-surefire-provider-junit @@ -92,25 +90,22 @@ mvn-jpp \ install javadoc:javadoc %install -rm -rf $RPM_BUILD_ROOT # jars -install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/plexus +install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{parent} install -pm 644 target/%{name}-%{version}.jar \ - $RPM_BUILD_ROOT%{_javadir}/plexus/utils-%{version}.jar -%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname} -(cd $RPM_BUILD_ROOT%{_javadir}/plexus && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) + $RPM_BUILD_ROOT%{_javadir}/plexus/utils.jar # pom -install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms -install -pm 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-%{subname}.pom +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{parent}-%{subname}.pom + +%add_to_maven_depmap org.codehaus.plexus %{name} %{version} JPP/%{parent} %{subname} +# compatibility depmap +%add_to_maven_depmap plexus %{name} %{version} JPP/%{parent} %{subname} # javadoc -install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} -ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} - -%clean -rm -rf $RPM_BUILD_ROOT +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %post %update_maven_depmap @@ -118,6 +113,11 @@ rm -rf $RPM_BUILD_ROOT %postun %update_maven_depmap +%pre javadoc +# workaround for rpm bug, can be removed in F-17 +[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \ +rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || : + %files %defattr(-,root,root,-) %{_javadir}/* @@ -126,10 +126,14 @@ rm -rf $RPM_BUILD_ROOT %files javadoc %defattr(-,root,root,-) -%doc %{_javadocdir}/%{name}-%{version} %doc %{_javadocdir}/%{name} %changelog +* Thu Dec 16 2010 Stanislav Ochotnicky - 2.0.5-2 +- Use versionless jars/javadocs +- Use new maven plugin names +- Add compatibility depmap + * Wed May 5 2010 Mary Ellen Foster 2.0.5-1 - Update to 2.0.5