Build with maven 3.

- Adapt to current guidelines.
This commit is contained in:
Alexander Kurtakov 2011-11-30 18:43:32 +02:00
parent e231409bff
commit 3be6169233

View File

@ -3,14 +3,13 @@
Name: apache-commons-exec
Version: 1.1
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Java library to reliably execute external processes from within the JVM
Group: Development/Libraries
License: ASL 2.0
URL: http://commons.apache.org/exec/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: iputils
BuildRequires: java-devel >= 1:1.6.0
@ -27,8 +26,6 @@ BuildRequires: maven-resources-plugin
BuildRequires: maven-release-plugin
Requires: java >= 1:1.6.0
Requires: jpackage-utils
Requires(post): jpackage-utils
Requires(postun):jpackage-utils
BuildArch: noarch
%description
@ -55,55 +52,38 @@ chmod a+x src/test/scripts/*.sh
%build
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL
mvn-jpp \
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \
install javadoc:javadoc
mvn-rpmbuild install javadoc:javadoc
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
ln -s %{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
cp -p target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
ln -s %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/maven2/poms
cp -p pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}.pom
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
cp -p pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
%add_to_maven_depmap org.apache.commons %{short_name} %{version} JPP %{short_name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%update_maven_depmap
%postun
%update_maven_depmap
%add_maven_depmap JPP-%{name}.pom %{name}.jar
%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt STATUS
%{_mavenpomdir}/*
%{_javadir}/*.jar
%{_mavendepmapfragdir}/*
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Wed Nov 30 2011 Alexander Kurtakov <akurtako@redhat.com> 1.1-4
- Build with maven 3.
- Adapt to current guidelines.
* Mon Mar 07 2011 Tom Callaway <spot@fedoraproject.org> - 1.1-3
- fix maven fragment