From e1017e30f0a18ac10a60f2c1669e20ae522af91f5a9f79c1936a83b06b37149c Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Wed, 31 Oct 2012 08:34:42 +0000 Subject: [PATCH] Accepting request 139806 from home:mvyskocil:branches:Java:packages add saxon6 to J:p OBS-URL: https://build.opensuse.org/request/show/139806 OBS-URL: https://build.opensuse.org/package/show/Java:packages/saxon6?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + saxon-javac-encoding.patch | 27 +++++ saxon6-5-5.zip | 3 + saxon6-cmdlinefix.patch | 58 +++++++++ saxon6.1 | 135 +++++++++++++++++++++ saxon6.build.script | 91 ++++++++++++++ saxon6.changes | 117 ++++++++++++++++++ saxon6.saxon.script | 41 +++++++ saxon6.spec | 242 +++++++++++++++++++++++++++++++++++++ 10 files changed, 738 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 saxon-javac-encoding.patch create mode 100644 saxon6-5-5.zip create mode 100644 saxon6-cmdlinefix.patch create mode 100644 saxon6.1 create mode 100644 saxon6.build.script create mode 100644 saxon6.changes create mode 100644 saxon6.saxon.script create mode 100644 saxon6.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/saxon-javac-encoding.patch b/saxon-javac-encoding.patch new file mode 100644 index 0000000..2715ec6 --- /dev/null +++ b/saxon-javac-encoding.patch @@ -0,0 +1,27 @@ +--- + build.xml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +Index: saxon6-6.5.5/build.xml +=================================================================== +--- saxon6-6.5.5.orig/build.xml 2012-10-31 08:40:05.638975835 +0100 ++++ saxon6-6.5.5/build.xml 2012-10-31 09:18:39.041126142 +0100 +@@ -36,7 +36,9 @@ + + + +- ++ ++ ++ + + + +@@ -77,6 +79,7 @@ + package="true" + author="true" + version="true" ++ Encoding="iso-8859-1" + packagenames="com.icl.saxon.*,org.w3c.xsl.*" + > + diff --git a/saxon6-5-5.zip b/saxon6-5-5.zip new file mode 100644 index 0000000..1681958 --- /dev/null +++ b/saxon6-5-5.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a76806dda554edc844601d0ec0fb3d2a10a2f397eabf3569dfb44b628363afc4 +size 3346162 diff --git a/saxon6-cmdlinefix.patch b/saxon6-cmdlinefix.patch new file mode 100644 index 0000000..7e17478 --- /dev/null +++ b/saxon6-cmdlinefix.patch @@ -0,0 +1,58 @@ +--- com/icl/saxon/StyleSheet.java.orig 2004-07-20 13:04:01.490886776 +0300 ++++ com/icl/saxon/StyleSheet.java 2004-07-20 13:08:45.562006674 +0300 +@@ -141,7 +141,7 @@ + + else if (args[i].equals("-x")) { + i++; +- if (args.length < i+2) badUsage(name, "No source parser class"); ++ if (args.length < i+1) badUsage(name, "No source parser class"); + String sourceParserName = args[i++]; + factory.setAttribute( + FeatureKeys.SOURCE_PARSER_CLASS, +@@ -150,7 +150,7 @@ + + else if (args[i].equals("-y")) { + i++; +- if (args.length < i+2) badUsage(name, "No style parser class"); ++ if (args.length < i+1) badUsage(name, "No style parser class"); + String styleParserName = args[i++]; + factory.setAttribute( + FeatureKeys.STYLE_PARSER_CLASS, +@@ -159,7 +159,7 @@ + + else if (args[i].equals("-r")) { + i++; +- if (args.length < i+2) badUsage(name, "No URIResolver class"); ++ if (args.length < i+1) badUsage(name, "No URIResolver class"); + String r = args[i++]; + factory.setURIResolver(makeURIResolver(r)); + } +@@ -177,7 +177,7 @@ + + else if (args[i].equals("-TL")) { + i++; +- if (args.length < i+2) badUsage(name, "No TraceListener class"); ++ if (args.length < i+1) badUsage(name, "No TraceListener class"); + TraceListener traceListener = makeTraceListener(args[i++]); + factory.setAttribute( + FeatureKeys.TRACE_LISTENER, +@@ -208,7 +208,7 @@ + + else if (args[i].equals("-m")) { + i++; +- if (args.length < i+2) badUsage(name, "No message Emitter class"); ++ if (args.length < i+1) badUsage(name, "No message Emitter class"); + factory.setAttribute( + FeatureKeys.MESSAGE_EMITTER_CLASS, + args[i++]); +@@ -530,7 +530,9 @@ + System.err.println(" -ds Use standard tree data structure "); + System.err.println(" -dt Use tinytree data structure (default)"); + System.err.println(" -o filename Send output to named file or directory "); ++ System.err.println(" -l Switch on line numbering for the source document "); + System.err.println(" -m classname Use specified Emitter class for xsl:message output "); ++ System.err.println(" -noext Suppress calls on non-system extension functions "); + System.err.println(" -r classname Use specified URIResolver class "); + System.err.println(" -t Display version and timing information "); + System.err.println(" -T Set standard TraceListener"); +Nur in com/icl/saxon: StyleSheet.java.orig. diff --git a/saxon6.1 b/saxon6.1 new file mode 100644 index 0000000..3272b35 --- /dev/null +++ b/saxon6.1 @@ -0,0 +1,135 @@ +.\" Kudos to: xsltproc(1), help2man, +.\" http://saxon.sourceforge.net/saxon6.5.3/instant.html +.TH SAXON "1" "July 2004" "6.5.3" "User Commands" +.SH NAME +saxon \- Process XML documents with XSLT stylesheets +.SH SYNOPSIS +.B saxon +\fR[\fIoptions\fR] \fIsource-doc \fR[\fIstyle-doc\fR] [{param=value}\fR...] +.SH DESCRIPTION +saxon is a command line tool for applying XSLT stylesheets to XML +documents. +.PP +It is invoked from the command line with some options, followed by the +name of the source document to be transformed, followed by the the +name of the stylesheet to use for the transformation, and finally +followed by optional XSL parameters. +.PP +A parameter takes the form name=value, name being the name of the +parameter, and value the value of the parameter. These parameters are +accessible within the stylesheet as normal variables, using the $name +syntax, provided they are declared using a top-level xsl:param +element. If there is no such declaration, the supplied parameter value +is silently ignored. You can specify a parameter value containing +spaces by enclosing it in double quotes, for example name="John Brown". +.SH OPTIONS +.TP +\fB\-a\fR +Use the xml-stylesheet processing instruction in the source document +to identify the stylesheet to be used. When using this option, the +style-doc argument should be omitted. +.SP +The processing instruction must have a +pseudo-attribute href that identifies the relative or absolute URL of +the stylesheet document, and a pseudo-attribute type whose value is +"text/xml", "application/xml", or "text/xsl". For example: + + + +Stylesheets embedded within the source document are not +supported in this release. +.TP +\fB\-d\fR\fImodel\fR +Selects the implementation of the internal tree model. -dt selects the +"tinytree" model. -ds selects the traditional tree model. The default +is -dt. +.TP +\fB\-l\fR +Switches line numbering on for the source document. Line numbers are +accessible through the extension function saxon:line-number(), or from +a trace listener. +.TP +\fB\-m\fR \fIclassname\fR +Use the specified Emitter to process the output from xsl:message. The +class must implement the com.icl.saxon.output.Emitter class. This +interface is similar to a SAX ContentHandler, it takes a stream of +events to generate output. In general the content of a message is an +XML fragment. By default the standard XML emitter is used, configured +to write to the standard error stream, and to include no XML +declaration. Each message is output as a new document. +.TP +\fB\-noext\fR +Suppress calls on extension functions, other than system-supplied +Saxon and EXSLT extension functions. This option is useful when +loading an untrusted stylesheet, perhaps from a remote site using an +HTTP URL; it ensures that the stylesheet cannot call Java +methods and thereby gain privileged access to resources on your +machine. +.TP +\fB\-o\fR \fIfilename\fR +Send output to named file. In the absence of this option, output goes +to standard output. The file extension of the output file is used to +decide the default output method if none is specified. +.TP +\fB\-r\fR \fIclassname\fR +Use the specified URIResolver to process all URIs. The URIResolver is +a user-defined class, that extends the com.icl.saxon.URIResolver +class, whose function is to take a URI supplied as a string, and +return a SAX InputSource. It is invoked to process URIs used in the +document() function, in the xsl:include and xsl:import elements, and +(if -u is also specified) to process the URIs of the source file and +stylesheet file provided on the command line. If xml-commons-resolver +is available, defaults to org.apache.xml.resolver.tools.CatalogResolver. +.TP +\fB\-t\fR +Display version and timing information to the standard error output. +.TP +\fB\-T\fR +Display stylesheet tracing information to the standard error +output. Also switches line numbering on for the source document. +.TP +\fB\-TL\fR \fIclassname\fR +Run the stylesheet using the specified TraceListener. The classname +names a user-defined class, which must implement +com.icl.saxon.trace.TraceListener. +.TP +\fB\-u\fR +Indicates that the names of the source document and the style document +are URLs; otherwise they are taken as filenames, unless they start +with "http:" or "file:", in which case they are taken as URLs. +.TP +\fB\-w\fR\fIlevel\fR +Indicates the policy for handling recoverable errors in the +stylesheet: -w0 means recover silently, -w1 means recover after +writing a warning message to the system error output, -w2 means signal +the error and do not attempt recovery. (Note, this does not currently +apply to all errors that the XSLT recommendation describes as +recoverable). The default is -w1. +.TP +\fB\-x\fR \fIclassname\fR +Use the specified SAX parser for source file and for any files loaded +using the document() function. The parser must be the fully-qualified +class name of a Java class that implements the org.xml.sax.Parser or +org.xml.sax.XMLReader interface. If xml-commons-resolver is available, +defaults to org.apache.xml.resolver.tools.ResolvingXMLReader. +.TP +\fB\-y\fR \fIclassname\fR +Use the specified SAX parser for all stylesheet files, including any +loaded using xsl:include or xsl:import. The parser must be the +fully-qualified class name of a Java class that implements the +org.xml.sax.Parser or org.xml.sax.XMLReader interface. If +xml-commons-resolver is available, defaults to +org.apache.xml.resolver.tools.ResolvingXMLReader. +.TP +\fB\-?\fR +Display command syntax. +.SH FILES +.B __RESOLVERDIR__/CatalogManager.properties +.RS +The central catalog manager configuration file used by \fBsaxon\fR +for resolving XML entities and URIs if xml-commons-resolver is +available. +.SH "SEE ALSO" +.BR xsltproc (1) +.SH AUTHOR +Michael H. Kay diff --git a/saxon6.build.script b/saxon6.build.script new file mode 100644 index 0000000..e3943dd --- /dev/null +++ b/saxon6.build.script @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/saxon6.changes b/saxon6.changes new file mode 100644 index 0000000..dd24f1a --- /dev/null +++ b/saxon6.changes @@ -0,0 +1,117 @@ +------------------------------------------------------------------- +Wed Oct 31 08:31:43 UTC 2012 - mvyskocil@suse.com + +- reintroduce it as saxon6 again (bnc#780666) + * requested and needed by documentation team +- add saxon-javac-encoding.patch fixes build under jdk7 + +------------------------------------------------------------------- +Wed Dec 2 18:50:44 UTC 2009 - coolo@novell.com + +- update patches, fix build + +------------------------------------------------------------------- +Mon Mar 10 12:46:08 CET 2008 - anosek@suse.cz + +- downgrade to version 6.5.5, moved Saxon 8.x to separate saxon8 + package +- based on the JPackage project, dropped two patches + (tinytree.patch) (fragmentval.patch) +- Saxon 6 is needed because, for example, the DocBook stylesheets + have some JAR files which contain extension functions written + only for Saxon 6. These functions provide useful methods for + DocBook processing. However, these are not compatible + with the latest Saxon package. + +------------------------------------------------------------------- +Wed Feb 6 14:14:44 CET 2008 - anosek@suse.cz + +- BuildRequires: java-1.6.0-devel + +------------------------------------------------------------------- +Wed May 23 12:07:12 CEST 2007 - dbornkessel@suse.de + +- make rpmllint happy: + - delete windows '\r' from doc files + - index jars + - faster compiling + +------------------------------------------------------------------- +Thu Mar 29 12:15:40 CEST 2007 - dbornkessel@suse.de + +- added unzip to build reqs + +------------------------------------------------------------------- +Wed Oct 4 20:09:54 CEST 2006 - dbornkessel@suse.de + +- update to saxon 8.8 +- build from source (no binary package) + +------------------------------------------------------------------- +Tue Mar 21 14:21:41 CET 2006 - dbornkessel@suse.de + +- removed setJava call in wrapper script (Bug #158699) + +------------------------------------------------------------------- +Wed Jan 25 21:47:42 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Fri Feb 27 20:02:57 CET 2004 - pmladek@suse.cz + +- updated to the version 6.5.3 [#35119] + * fixes 28 bugs found in Saxon 6.5.2 +- added a missing prebuilt optional saxon-fop.jar +- fixed path to saxon jars in README.SuSE + +------------------------------------------------------------------- +Tue Feb 24 13:27:03 CET 2004 - hmacht@suse.de + +- building as non-root + +------------------------------------------------------------------- +Mon Nov 25 15:39:19 CET 2002 - pmladek@suse.cz + +- added the script saxon to use StyleSheets [#21801] +- improved README.SuSE +- classes moved from /usr/lib to /usr/share + +------------------------------------------------------------------- +Mon Aug 05 17:33:49 CEST 2002 - pmladek@suse.cz + +- updated to bugfix version 6.5.2 +- small improvent in README.SuSE (run setJava with new better option) + +------------------------------------------------------------------- +Wed Feb 6 18:21:32 CET 2002 - pmladek@suse.cz + +- updated to version 6.5: + * fixed number of bugs + * important incompatible change for XSLT conformance reasons + * you can find details on the page: + file:/usr/share/doc/packages/saxon/doc/changes.html +- moved to noarch + +------------------------------------------------------------------- +Wed Nov 28 15:39:07 CET 2001 - ke@suse.de + +- Update to version 6.4.4: + - 20% performance boost. + - Support JDOM. +- Provide convenience link (/usr/lib/saxon -> + /usr/lib/saxon-%{version}). + +------------------------------------------------------------------- +Wed Nov 21 14:08:06 CET 2001 - pmladek@suse.cz + +- requires changed from java2 to more universal jre1.3.x +- added README.SuSE + +------------------------------------------------------------------- +Wed May 23 15:24:05 CEST 2001 - ke@suse.de + +- Initial SuSE package: Version 6.3; long pending bug partly resolved + [#291]. + + diff --git a/saxon6.saxon.script b/saxon6.saxon.script new file mode 100644 index 0000000..37b1d98 --- /dev/null +++ b/saxon6.saxon.script @@ -0,0 +1,41 @@ +#!/bin/sh +# +# saxon script +# JPackage Project + +. /usr/share/java-utils/java-functions + +MAIN_CLASS=com.icl.saxon.StyleSheet + +BASE_JARS="saxon.jar xml-commons-apis.jar jaxp_parser_impl.jar" + +# Optional jars +CLASSPATH="$CLASSPATH:"$(build-classpath docbook-xsl-saxon saxon-fop \ + avalon-logkit xml-commons-resolver 2>/dev/null) || : + +# If we have resolver, add the CatalogManager.properties dir to CLASSPATH, +# and tweak command line options so that it's used. +args= +if echo "$CLASSPATH" | grep xml-commons-resolver >/dev/null 2>&1 ; then + CLASSPATH="$CLASSPATH:__RESOLVERDIR__" + # Tune options to use resolver. + r=org.apache.xml.resolver.tools.ResolvingXMLReader + for opt in -x -y ; do + if ! echo $@ | grep "\\$opt " >/dev/null 2>&1 ; then + args="$args $opt $r" + fi + done + r=org.apache.xml.resolver.tools.CatalogResolver + if ! echo $@ | grep "\\-r " >/dev/null 2>&1 ; then + args="$args -r $r" + fi +fi + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run $args "$@" diff --git a/saxon6.spec b/saxon6.spec new file mode 100644 index 0000000..c2eaaf2 --- /dev/null +++ b/saxon6.spec @@ -0,0 +1,242 @@ +# +# spec file for package saxon6 (Version 6.5.5) +# +# Copyright (c) 2009 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/ +# + + +%define section free +%define resolverdir %{_sysconfdir}/java/resolver + +Name: saxon6 +Version: 6.5.5 +Summary: The SAXON XSLT Processor from Michael Kay +Release: 0 +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 +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 +BuildRequires: jpackage-utils >= 1.6 +BuildRequires: xml-commons-apis +BuildRequires: jdom >= 1.0 +BuildRequires: fop >= 0.20.1 +%if ! %defined suse_version +BuildRequires: java-javadoc +BuildRequires: jdom-javadoc >= 1.0 +BuildRequires: fop-javadoc +%else +BuildRequires: java-devel +BuildRequires: unzip +BuildRequires: ant +%endif +Requires: jaxp_parser_impl +Requires: /usr/sbin/update-alternatives +Provides: jaxp_transform_impl +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 + +%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 + +%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 + +%description jdom +JDOM support for %{name}. + +%package scripts +Summary: Utility scripts for %{name} +Group: Productivity/Publishing/XML +Requires: jpackage-utils >= 1.6 +Requires: %{name} = %{version}-%{release} + +%description scripts +Utility scripts for %{name}. + +%prep +%setup -q -c +unzip -q source.zip +cp -p %{SOURCE2} ./build.xml +%patch2 -p0 +%patch3 -p1 +# 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 \ + -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 + +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} +%{_bindir}/saxon +%attr(0644,root,root) %{_mandir}/man1/%{name}.1* + +%changelog