packages jakarta-commons-lang.spec
      Pages: < 1 >  DOWNLOAD      
%define javahome %{_jvmdir}/jdk
Name:          jakarta-commons-lang
Version:       2.3
Release:       4mamba
Summary:       Jakarta Commons Lang Package
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://commons.apache.org/lang/
Source0:       http://archive.apache.org/dist/commons/lang/source/commons-lang-%{version}-src.tar.gz
Source1:       jakarta-commons-lang-2.3.pom
Patch0:        jakarta-commons-2.3-lang-notarget.patch
Patch1:        jakarta-commons-2.3-lang-addosgimanifest.patch
License:       Apache License Version 2.0
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The standard Java libraries fail to provide enough methods for manipulation of its core classes. The Lang Component provides these extra methods.

The Lang Component provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, creation and serialization, and System properties. Additionally it contains an inheritable enum type, an exception structure that supports multiple types of nested-Exceptions, basic enhancements to java.util.
Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals. 

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
The standard Java libraries fail to provide enough methods for manipulation of its core classes. The Lang Component provides these extra methods.

The Lang Component provides a host of helper utilities for the java.lang API, notably String manipulation methods, basic numerical methods, object reflection, creation and serialization, and System properties. Additionally it contains an inheritable enum type, an exception structure that supports multiple types of nested-Exceptions, basic enhancements to java.util.
Date and a series of utilities dedicated to help with building methods, such as hashCode, toString and equals. 

This package contains javadoc for %{name}.

%prep
%setup -q -n commons-lang-%{version}-src
perl -pi -e 's/\r//g' *.txt
sed -i 's/\r//' STATUS.html
%patch0
%patch1

%build
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath junit-3.8.2 ant/ant-junit):target/classes:target/tests
ant \
  -Djunit.jar=$(find-jar junit-3.8.2) \
  -Djdk.javadoc=%{_javadocdir}/java \
  -Dfinal.name=commons-lang \
  -Dtest.failonerror=false \
  jar javadoc \
%if "%{stage1}" != "1"
  test
%endif

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -p -m 644 dist/commons-lang.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar

install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-jakarta-commons-lang.pom
%add_to_maven_depmap commons-lang commons-lang %{version} JPP commons-lang

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
  done
)
(
  cd %{buildroot}%{_javadir} 
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/jakarta-commons-lang-%{version}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/jakarta-commons-lang-%{version}
ln -s jakarta-commons-lang-%{version} %{buildroot}%{_javadocdir}/jakarta-commons-lang

##%{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/jakarta-commons-lang-%{version}.jar
%{_javadir}/jakarta-commons-lang.jar
%{_javadir}/commons-lang-%{version}.jar
%{_javadir}/commons-lang.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc STATUS.html LICENSE.txt NOTICE.txt RELEASE-NOTES.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jakarta-commons-lang-%{version}
%{_javadocdir}/jakarta-commons-lang

%changelog
* Thu Mar 24 2011 gil <puntogil@...> 2.3-4mamba
- rebuilt with java-openjdk support

* Sat Oct 30 2010 gil <puntogil@...> 2.3-3mamba
- rebuilt in devel

* Fri Jan 08 2010 gil <puntogil@...> 2.3-2mamba
- add maven pom
- add OSGi support

* Fri Mar 06 2009 gil <puntogil@...> 2.3-1mamba
- package created by autospec