File dita-ot.spec of Package dita-ot
#
# spec file for package dita-ot (Version 1.4.2.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: dita-ot
BuildRequires: ant-apache-regexp ant-trax dita fop java2-devel-packages xalan-j2 xml-commons-apis xml-commons-resolver xorg-x11-libs
Url: http://dita-ot.sourceforge.net/
Group: Productivity/Publishing/XML
License: Other uncritical OpenSource License
Summary: DITA Open Toolkit
Version: 1.4.2.1
Release: 1
Source0: http://mesh.dl.sourceforge.net/sourceforge/dita-ot/DITA-OT%{version}_src.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires: jpackage-utils >= 1.5
Requires: fop ant dita
%description
Stylesheets for processing DITA documents.
%define xml_dir %{_datadir}/xml
%define xml_pack_dir %{xml_dir}/dita
%prep
%setup -q -n DITA-OT%{version}-src
%build
export ANT_OPTS=-Xmx256M
#export ANT_OPTS="${ANT_OPTS} -Djavax.xml.transform.TransformerFactory=org.apache.xalan.transformer.TransformerImpl"
#export CLASSPATH=/usr/share/fop-0.20.5/build/fop.jar:/usr/share/fop/lib/batik.jar:/usr/share/fop/lib/avalon-framework-cvs-20020806.jar:$(build-classpath xalan-j2 xalan-j2-serializer)
CLASSPATH="$CLASSPATH:$(build-classpath xerces-j2 xalan-j2 xalan-j2-serializer xml-commons-resolver ant-apache-regexp)" ant -buildfile buildPackage.xml
CLASSPATH="$CLASSPATH:$(build-classpath xerces-j2 xalan-j2 xalan-j2-serializer xml-commons-resolver ant-apache-regexp)" ant all
tar xf build/DITA-OT%{version}_standard_bin.tar.gz
%install
install -d $RPM_BUILD_ROOT/usr/share/dita-ot
cp -a DITA-OT%{version}/* $RPM_BUILD_ROOT/usr/share/dita-ot
pushd $RPM_BUILD_ROOT/usr/share/dita-ot
for f in $(find . -name '*.xml' -o -name '*.xsl'); do
tr -d '\15' <$f >$f.tmp && mv $f.tmp $f
done
# rm -fr dtd
# ln -s /usr/share/xml/dita/schema/dtd/1.0 dtd
install -d $RPM_BUILD_ROOT/usr/share/xml/dita/stylesheet/sf.net
mv xsl $RPM_BUILD_ROOT/usr/share/xml/dita/stylesheet/sf.net/%{version}
ln -s /usr/share/xml/dita/stylesheet/sf.net/%{version} xsl
popd
# %post
# if [ -x %{regcat} ]; then
# for c in %{all_cat}; do
# %{regcat} -a %{sgml_dir}/$c >/dev/null 2>&1
# done
# fi
# edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
# --add /etc/xml/%{FOR_ROOT_CAT}
# exit 0
#
# %postun
# if [ "$1" = "0" -a -x %{regcat} ]; then
# for c in %{all_cat}; do
# %{regcat} -r %{sgml_dir}/$c >/dev/null 2>&1
# done
# fi
# #now XML catalog
# edit-xml-catalog --group --catalog /etc/xml/suse-catalog.xml \
# --del %{name}-%{version}-%{release}
# exit 0
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
# %doc README
/usr/share/dita-ot
%{xml_dir}/dita/stylesheet
%changelog
* Wed Jul 23 2008 ke@suse.de
- Update to version 1.4.2.1. Maintenance update--for details see
http://sourceforge.net/forum/forum.php?forum_id=817933.
* Wed Nov 28 2007 ke@suse.de
- Update to version 1.4.1 (for details see DITA-changes.html):
* Full support for the OASIS DITA 1.1 standard.
* New and improved items for 1.1
* Support for the new bookmap standard
* Processing of DITA documents using XML Schemas now possible.
* Many Improvements and bug fixes.
- Remove obsolete patch java150_build.patch.
- Adjust BuildRequires and build the CLASSPATH accordingly.
* Fri Jan 19 2007 ke@suse.de
- Remove /usr/share/xml from the files list.
* Wed Oct 04 2006 dbornkessel@suse.de
- fixes necessary to compile with Java 1.5.0:
* set source="1.4" and target="1.4" for ant "javac" tasks
- use xalan for xslt transformation
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Nov 28 2005 ke@suse.de
- Fix link to xsl directory.
* Thu Nov 24 2005 ke@suse.de
- New package: Version 1.1.2.1 (thanks for help to Daniel Bornkessel!).