2012-10-31 09:34:42 +01:00
|
|
|
#
|
2013-07-12 14:43:21 +02:00
|
|
|
# spec file for package saxon6
|
2012-10-31 09:34:42 +01:00
|
|
|
#
|
2014-06-27 13:51:55 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2012-10-31 09:34:42 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define section free
|
|
|
|
%define resolverdir %{_sysconfdir}/java/resolver
|
|
|
|
|
|
|
|
Name: saxon6
|
|
|
|
Version: 6.5.5
|
|
|
|
Release: 0
|
2013-07-12 14:43:21 +02:00
|
|
|
Summary: The SAXON XSLT Processor from Michael Kay
|
2012-10-31 09:34:42 +01:00
|
|
|
License: MPL-1.0
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
Url: http://saxon.sourceforge.net/
|
|
|
|
Source0: http://download.sf.net/saxon/saxon6-5-5.zip
|
|
|
|
Source1: %{name}.saxon.script
|
|
|
|
Source2: %{name}.build.script
|
|
|
|
Source3: %{name}.1
|
2012-12-06 11:24:13 +01:00
|
|
|
Source4: http://www.xml.com/2000/08/09/xslt/StructXmlParser.java
|
2013-08-12 10:58:12 +02:00
|
|
|
# implementes batch based interface to saxon6, SUSE specific
|
|
|
|
Source5: saxon6.saxon-batch.script
|
2012-10-31 09:34:42 +01:00
|
|
|
Patch2: %{name}-cmdlinefix.patch
|
|
|
|
#PATCH-FIX-OPENSUSE: jdk7+ assumes ASCII as default encoding, so iso-8859-1 does not work by default
|
|
|
|
Patch3: saxon-javac-encoding.patch
|
2012-12-06 11:24:13 +01:00
|
|
|
#PATCH-FIX-OPENSUSE: bnc#739498 - backport changes from com/icl/saxon/aelfred/XmlParser.java
|
|
|
|
# to older version released under more permissive license
|
|
|
|
Patch4: saxon-add-fixes-from-com-isl-saxon-aelfred.patch
|
2013-08-12 10:58:12 +02:00
|
|
|
#PATCH-FIX-OPENSUSE: implements batch mode in which saxon is capable to proceed more files per one JVM launch
|
|
|
|
Patch5: saxon6-batch.patch
|
2013-07-12 14:43:21 +02:00
|
|
|
BuildRequires: fop >= 0.20.1
|
2013-09-09 14:00:33 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2013-07-12 14:43:21 +02:00
|
|
|
BuildRequires: jdom >= 1.0
|
2012-10-31 09:34:42 +01:00
|
|
|
BuildRequires: xml-commons-apis
|
|
|
|
%if ! %defined suse_version
|
2013-07-12 14:43:21 +02:00
|
|
|
BuildRequires: fop-javadoc
|
2012-10-31 09:34:42 +01:00
|
|
|
BuildRequires: java-javadoc
|
|
|
|
BuildRequires: jdom-javadoc >= 1.0
|
|
|
|
%else
|
2013-07-12 14:43:21 +02:00
|
|
|
BuildRequires: ant
|
2012-10-31 09:34:42 +01:00
|
|
|
BuildRequires: java-devel
|
|
|
|
BuildRequires: unzip
|
|
|
|
%endif
|
|
|
|
Requires: /usr/sbin/update-alternatives
|
2013-07-12 14:43:21 +02:00
|
|
|
Requires: jaxp_parser_impl
|
2012-11-29 16:18:30 +01:00
|
|
|
Provides: jaxp_transform_impl = %{name}-%{version}
|
|
|
|
# bnc#780666
|
|
|
|
Provides: saxon
|
2012-10-31 09:34:42 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The SAXON package is a collection of tools for processing XML
|
|
|
|
documents. The main components are:
|
|
|
|
|
|
|
|
* An XSLT processor, which implements the Version 1.0 XSLT and XPath
|
|
|
|
Recommendations from the World Wide Web Consortium, found at
|
|
|
|
http://www.w3.org/TR/1999/REC-xslt-19991116 and
|
|
|
|
http://www.w3.org/TR/1999/REC-xpath-19991116 with a number of
|
|
|
|
powerful extensions. This version of Saxon also includes many of
|
|
|
|
the new features defined in the XSLT 1.1 working draft, but for
|
|
|
|
conformance and portability reasons these are not available if
|
|
|
|
the stylesheet header specifies version="1.0".
|
|
|
|
|
|
|
|
* A Java library, which supports a similar processing model to XSL,
|
|
|
|
but allows full programming capability, which you need if you
|
|
|
|
want to perform complex processing of the data or to access
|
|
|
|
external services such as a relational database
|
|
|
|
|
|
|
|
* A slightly improved version of the Aelfred parser from Microstar.
|
|
|
|
(But you can use SAXON with any SAX-compliant XML parser if you
|
|
|
|
prefer).
|
|
|
|
|
|
|
|
So you can use SAXON by writing XSLT stylesheets, by writing Java
|
|
|
|
applications, or by any combination of the two.
|
|
|
|
|
|
|
|
|
|
|
|
%package aelfred
|
|
|
|
Summary: Java XML parser
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
#Provides: jaxp_parser_impl
|
|
|
|
#Requires: /usr/sbin/update-alternatives
|
|
|
|
Requires: xml-commons-apis
|
2012-11-29 16:18:30 +01:00
|
|
|
Provides: saxon-aelfred
|
2012-10-31 09:34:42 +01:00
|
|
|
|
|
|
|
%description aelfred
|
|
|
|
A slightly improved version of the AElfred Java XML parser from
|
|
|
|
Microstar.
|
|
|
|
|
|
|
|
|
|
|
|
%package manual
|
|
|
|
Summary: Manual for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
Manual for %{name}.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Javadoc for %{name}.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: Demos for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
Demonstrations and samples for %{name}.
|
|
|
|
|
|
|
|
%package fop
|
|
|
|
Summary: FOP support for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: fop >= 0.20.1
|
2012-11-29 16:18:30 +01:00
|
|
|
Provides: saxon-fop
|
2012-10-31 09:34:42 +01:00
|
|
|
|
|
|
|
%description fop
|
|
|
|
FOP support for %{name}.
|
|
|
|
|
|
|
|
%package jdom
|
|
|
|
Summary: JDOM support for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: jdom >= 1.0
|
2012-11-29 16:18:30 +01:00
|
|
|
Provides: saxon-jdom
|
2012-10-31 09:34:42 +01:00
|
|
|
|
|
|
|
%description jdom
|
|
|
|
JDOM support for %{name}.
|
|
|
|
|
|
|
|
%package scripts
|
|
|
|
Summary: Utility scripts for %{name}
|
|
|
|
Group: Productivity/Publishing/XML
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2013-09-09 14:00:33 +02:00
|
|
|
Requires: javapackages-tools
|
2012-11-29 16:18:30 +01:00
|
|
|
Provides: saxon-scripts
|
2012-10-31 09:34:42 +01:00
|
|
|
|
|
|
|
%description scripts
|
|
|
|
Utility scripts for %{name}.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -c
|
|
|
|
unzip -q source.zip
|
|
|
|
cp -p %{SOURCE2} ./build.xml
|
2012-12-06 11:24:13 +01:00
|
|
|
cp -p %{SOURCE4} XmlParser.java
|
2012-10-31 09:34:42 +01:00
|
|
|
%patch2 -p0
|
|
|
|
%patch3 -p1
|
2012-12-06 11:24:13 +01:00
|
|
|
%patch4 -p0
|
2013-08-12 10:58:12 +02:00
|
|
|
%patch5 -p1
|
2012-12-06 11:24:13 +01:00
|
|
|
cp XmlParser.java com/icl/saxon/aelfred/XmlParser.java
|
2012-10-31 09:34:42 +01:00
|
|
|
# cleanup unnecessary stuff we'll build ourselves
|
|
|
|
rm -rf *.jar docs/api
|
|
|
|
|
|
|
|
%build
|
|
|
|
# fixes the javadoc fail
|
|
|
|
export LC_ALL=en_US.ISO-8859-2
|
|
|
|
export CLASSPATH=%(build-classpath xml-commons-apis xmlgraphics-fop jdom)
|
|
|
|
ant \
|
2014-06-27 13:51:55 +02:00
|
|
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
2012-10-31 09:34:42 +01:00
|
|
|
-Dj2se.javadoc=%{_javadocdir}/java \
|
|
|
|
-Dfop.javadoc=%{_javadocdir}/fop \
|
|
|
|
-Djdom.javadoc=%{_javadocdir}/jdom
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
# jars
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
|
|
cp -p build/lib/saxon.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
cp -p build/lib/saxon-aelfred.jar %{buildroot}%{_javadir}/%{name}-aelfred.jar
|
|
|
|
cp -p build/lib/saxon-fop.jar %{buildroot}%{_javadir}/%{name}-fop.jar
|
|
|
|
cp -p build/lib/saxon-jdom.jar %{buildroot}%{_javadir}/%{name}-jdom.jar
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr build/api/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
# demo
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
|
|
|
cp -pr samples/* %{buildroot}%{_datadir}/%{name}
|
|
|
|
# scripts
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE1} \
|
|
|
|
> %{buildroot}%{_bindir}/%{name}
|
|
|
|
ln -s %{name} %{buildroot}%{_bindir}/saxon
|
2013-08-12 10:58:12 +02:00
|
|
|
sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE5} \
|
|
|
|
> %{buildroot}%{_bindir}/%{name}-batch
|
2012-10-31 09:34:42 +01:00
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
sed 's,__RESOLVERDIR__,%{resolverdir},' < %{SOURCE3} \
|
|
|
|
> %{buildroot}%{_mandir}/man1/%{name}.1
|
|
|
|
# jaxp_transform_impl ghost symlink
|
|
|
|
ln -s %{_sysconfdir}/alternatives \
|
|
|
|
%{buildroot}%{_javadir}/jaxp_transform_impl.jar
|
|
|
|
# jaxp_parser_impl ghost symlink
|
|
|
|
#ln -s %{_sysconfdir}/alternatives \
|
|
|
|
# %{buildroot}%{_javadir}/jaxp_parser_impl.jar
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%post
|
|
|
|
update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
|
|
|
|
jaxp_transform_impl %{_javadir}/%{name}.jar 25
|
|
|
|
|
|
|
|
%preun
|
|
|
|
{
|
|
|
|
[ $1 -eq 0 ] || exit 0
|
|
|
|
update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar
|
|
|
|
} >/dev/null 2>&1 || :
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%{_javadir}/%{name}.jar
|
|
|
|
%ghost %{_javadir}/jaxp_transform_impl.jar
|
|
|
|
|
|
|
|
%files aelfred
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/%{name}-aelfred*
|
|
|
|
#%ghost %{_javadir}/jaxp_parser_impl.jar
|
|
|
|
|
|
|
|
%files fop
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/%{name}-fop*
|
|
|
|
|
|
|
|
%files jdom
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/%{name}-jdom*
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc doc/*.html
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%files scripts
|
|
|
|
%defattr(0755,root,root,0755)
|
|
|
|
%{_bindir}/%{name}
|
2013-08-12 10:58:12 +02:00
|
|
|
%{_bindir}/%{name}-batch
|
2012-10-31 09:34:42 +01:00
|
|
|
%{_bindir}/saxon
|
|
|
|
%attr(0644,root,root) %{_mandir}/man1/%{name}.1*
|
|
|
|
|
|
|
|
%changelog
|