maven-antrun-plugin/maven-antrun-plugin.spec
Alexander Kurtakov cd009f4540 - Update to 1.5.
- Use upstream tarball.
- Add License and readme as doc.
2010-09-20 18:44:01 +03:00

123 lines
3.1 KiB
RPMSpec

Name: maven-antrun-plugin
Version: 1.5
Release: 1%{?dist}
Summary: Maven AntRun Plugin
Group: Development/Libraries
License: ASL 2.0
URL: http://maven.apache.org/plugins/maven-antrun-plugin/
Source0: http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}/%{name}-%{version}-source-release.zip
Patch0: fix-deps.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: plexus-utils
BuildRequires: ant-nodeps
BuildRequires: maven2
BuildRequires: maven-install-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
Requires: ant-nodeps
Requires: maven2
Requires: jpackage-utils
Requires: java
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
Obsoletes: maven2-plugin-antrun <= 0:2.0.8
Provides: maven2-plugin-antrun = 1:%{version}-%{release}
%description
Runs Ant scripts embedded in the POM
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch0
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mvn-jpp \
-e \
-Dmaven2.jpp.mode=true \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
install javadoc:javadoc
%install
rm -rf %{buildroot}
# jars
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap org.apache.maven.plugins maven-antrun-plugin %{version} JPP maven-antrun-plugin
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
rm -rf target/site/api*
%post
%update_maven_depmap
%postun
%update_maven_depmap
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc LICENSE NOTICE
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
%defattr(-,root,root,-)
%doc LICENSE NOTICE
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
* Mon Sep 20 2010 Alexander Kurtakov <akurtako@redhat.com> 1.5-1
- Update to 1.5.
- Use upstream tarball.
- Add License and readme as doc.
* Tue Aug 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4-4
- Fix runtime issue of not finding ant-launcher.
* Tue Aug 31 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4-3
- Add patch to fix build.
* Fri May 28 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4-2
- Add provides/obsoletes.
* Thu May 27 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4-1
- Initial package.