packages java-jexcelapi.spec
      Pages: < 1 >  DOWNLOAD      
%define        pkg_version 2_6_10
Name:          java-jexcelapi
Version:       2.6.12
Release:       1mamba
Summary:       A Java API to read, write, and modify Excel spreadsheets
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Automatic Build System <autodist@...>
#              http://jexcelapi.sourceforge.net/
URL:           http://www.andykhan.com/jexcelapi/
Source:        http://downloads.sourceforge.net/project/jexcelapi/jexcelapi/%{version}/jexcelapi_%{pkg_version}.tar.gz
Source1:       java-jexcelapi-2.6.10.pom
Patch:         java-jexcelapi-2.6.10-build_xml.patch
License:       LGPL
BuildRequires: apache-ant
BuildRequires: apache-log4j
BuildRequires: findutils
BuildRequires: java-jflex143
BuildRequires: java-lex
BuildRequires: jpackage-utils
BuildRequires: sed
Requires:      apache-log4j
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
JExcelApi is a java library which provides the ability to read, write, and
modify Microsoft Excel spreadsheets.

Features:
- Reads data from Excel 95, 97, 2000 workbooks
- Reads and writes formulas (Excel 97 and later only)
- Generates spreadsheets in Excel 97 format
- Supports font, number and date formatting
- Supports shading and colouring of cells
- Modifies existing worksheets

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

%description javadoc
A Java API to read, write, and modify Excel spreadsheets

This package contains javadoc for %{name}

%package demo
Group:         Development/Libraries/Java
Summary:       Demos for %{name}
Requires:      %{name} = %{?epoch:%epoch:}%{version}-%{release}

%description demo
A Java API to read, write, and modify Excel spreadsheets

This package contains demonstrations and samples for %{name}.

%prep

%setup -q -n jexcelapi
%patch -p1

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

for j in $(find -name "*.class"); do
  	rm -rf $j
done

for j in $(find -name ".#*"); do
  	rm -rf $j
done

for j in $(find -name "*.java~"); do
  	rm -rf $j
done

mkdir -p build/out
ln -sf $(build-classpath jflex/jflex) build/JFlex.jar

%build

cat > build.properties << __GIL
logger=Log4jLogger
loggerClasspath=$(build-classpath log4j)
__GIL

cd build
export CLASSPATH=$(build-classpath jlex)
ant clean
ant jxlall

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

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

%add_to_maven_depmap net.sourceforge.jexcelapi jxl %{version} JPP/jexcelapi jexcelapi
install -pm 644 %{S:1} %{buildroot}%{_datadir}/maven2/poms/JPP-jexcelapi.pom

install -m 644 jxl.jar %{buildroot}%{_javadir}/jexcelapi/jexcelapi-%{version}.jar
install -m 644 jxl-demo.jar %{buildroot}%{_javadir}/jexcelapi/jexcelapi-demo-%{version}.jar

pushd %{buildroot}%{_javadir}/jexcelapi
       for jar in jexcelapi*.jar ; do
               ln -sf ${jar} $(echo $jar| sed "s|jexcelapi|jxl|g")
       done
       for jar in *-%{version}.jar ; do
               ln -sf ${jar} $(echo $jar| sed "s|-%{version}\.jar|.jar|g")
       done
popd

mkdir -p  %{buildroot}%{_javadocdir}/jexcelapi-%{version}
cp -r docs/* %{buildroot}%{_javadocdir}/jexcelapi-%{version}
ln -s jexcelapi-%{version} %{buildroot}%{_javadocdir}/jexcelapi

mkdir -p  %{buildroot}%{_datadir}/jexcelapi
install -m 644 *.dtd *.xls %{buildroot}%{_datadir}/jexcelapi/

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

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%dir %{_javadir}/jexcelapi
%{_javadir}/jexcelapi/jexcelapi-%{version}.jar
%{_javadir}/jexcelapi/jexcelapi.jar
%{_javadir}/jexcelapi/jxl-%{version}.jar
%{_javadir}/jexcelapi/jxl.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc *.html

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jexcelapi-%{version}
%{_javadocdir}/jexcelapi

%files demo
%defattr(-,root,root)
%dir %{_datadir}/jexcelapi
%{_datadir}/jexcelapi/*book.dtd
%{_datadir}/jexcelapi/jxlrwtest.xls
%{_javadir}/jexcelapi/jexcelapi-demo-%{version}.jar
%{_javadir}/jexcelapi/jexcelapi-demo.jar
%{_javadir}/jexcelapi/jxl-demo-%{version}.jar
%{_javadir}/jexcelapi/jxl-demo.jar

%changelog
* Mon Dec 17 2012 Automatic Build System <autodist@...> 2.6.12-1mamba
- automatic version update by autodist

* Fri Feb 18 2011 gil <puntogil@...> 2.6.10-2mamba
- rebuilt devel

* Mon Aug 10 2009 gil <puntogil@...> 2.6.10-1mamba
- package created by autospec