File fop.spec of Package fop

#
# spec file for package fop (Version 0.95)
#
# 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


Name:           fop
License:        The Apache Software License
Group:          Productivity/Publishing/XML
Summary:        Formatter for Printing XSLT Processed XML Files
Requires:       jre
Version:        0.95
Release:        1
Url:            http://xml.apache.org/fop/
Source0:        http://apache.easy-webs.de/xml/fop/fop-%{version}-src.tar.gz
Source1:        fop-sh
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  ant-junit ant-trax java-1_4_2-gcj-compat-devel unzip xml-commons-apis xml-commons-resolver
#!BuildIgnore:  saxon

%description
FOP (Formatting Objects Processor) is driven by XSL formatting objects
(XSL-FO). It is a Java application that reads a formatting object (FO)
tree and renders the resulting pages to one of the following output
formats: PDF (primary output target), PCL, PS, SVG, XML (area tree
representation), Print, AWT, MIF, and TXT.



%prep
%setup -q
cat %{S:1} | sed s=@FOP_HOME@=%{_datadir}/%{name}= > fop.sh

%build
export JAVA_HOME=/usr/lib/jvm/java
for i in lib/*.jar; do
_CP=$i:$_CP
done
for i in %{java_home}/lib/*.jar; do
_CP=$i:$_CP
done
export CLASSPATH=$_CP:$(build-classpath glibj junit xml-commons-resolver)
ant package

%install
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
mv build/fop-sandbox.jar build/fop.jar lib/
echo "\
Additional documentation and examples you will find in:
%_defaultdocdir/%{name}" \
  > $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/README.docs
cp -a lib conf fop \
  $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
ln -sf %{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name}
#
# fop wrapper
install -m 755 -d $RPM_BUILD_ROOT%{_prefix}/bin/
install -m 755 fop.sh $RPM_BUILD_ROOT%{_prefix}/bin/fop

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
# README.SuSE
%doc README LICENSE
%doc examples 
%{_prefix}/bin/*
%{_datadir}/%{name}
%{_datadir}/%{name}-%{version}/

%changelog
* Wed Aug 06 2008 skh@suse.de
- update to version 0.95, list of changes at:
  http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html
- fop requires java 1.4 now
- use unversioned Requires: jre
* Fri Jun 27 2008 coolo@suse.de
- avoid build cycle between fop and saxon
* Wed Jan 30 2008 skh@suse.de
- update to version 0.94, major changes:
  * Add support for font auto-detection (JM) Thanks to Adrian Cumiskey
  * Add support for the border-collapsing model in tables (VH, JM)
  * Add support for named destinations in PDF (JB)
  * Add support for UAX#14 type line breaking (MM)
  full list of changes at:
  http://xmlgraphics.apache.org/fop/0.94/changes_0.94.html
* Tue Jul 10 2007 skh@suse.de
- update to version 0.93
- build with gcj
* Mon May 07 2007 ro@suse.de
- added unzip to buildrequires
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Sep 17 2004 skh@suse.de
- do no longer use setJava
* Wed Apr 28 2004 ke@suse.de
- Provide wrapper scripts for fop.sh and xalan.sh to make it find the
  java environment; reported by Thomas Schraitle; fix provided by Petr
  Mladek [#39581].
* Mon Oct 27 2003 ke@suse.de
- New package: version 0.20.5.
openSUSE Build Service is sponsored by