142 lines
4.4 KiB
RPMSpec
142 lines
4.4 KiB
RPMSpec
%global base_name math
|
|
%global short_name commons-%{base_name}
|
|
|
|
Name: apache-%{short_name}
|
|
Version: 2.1
|
|
Release: 2%{?dist}
|
|
Summary: Java library of lightweight mathematics and statistics components
|
|
|
|
Group: Development/Libraries
|
|
License: ASL 1.1 and ASL 2.0 and BSD
|
|
URL: http://commons.apache.org/%{base_name}/
|
|
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
|
|
Patch0: %{short_name}-remove-clirr-from-pom.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: java-devel >= 1:1.6.0
|
|
BuildRequires: jpackage-utils
|
|
BuildRequires: junit4
|
|
BuildRequires: maven2 >= 2.2.1
|
|
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
|
|
#Should be replaced by maven-surefire-plugin after f15 branch
|
|
BuildRequires: maven-surefire-maven-plugin
|
|
BuildRequires: maven-surefire-provider-junit4
|
|
Requires: java >= 1:1.6.0
|
|
Requires: jpackage-utils
|
|
Requires(post): jpackage-utils
|
|
Requires(postun): jpackage-utils
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Commons Math is a library of lightweight, self-contained mathematics and
|
|
statistics components addressing the most common problems not available in the
|
|
Java programming language or Commons Lang.
|
|
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
Group: Documentation
|
|
Requires: jpackage-utils
|
|
|
|
%description javadoc
|
|
This package contains the API documentation for %{name}.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{short_name}-%{version}-src
|
|
%patch0 -p0
|
|
|
|
|
|
%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 %{buildroot}
|
|
|
|
# jars
|
|
install -d -m 0755 %{buildroot}%{_javadir}
|
|
install -pm 644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done)
|
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
|
|
|
# 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}
|
|
|
|
# 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}
|
|
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE.txt NOTICE.txt RELEASE-NOTES.txt
|
|
%{_javadir}/*
|
|
%{_mavenpomdir}/*
|
|
%{_mavendepmapfragdir}/*
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE.txt
|
|
%{_javadocdir}/%{name}-%{version}
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|
|
* Fri Oct 22 2010 Chris Spike <chris.spike@arcor.de> 2.1-2
|
|
- Fixed maven-surefire-plugin BR for F14
|
|
|
|
* Fri Oct 22 2010 Chris Spike <chris.spike@arcor.de> 2.1-1
|
|
- Updated to 2.1
|
|
- Removed dependency on main package for -javadoc subpackage
|
|
- Fixed maven depmap entry
|
|
- Added jarfile symlinks (rhbz#612455)
|
|
- Added javadoc symlinks
|
|
- Added license file to -javadoc subpackage
|
|
|
|
* Wed Feb 3 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-6
|
|
- Add missing %%post/%%postun Requires
|
|
- Use macro %%{_mavendepmapfragdir} instead of %%{_datadir}/maven2/pom
|
|
- Unown directories %%{_mavenpomdir} and %%{_mavendepmapfragdir}
|
|
|
|
* Wed Jan 20 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-5
|
|
- Drop duplicate BuildRequires maven2
|
|
|
|
* Fri Jan 8 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-4
|
|
- Update description
|
|
- Add ASL 1.1 and BSD to License tag
|
|
|
|
* Thu Jan 7 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-3
|
|
- Change RPM name from "jakarta-commons-math" to "apache-commons-math"
|
|
|
|
* Sun Jan 3 2010 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-2
|
|
- Update Summary tag
|
|
|
|
* Mon Dec 28 2009 ELMORABITY Mohamed <melmorabity@fedoraproject.org> 2.0-1
|
|
- Initial RPM release
|