apache-commons-exec/apache-commons-exec.spec
Tom "spot" Callaway e231409bff fix maven fragment
2011-03-07 14:53:41 -05:00

129 lines
3.5 KiB
RPMSpec

%global base_name exec
%global short_name commons-%{base_name}
Name: apache-commons-exec
Version: 1.1
Release: 3%{?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
BuildRequires: maven-surefire-maven-plugin
BuildRequires: maven-antrun-plugin
BuildRequires: maven-assembly-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-idea-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: maven-plugin-bundle
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
Commons Exec is a library for dealing with external process execution and
environment management in Java.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{short_name}-%{version}-src
# Shell scripts used for unit tests must be executable (see
# http://commons.apache.org/exec/faq.html#environment-testing)
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
%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
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
%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
%files
%defattr(-,root,root,-)
%doc LICENSE.txt NOTICE.txt STATUS
%{_mavenpomdir}/*
%{_javadir}/*.jar
%{_mavendepmapfragdir}/*
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
* Mon Mar 07 2011 Tom Callaway <spot@fedoraproject.org> - 1.1-3
- fix maven fragment
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Dec 28 2010 Mohamed El Morabity <melmorabity@fedorapeople.org> - 1.1-1
- Update to 1.1
* Wed Sep 1 2010 Alexander Kurtakov <akurtako@redhat.com> 1.0.1-4
- BR iputils. Needed by tests.
* Wed Sep 1 2010 Alexander Kurtakov <akurtako@redhat.com> 1.0.1-3
- Change maven plugin names to the new ones.
* Wed Feb 3 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 1.0.1-2
- Add missing %%post/%%postun Requires
- Use macro %%{_mavendepmapfragdir} instead of %%{_datadir}/maven2/pom
- Unown directories %%{_mavenpomdir} and %%{_mavendepmapfragdir}
* Mon Jan 18 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 1.0.1-1
- Initial RPM release