# # 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