File jakarta-poi.spec of Package jakarta-poi.510

#
# spec file for package jakarta-poi (Version 2.5.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%define section   free
%define base_name poi

Name:           jakarta-poi
Version:        2.5.1
Release:        2
Summary:        Java API To Access Microsoft Format Files
Group:          Development/Languages/Java
License:        The Apache Software License
Url:            http://jakarta.apache.org/poi/
Source0:        poi-src-2.5.1-final-20040804.tar.bz2
#cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic  login
#cvs -z3 -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic export -r HEAD jakarta-poi/src/scratchpad
Source1:        poi-scratchpad-unreleased-src-20050824.tar.bz2
Patch0:         poi-build_xml.patch
Patch1:         %{name}-%{version}_escher-test.patch
Patch2:         %{name}-%{version}-junittest.patch
Patch3:         jakarta-poi-CVE-2012-0213.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  jpackage-utils >= 1.6
BuildRequires:  ant >= 1.6
BuildRequires:  ant-junit >= 1.6
BuildRequires:  junit >= 3.8.1
BuildRequires:  ant-trax >= 1.6
BuildRequires:  jaxp_transform_impl
BuildRequires:  ant-jdepend >= 1.6
BuildRequires:  jdepend >= 2.6
BuildRequires:  jakarta-commons-beanutils >= 1.6.1
BuildRequires:  jakarta-commons-collections >= 2.1
BuildRequires:  jakarta-commons-lang >= 2.0
BuildRequires:  jakarta-commons-logging >= 1.0.3
BuildRequires:  log4j >= 1.2.8
BuildRequires:  xalan-j2 >= 2.5.2
BuildRequires:  xerces-j2 >= 2.6.0
BuildRequires:  java-devel
BuildRequires:  fdupes
Requires:       jakarta-commons-beanutils >= 1.6.1
Requires:       jakarta-commons-collections >= 2.1
Requires:       jakarta-commons-lang >= 2.0
Requires:       jakarta-commons-logging >= 1.0.3
Requires:       log4j >= 1.2.8
Requires:       xalan-j2 >= 2.5.2
Requires:       xerces-j2 >= 2.6.0

%description
The POI project consists of APIs for manipulating various file formats
based upon Microsoft's OLE 2 Compound Document format using pure Java.
In short, you can read and write MS Excel files using Java. Soon,
you'll be able to read and write Word files using Java. POI is your
Java Excel solution as well as your Java Word solution. However, we
have a complete API for porting other OLE 2 Compound Document formats
and welcome others to participate. OLE 2 Compound Document Format based
files include most Microsoft Office files such as XLS and DOC as well
as MFC serialization API based file formats.



Authors:
--------
    * Nick Burch (nick at apache dot org)
    * Nicola Ken Barozzi (barozzi at nicolaken dot com)
    * Andrew C. Oliver (acoliver at apache dot org)
    * Marc Johnson (mjohnson at apache dot org)
    * Glen Stampoultzis (glens at apache.org)
    * Rainer Klute (klute at apache dot org)
    * Ryan Ackley (sackley at apache dot org)
    * Avik Sengupta (avik at apache dot org)
    * Shawn Laubach (slaubach at apache dot org)
    * Danny Mui (dmui at apache dot org)
    * Jason Height (jheight at apache dot org)
    * Tetsuya Kitahata (tetsuya at apache dot org)
    * Yegor Kozlov (yegor at apache dot org)
    * Amol S Deshmukh (amol at apache dot org)

%package        javadoc
License:        The Apache Software License
Summary:        Java API To Access Microsoft Format Files
Group:          Development/Languages/Java

%description    javadoc
The POI project consists of APIs for manipulating various file formats
based upon Microsoft's OLE 2 Compound Document format using pure Java.
In short, you can read and write MS Excel files using Java. Soon,
you'll be able to read and write Word files using Java. POI is your
Java Excel solution as well as your Java Word solution. However, we
have a complete API for porting other OLE 2 Compound Document formats
and welcome others to participate. OLE 2 Compound Document Format based
files include most Microsoft Office files such as XLS and DOC as well
as MFC serialization API based file formats.



Authors:
--------
    * Nick Burch (nick at apache dot org)
    * Nicola Ken Barozzi (barozzi at nicolaken dot com)
    * Andrew C. Oliver (acoliver at apache dot org)
    * Marc Johnson (mjohnson at apache dot org)
    * Glen Stampoultzis (glens at apache.org)
    * Rainer Klute (klute at apache dot org)
    * Ryan Ackley (sackley at apache dot org)
    * Avik Sengupta (avik at apache dot org)
    * Shawn Laubach (slaubach at apache dot org)
    * Danny Mui (dmui at apache dot org)
    * Jason Height (jheight at apache dot org)
    * Tetsuya Kitahata (tetsuya at apache dot org)
    * Yegor Kozlov (yegor at apache dot org)
    * Amol S Deshmukh (amol at apache dot org)

%package        manual
License:        The Apache Software License
Summary:        Java API To Access Microsoft Format Files
Group:          Development/Languages/Java

%description    manual
The POI project consists of APIs for manipulating various file formats
based upon Microsoft's OLE 2 Compound Document format using pure Java.
In short, you can read and write MS Excel files using Java. Soon,
you'll be able to read and write Word files using Java. POI is your
Java Excel solution as well as your Java Word solution. However, we
have a complete API for porting other OLE 2 Compound Document formats
and welcome others to participate. OLE 2 Compound Document Format based
files include most Microsoft Office files such as XLS and DOC as well
as MFC serialization API based file formats.



Authors:
--------
    * Nick Burch (nick at apache dot org)
    * Nicola Ken Barozzi (barozzi at nicolaken dot com)
    * Andrew C. Oliver (acoliver at apache dot org)
    * Marc Johnson (mjohnson at apache dot org)
    * Glen Stampoultzis (glens at apache.org)
    * Rainer Klute (klute at apache dot org)
    * Ryan Ackley (sackley at apache dot org)
    * Avik Sengupta (avik at apache dot org)
    * Shawn Laubach (slaubach at apache dot org)
    * Danny Mui (dmui at apache dot org)
    * Jason Height (jheight at apache dot org)
    * Tetsuya Kitahata (tetsuya at apache dot org)
    * Yegor Kozlov (yegor at apache dot org)
    * Amol S Deshmukh (amol at apache dot org)

%prep
%setup -c -q -n %{base_name}
#find . -name "*.jar" -exec rm {} \;
find . -name "*.jar" -exec mv {} {}.no \;
bzip2 -dc %{SOURCE1} | tar xf -
rm -rf src/scratchpad/src/org/apache/poi/hslf/
rm -rf src/scratchpad/testcases/org/apache/poi/hslf/
# FIXME
rm src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics*.java
%patch0
#%patch1
%patch2
%patch3 -p0
# wrong end of line necoding
sed -i -e 's/.$//' \
        docs/jdepend/jdepend.xml \
        LICENSE \
        docs/skin/*.js \
        docs/skin/page.css \
        docs/changes.rss \
        docs/apidocs/package-list \
        docs/apidocs/stylesheet.css \
        docs/junit/stylesheet.css \
        docs/junit/org/apache/poi/hssf/usermodel/TestBugs*

%build
export OPT_JAR_LIST="ant/ant-junit junit ant/ant-jdepend jdepend jaxp_transform_impl ant/ant-trax"
export CLASSPATH=$(build-classpath \
commons-beanutils \
commons-collections \
commons-lang \
commons-logging \
log4j \
xalan-j2 \
xerces-j2)
export ANT_OPTS="-Xmx256m -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
ant -Dant.build.javac.target=1.4 -Dant.build.javac.source=1.4 jar test

%install
install -dm 755 $RPM_BUILD_ROOT%{_javadir}
cp -p build/dist/%{base_name}-%{version}-final-*.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cp -p build/dist/%{base_name}-contrib-%{version}-final-*.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-contrib-%{version}.jar
cp -p build/dist/%{base_name}-scratchpad-%{version}-final-*.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-scratchpad-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in %{name}*-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
#javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
rm -rf docs/apidocs
#manual
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
ln -s %{_javadocdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/apidocs # ghost symlink
%fdupes -s ${RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/LICENSE
%{_javadir}/*.jar

%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%files manual
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}

%changelog
* Thu Aug 07 2008 mvyskocil@suse.cz
- First release of version 2.5.1 in Suse (based on spec from jpackage.org 1.7)
openSUSE Build Service is sponsored by