Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > 56d1a64443a5f81997980cc11202b4c6 > files > 1

jakarta-poi-3.1-0.0.4.mga2.src.rpm

# Copyright (c) 2000-2005, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define section         free
%define base_name       poi
%define gcj_support     0

Name:           jakarta-%{base_name}
Version:        3.1
Release:        %mkrel 0.0.4
Epoch:          0
Summary:        Java API To Access Microsoft Format Files
Group:          Development/Java
License:        Apache License
URL:            http://jakarta.apache.org/poi/
Source0:        http://www.apache.org/dist/poi/release/src/poi-src-3.1-FINAL-20080629.tar.gz
Source1:        http://repo1.maven.org/maven2/org/apache/poi/poi/3.1-FINAL/poi-3.1-FINAL.pom
Source2:        http://repo1.maven.org/maven2/org/apache/poi/poi-contrib/3.1-FINAL/poi-contrib-3.1-FINAL.pom
Source3:        http://repo1.maven.org/maven2/org/apache/poi/poi-scratchpad/3.1-FINAL/poi-scratchpad-3.1-FINAL.pom
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
%else
BuildArch:      noarch
%endif
Requires:       apache-commons-beanutils >= 0:1.6.1
Requires:       apache-commons-collections >= 0:2.1
Requires:       apache-commons-lang >= 0:2.0
Requires:       apache-commons-logging >= 0:1.0.3
Requires:       liblog4j-java >= 0:1.2.8
Requires:       xalan-j2 >= 0:2.5.2
Requires:       xerces-j2 >= 0:2.6.0
BuildRequires:  ant >= 0:1.6
BuildRequires:  ant-jdepend >= 0:1.6
BuildRequires:  ant-junit >= 0:1.6
BuildRequires:  ant-trax >= 0:1.6
BuildRequires:  apache-commons-beanutils >= 0:1.6.1
BuildRequires:  apache-commons-collections >= 0:2.1
BuildRequires:  apache-commons-lang >= 0:2.0
BuildRequires:  apache-commons-logging >= 0:1.0.3
BuildRequires:  jaxp_transform_impl
BuildRequires:  jdepend >= 0:2.6
BuildRequires:  java-rpmbuild >= 0:1.6
BuildRequires:  junit >= 0:3.8.1
BuildRequires:  liblog4j-java >= 0:1.2.8
BuildRequires:  xalan-j2 >= 0:2.5.2
BuildRequires:  xerces-j2 >= 0: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. 

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Development/Java

%description    javadoc
Java API To Access Microsoft Format Files.

%package        manual
Summary:        Documents for %{name}
Group:          Development/Java

%description    manual
Java API To Access Microsoft Format Files.


%prep
%setup -q -n %{base_name}-%{version}-FINAL

for j in $(find . -name "*.jar"); do
  mv $j $j.no
done

%{__mv} src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java.orig
%{_bindir}/iconv -t utf8 -c src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java.orig -o src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java

%{__perl} -pi -e 's/<javac/<javac nowarn="true"/g' build.xml
%{__perl} -pi -e 's/fork="no"/fork="yes"/g' build.xml

%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"
# FIXME: can't run the tests because java still wants X
%{ant} jar #test

%install
rm -rf %{buildroot}

mkdir -p  %{buildroot}%{_javadir}

cp -a build/dist/%{base_name}-%{version}-*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
cp -a build/dist/%{base_name}-contrib-%{version}-*.jar %{buildroot}%{_javadir}/%{name}-contrib-%{version}.jar
cp -a build/dist/%{base_name}-scratchpad-%{version}-*.jar %{buildroot}%{_javadir}/%{name}-scratchpad-%{version}.jar

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

mkdir -p  %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{base_name}.pom
%add_maven_depmap JPP-%{base_name}.pom %{base_name}.jar
install -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{base_name}-contrib.pom
%add_maven_depmap JPP-%{base_name}-contrib.pom %{base_name}-contrib.jar
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{base_name}-scratchpad.pom
%add_maven_depmap JPP-%{base_name}-scratchpad.pom %{base_name}-scratchpad.jar

#javadoc
mkdir -p  %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -a docs/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -sf %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
rm -rf docs/apidocs

#manual
mkdir -p  %{buildroot}%{_docdir}/%{name}-%{version}
cp -a docs/* %{buildroot}%{_docdir}/%{name}-%{version}
cp -a LICENSE %{buildroot}%{_docdir}/%{name}-%{version}
ln -sf %{_javadocdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-%{version}/apidocs # ghost symlink

%{__perl} -pi -e 's|\r$||g' \
  `%{_bindir}/find %{buildroot}%{_docdir}/%{name}-%{version} -type f \
  -name "*.css" -o -name "*.html" -o -name "*.js" -o -name "*.rss" -o -name "*.txt" -o -name "*.xml"` \
  %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf %{buildroot}


%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%doc %{_docdir}/%{name}-%{version}/LICENSE
%{_javadir}/*.jar
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/%{name}*%{version}.jar.*
%endif

%files javadoc
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%files manual
%doc %{_docdir}/%{name}-%{version}

%changelog

* Sat Aug 13 2011 gil <gil> 0:3.1-0.0.4.mga2
+ Revision: 133003
- edit spec file
- added maven2 poms, cleaned spec file, removed old gcj macro, update BR

* Sun Feb 06 2011 spuhler <spuhler> 0:3.1-0.0.3.mga1
+ Revision: 48054
- removed buildroot definition from .spec
- imported package jakarta-poi


* Fri Dec 10 2010 Oden Eriksson <oeriksson@mandriva.com> 0:3.1-0.0.3mdv2011.0
+ Revision: 619762
- the mass rebuild of 2010.0 packages

* Fri Sep 04 2009 Thierry Vignaud <tv@mandriva.org> 0:3.1-0.0.2mdv2010.0
+ Revision: 429590
- rebuild

* Tue Jul 01 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:3.1-0.0.1mdv2009.0
+ Revision: 230516
- new version 3.1, disable gcj_compile

* Tue Feb 12 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:3.0.2-0.0.1mdv2008.1
+ Revision: 165654
- restore buildroot
- new version

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Dec 16 2007 Anssi Hannula <anssi@mandriva.org> 0:3.0-4mdv2008.1
+ Revision: 120921
- buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64)

* Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 0:3.0-3mdv2008.0
+ Revision: 87420
- rebuild to filter out autorequires of GCJ AOT objects
- remove unnecessary Requires(post) on java-gcj-compat

* Sun Sep 09 2007 Pascal Terjan <pterjan@mandriva.org> 0:3.0-2mdv2008.0
+ Revision: 83050
- rebuild

* Mon Jun 18 2007 David Walluck <walluck@mandriva.org> 0:3.0-1mdv2008.0
+ Revision: 40654
- 3.0
- fix test file encoding (build all tests)
- fix permissions on gcj libdir
- remove deprecated javadoc post scripts
- Import jakarta-poi



* Sun Jun 11 2006 David Walluck <walluck@mandriva.org> 0:2.5.1-2.1mdv2007.0
- release

* Mon May 08 2006 Ralph Apel <r.apel at r-apel.de> - 0:2.5.1-2jpp
- First JPP-1.7 release

* Wed Aug 24 2005 Ralph Apel <r.apel at r-apel.de> - 0:2.5.1-1jpp
- Upgrade to 2.5.1
- Extend scratchpad with unreleased hwpf from CVS

* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:2.5-4jpp
- Rebuild with ant-1.6.2

* Fri Aug 06 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.5-3jpp
- Void change

* Tue Jun 01 2004 Randy Watler <rwatler at finali.com> - 0:2.5-2jpp
- Upgrade to Ant 1.6.X

* Thu May 06 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.5-1jpp
- upgrade to 2.5-final

* Fri Feb 27 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.0-1jpp
- First JPackage release