melmorabity 181746
%global base_name exec
melmorabity 181746
%global short_name commons-%{base_name}
melmorabity 181746
melmorabity 181746
Name:           apache-commons-exec
melmorabity 181746
Version:        1.0.1
melmorabity 181746
Release:        2%{?dist}
melmorabity 181746
Summary:        Java library to reliably execute external processes from within the JVM
melmorabity 181746
melmorabity 181746
Group:          Development/Libraries
melmorabity 181746
License:        ASL 2.0
melmorabity 181746
URL:            http://commons.apache.org/exec/
melmorabity 181746
Source0:        http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
melmorabity 181746
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
melmorabity 181746
melmorabity 181746
BuildRequires:  java-devel >= 1:1.6.0
melmorabity 181746
BuildRequires:  jpackage-utils
melmorabity 181746
BuildRequires:  maven-doxia-sitetools
melmorabity 181746
BuildRequires:  maven-plugin-bundle
melmorabity 181746
BuildRequires:  maven-surefire-maven-plugin
melmorabity 181746
BuildRequires:  maven-surefire-provider-junit
melmorabity 181746
BuildRequires:  maven2-plugin-antrun
melmorabity 181746
BuildRequires:  maven2-plugin-assembly
melmorabity 181746
BuildRequires:  maven2-plugin-compiler
melmorabity 181746
BuildRequires:  maven2-plugin-idea
melmorabity 181746
BuildRequires:  maven2-plugin-install
melmorabity 181746
BuildRequires:  maven2-plugin-jar
melmorabity 181746
BuildRequires:  maven2-plugin-javadoc
melmorabity 181746
BuildRequires:  maven2-plugin-resources
melmorabity 181746
Requires:       java >= 1:1.6.0
melmorabity 181746
Requires:       jpackage-utils
melmorabity 181746
Requires(post): jpackage-utils
melmorabity 181746
Requires(postun):jpackage-utils
melmorabity 181746
BuildArch:      noarch
melmorabity 181746
melmorabity 181746
%description
melmorabity 181746
Commons Exec is a library for dealing with external process execution and
melmorabity 181746
environment management in Java.
melmorabity 181746
melmorabity 181746
melmorabity 181746
%package javadoc
melmorabity 181746
Summary:        Javadocs for %{name}
melmorabity 181746
Group:          Documentation
melmorabity 181746
Requires:       %{name} = %{version}-%{release}
melmorabity 181746
Requires:       jpackage-utils
melmorabity 181746
melmorabity 181746
%description javadoc
melmorabity 181746
This package contains the API documentation for %{name}.
melmorabity 181746
melmorabity 181746
melmorabity 181746
%prep
melmorabity 181746
%setup -q -n %{short_name}-%{version}-src
melmorabity 181746
melmorabity 181746
# Shell scripts used for unit tests must be executable (see
melmorabity 181746
# http://commons.apache.org/exec/faq.html#environment-testing)
melmorabity 181746
chmod a+x src/test/scripts/*.sh
melmorabity 181746
melmorabity 181746
melmorabity 181746
%build
melmorabity 181746
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
melmorabity 181746
mkdir -p $MAVEN_REPO_LOCAL
melmorabity 181746
mvn-jpp \
melmorabity 181746
    -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
melmorabity 181746
    install javadoc:javadoc
melmorabity 181746
melmorabity 181746
melmorabity 181746
%install
melmorabity 181746
rm -rf $RPM_BUILD_ROOT
melmorabity 181746
melmorabity 181746
mkdir -p $RPM_BUILD_ROOT%{_javadir}
melmorabity 181746
cp -p target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
melmorabity 181746
ln -s %{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{short_name}.jar
melmorabity 181746
melmorabity 181746
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
melmorabity 181746
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
melmorabity 181746
melmorabity 181746
mkdir -p $RPM_BUILD_ROOT%{_datadir}/maven2/poms
melmorabity 181746
cp -p pom.xml $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}.pom
melmorabity 181746
melmorabity 181746
%add_to_maven_depmap org.apache.maven %{name} %{version} JPP %{name}
melmorabity 181746
melmorabity 181746
melmorabity 181746
%clean
melmorabity 181746
rm -rf $RPM_BUILD_ROOT
melmorabity 181746
melmorabity 181746
melmorabity 181746
%post
melmorabity 181746
%update_maven_depmap
melmorabity 181746
melmorabity 181746
melmorabity 181746
%postun
melmorabity 181746
%update_maven_depmap
melmorabity 181746
melmorabity 181746
melmorabity 181746
%files
melmorabity 181746
%defattr(-,root,root,-)
melmorabity 181746
%doc LICENSE.txt NOTICE.txt STATUS
melmorabity 181746
%{_mavenpomdir}/*
melmorabity 181746
%{_javadir}/*.jar
melmorabity 181746
%{_mavendepmapfragdir}/*
melmorabity 181746
melmorabity 181746
melmorabity 181746
%files javadoc
melmorabity 181746
%defattr(-,root,root,-)
melmorabity 181746
%{_javadocdir}/%{name}
melmorabity 181746
melmorabity 181746
melmorabity 181746
%changelog
melmorabity 181746
* Wed Feb  3 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 1.0.1-2
melmorabity 181746
- Add missing %%post/%%postun Requires
melmorabity 181746
- Use macro %%{_mavendepmapfragdir} instead of %%{_datadir}/maven2/pom
melmorabity 181746
- Unown directories %%{_mavenpomdir} and %%{_mavendepmapfragdir}
melmorabity 181746
melmorabity 181746
* Mon Jan 18 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 1.0.1-1
melmorabity 181746
- Initial RPM release