Add compatibility depmap

- Use new maven plugin names
- Use versionless jars/javadocs
This commit is contained in:
Stanislav Ochotnicky 2010-12-16 17:05:37 +01:00
parent 979ace12ed
commit 2cf299b9b4

View File

@ -33,7 +33,7 @@
Name: plexus-utils Name: plexus-utils
Version: 2.0.5 Version: 2.0.5
Release: 1%{?dist} Release: 2%{?dist}
Summary: Plexus Common Utilities Summary: Plexus Common Utilities
License: ASL 1.1 and ASL 2.0 and MIT License: ASL 1.1 and ASL 2.0 and MIT
Group: Development/Libraries 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/ # svn export http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.1/
Patch0: plexus-utils-remove-release-plugin.patch Patch0: plexus-utils-remove-release-plugin.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: jpackage-utils >= 0:1.6 BuildRequires: jpackage-utils >= 0:1.6
Requires: jpackage-utils Requires: jpackage-utils
Requires(postun): jpackage-utils Requires(postun): jpackage-utils
BuildRequires: maven2 BuildRequires: maven2
BuildRequires: maven2-plugin-compiler BuildRequires: maven-compiler-plugin
BuildRequires: maven2-plugin-install BuildRequires: maven-install-plugin
BuildRequires: maven2-plugin-jar BuildRequires: maven-jar-plugin
BuildRequires: maven2-plugin-javadoc BuildRequires: maven-javadoc-plugin
BuildRequires: maven2-plugin-resources BuildRequires: maven-resources-plugin
BuildRequires: maven2-plugin-surefire BuildRequires: maven-surefire-plugin
BuildRequires: maven-doxia-sitetools BuildRequires: maven-doxia-sitetools
BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit
@ -92,25 +90,22 @@ mvn-jpp \
install javadoc:javadoc install javadoc:javadoc
%install %install
rm -rf $RPM_BUILD_ROOT
# jars # 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 \ install -pm 644 target/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/plexus/utils-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/plexus/utils.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)
# pom # pom
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{parent}-%{subname}.pom 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 # javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post %post
%update_maven_depmap %update_maven_depmap
@ -118,6 +113,11 @@ rm -rf $RPM_BUILD_ROOT
%postun %postun
%update_maven_depmap %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 %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_javadir}/* %{_javadir}/*
@ -126,10 +126,14 @@ rm -rf $RPM_BUILD_ROOT
%files javadoc %files javadoc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}
%changelog %changelog
* Thu Dec 16 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0.5-2
- Use versionless jars/javadocs
- Use new maven plugin names
- Add compatibility depmap
* Wed May 5 2010 Mary Ellen Foster <mefoster at gmail.com> 2.0.5-1 * Wed May 5 2010 Mary Ellen Foster <mefoster at gmail.com> 2.0.5-1
- Update to 2.0.5 - Update to 2.0.5