Fix build with maven3

- Use new add_maven_depmap macro
This commit is contained in:
Stanislav Ochotnicky 2011-06-28 10:38:32 +02:00
parent 044499c1d7
commit 8a6698f037

View File

@ -3,7 +3,7 @@
Name: apache-%{short_name}
Version: 2.0.1
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
Summary: Utilities to assist with developing IO functionality
License: ASL 2.0
@ -21,8 +21,6 @@ BuildRequires: apache-commons-parent
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
# This should go away with F-17
Provides: jakarta-%{short_name} = %{epoch}:%{version}-%{release}
@ -48,8 +46,7 @@ This package contains the API documentation for %{name}.
sed -i 's/\r//' *.txt
%build
mvn-local install javadoc:javadoc
mvn-rpmbuild install javadoc:javadoc
%install
@ -61,11 +58,8 @@ ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_name}.pom
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
# following line is only for backwards compatibility. New packages
# should use proper groupid org.apache.commons
%add_to_maven_depmap %{short_name} %{short_name} %{version} JPP %{short_name}
%add_maven_depmap JPP-%{short_name}.pom %{short_name}.jar -a "org.apache.commons:commons-io"
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
@ -76,25 +70,21 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
%{_javadir}/*.jar
%{_mavenpomdir}/JPP-%{short_name}.pom
%{_mavendepmapfragdir}/*
%files javadoc
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt
%doc %{_javadocdir}/%{name}
%changelog
* Thu Jun 23 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1:2.0.1-3
- Fix build with maven3
- Use new add_maven_depmap macro
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild