packages java-jfree-libformula.spec
      Pages: < 1 >  DOWNLOAD      
%define        with_gcj  1
%define        with_test 0

%define        javahome  %{_jvmdir}/jdk

Name:          java-jfree-libformula
Version:       1.1.3
Release:       1mamba
Summary:       Formula Parser
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
Patch0:        java-jfree-libformula-1.1.3-build_properties.patch
License:       LGPL
BuildRequires: glibc-devel
BuildRequires: java-gcj-compat
BuildRequires: libgcc
BuildRequires: libgcj4-devel
BuildRequires: libz-devel
BuildRequires: ant-contribb3
BuildRequires: apache-ant
BuildRequires: jakarta-commons-logging
%if %with_test
BuildRequires: jakarta-poi
BuildRequires: java-jfree-libbase
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jakarta-commons-logging
Requires:      java-jfree-libbase
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

LibFormula provides Excel-Style-Expressions. The implementation provided here is very generic and can be used in any application that needs to compute formulas.

The syntax is based on the OpenFormula-specifications, but with carefully pruning away all the spreadsheet specific parts (like references to cell-ranges).

%if %with_gcj
%package gcj
Group:         System/Libraries/Java
Summary:       GCJ support for %{name}
Requires:      java-gcj-compat

%description gcj
JFree Java General Serialization Framework Library.

This package contains GCJ support for %{name}.

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

%description javadoc
JFree Base Services.

This package contains documentation for %{name}.


%setup -q -c %{name}-%{version}
for j in $(find . -name "*.jar"); do
	rm -rf $j

for txt in ChangeLog.txt licence-LGPL.txt README.txt; do
	%{__perl} -pi -e 's/\r$//g' $txt

mkdir -p lib/ant-contrib
ln -sf $(build-classpath commons-logging-api) lib/commons-logging-api-1.0.4.jar
ln -sf $(build-classpath libbase) lib/libbase-%{version}.jar
ln -sf $(build-classpath junit-3.8.2) test-lib/junit-3.8.1.jar
%if %with_test
ln -sf $(build-classpath poi) test-lib/poi-3.0.1-jdk122-final-20071014.jar
ln -s %{_javadir}/ant/* lib/ant-contrib

export CLASSPATH=""
CLASSPATH=$CLASSPATH:$(build-classpath ant-contribb3 junit-3.8.2 libbase commons-logging commons-logging-api)
%if %with_test
CLASSPATH=$CLASSPATH:$(build-classpath poi)
ant \
  jar \
%if %with_test
  test \

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

mkdir -p %{buildroot}%{_javadir}

install -pm 644 dist/libformula-%{version}.jar %{buildroot}%{_javadir}/libformula-%{version}.jar

  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} ${jar/-%{version}/}

mkdir -p %{buildroot}%{_javadocdir}/libformula
cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libformula

%if %with_gcj

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

%doc ChangeLog.txt licence-LGPL.txt README.txt

%if %with_gcj
%post gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then

%postun gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then

%files gcj

%files javadoc

* Sat Jan 22 2011 gil <puntogil@...> 1.1.3-1mamba
- update to 1.1.3

* Wed Dec 09 2009 gil <puntogil@...> 0.2.0-1mamba
- package created by autospec