# Copyright (c) 2000-2005, JPackage Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the # distribution. # 3. Neither the name of the JPackage Project nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Summary: Version 8 of Java XPath, XSLT 2.0 and XQuery implementation Name: saxon9 Version: 9.2.0.3 Release: 1%{?dist} # net.sf.saxon.om.XMLChar is from ASL-licensed Xerces License: MPLv1.0 and ASL 1.1 Group: Applications/Text URL: http://saxon.sourceforge.net/ Source0: http://dfn.dl.sourceforge.net/project/saxon/Saxon-HE/9.2/saxon-resources9-2-0-2.zip Source1: %{name}.saxon.script Source2: %{name}.saxonq.script Source3: %{name}.build.script Source4: %{name}.1 Source5: %{name}q.1 # There's no 9.2.0.3 resource bundle, we patch 9.2.0.2 with difference against 9.2.0.3 source bundle Patch0: saxon9-9.2.0.2-9.2.0.3.patch BuildRequires: ant BuildRequires: jpackage-utils >= 0:1.6 BuildRequires: bea-stax-api BuildRequires: xml-commons-apis BuildRequires: xom BuildRequires: jdom >= 0:1.0-0.b7 BuildRequires: java-javadoc BuildRequires: jdom-javadoc >= 0:1.0-0.b9.3jpp BuildRequires: dom4j Requires: jpackage-utils Requires: bea-stax-api Requires: bea-stax Requires: jaxp_parser_impl Requires: /usr/sbin/update-alternatives Provides: jaxp_transform_impl = %{version}-%{release} BuildArch: noarch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description Saxon HE is Saxonica's non-schema-aware implementation of the XPath 2.0, XSLT 2.0, and XQuery 1.0 specifications aligned with the W3C Candidate Recommendation published on 3 November 2005. It is a complete and conformant implementation, providing all the mandatory features of those specifications and nearly all the optional features. %package manual Summary: Manual for %{name} Group: Applications/Text %description manual Manual for %{name}. %package javadoc Summary: Javadoc for %{name} Group: Documentation %description javadoc Javadoc for %{name}. %package demo Summary: Demos for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} %description demo Demonstrations and samples for %{name}. %package sql Summary: SQL support for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} %description sql Supports XSLT extensions for accessing and updating a relational database from within a stylesheet. %package jdom Summary: JDOM support for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} Requires: jdom >= 0:1.0-0.b7 %description jdom Provides additional classes enabling Saxon to be used with JDOM trees. Supports using a JDOM document as the input or output of transformations and queries. Requires jdom.jar on the classpath. %package dom Summary: DOM support for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} %description dom Provides additional classes enabling Saxon to be used with the DOM Document Object Model. Supports using a DOM as the input or output of transformations and queries, and calling extension functions that use DOM interfaces to access a Saxon tree structure. Requires DOM level 3 (dom.jar, part of JAXP 1.3) to be on the classpath, if not running under JDK 1.5. %package xom Summary: XOM support for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} Requires: xom %description xom Provides additional classes enabling Saxon to be used with XOM trees. Supports using a XOM document as the input or output of transformations and queries. Requires xom.jar on the classpath. %package xpath Summary: XPATH support for %{name} Group: Applications/Text Requires: %{name} = %{version}-%{release} %description xpath Provides support for the JAXP 1.3 XPath API. Requires the JAXP 1.3 version of jaxp-api.jar on the classpath, if not running under JDK 1.5. %package scripts Summary: Utility scripts for %{name} Group: Applications/Text Requires: jpackage-utils >= 0:1.5 Requires: %{name} = %{version}-%{release} %description scripts Utility scripts for %{name}. %prep %setup -q -c unzip -q source.zip -d src find . -name CVS -delete cd src %patch0 -p1 -b .9.2.0.3 cd .. cp -p %{SOURCE3} ./build.xml # deadNET rm -rf src/net/sf/saxon/dotnet # Depends on XQJ (javax.xml.xquery) rm -rf src/net/sf/saxon/xqj # This requires a EE edition feature (com.saxonica.xsltextn) rm -rf src/net/sf/saxon/option/sql/SQLElementFactory.java # cleanup unnecessary stuff we'll build ourselves rm -rf docs/api find . -name "*.jar" -delete %build export CLASSPATH=%(build-classpath xml-commons-apis jdom xom bea-stax-api dom4j) ant \ -Dj2se.javadoc=%{_javadocdir}/java \ -Djdom.javadoc=%{_javadocdir}/jdom %install rm -rf $RPM_BUILD_ROOT # jars mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p build/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar cp -p build/lib/%{name}-xpath.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-xpath-%{version}.jar cp -p build/lib/%{name}-xom.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-xom-%{version}.jar cp -p build/lib/%{name}-sql.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-sql-%{version}.jar cp -p build/lib/%{name}-jdom.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-jdom-%{version}.jar cp -p build/lib/%{name}-dom.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-dom-%{version}.jar (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # demo mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp -pr samples/* $RPM_BUILD_ROOT%{_datadir}/%{name} # scripts mkdir -p $RPM_BUILD_ROOT%{_bindir} install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name} install -p -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}q mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 install -p -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}q.1 # jaxp_transform_impl ghost symlink ln -s %{_sysconfdir}/alternatives \ $RPM_BUILD_ROOT%{_javadir}/jaxp_transform_impl.jar %clean rm -rf $RPM_BUILD_ROOT %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 || : %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %files %defattr(-,root,root,-) %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar %ghost %{_javadir}/jaxp_transform_impl.jar %files xpath %defattr(-,root,root,-) %{_javadir}/%{name}-xpath* %files xom %defattr(-,root,root,-) %{_javadir}/%{name}-xom* %files sql %defattr(-,root,root,-) %{_javadir}/%{name}-sql* %files jdom %defattr(-,root,root,-) %{_javadir}/%{name}-jdom* %files dom %defattr(-,root,root,-) %{_javadir}/%{name}-dom* %files manual %defattr(-,root,root,-) %doc doc/*.html %files javadoc %defattr(-,root,root,-) %ghost %doc %{_javadocdir}/%{name} %doc %{_javadocdir}/%{name}-%{version} %files demo %defattr(-,root,root,-) %{_datadir}/%{name} %files scripts %defattr(-,root,root,-) %{_bindir}/%{name} %{_bindir}/%{name}q %{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}q.1* %changelog * Tue Nov 03 2009 Lubomir Rintel - 9.2.0.3-1 - New package, based on saxon8 * Tue Nov 03 2009 Lubomir Rintel - 0:8.7-1 - Tidied up for Fedora * Tue Mar 14 2006 Deepak Bhole - 0:B.8.7-1jpp - Changed package name for compatibility - Upgraded to 8.7 - Added saxonq script for queries - Updated man pages * Mon Jan 30 2006 Ralph Apel - 0:8.6.1-1jpp - Derive saxonb8 from saxon7 * Mon Sep 05 2005 Ralph Apel - 0:7.9.1-1jpp - Derive saxon7 from saxon - no more aelfred nor fop subpackages * Fri Sep 03 2004 Fernando Nasser - 0:6.5.3-3jpp - Rebuilt with Ant 1.6.2 * Mon Jul 19 2004 Ville Skyttä - 0:6.5.3-2jpp - Apply two patches for known limitations from http://saxon.sourceforge.net/saxon6.5.3/limitations.html - Make the command line script use xml-commons-resolver if it's available. - Include man page for command line script. - Add patch to fix command line option handling and document missing options. - New style versionless javadoc dir symlinking. - Crosslink with local J2SE javadocs. - Add missing jdom-javadoc build dependency. * Sun Aug 31 2003 Ville Skyttä - 0:6.5.3-1jpp - Update to 6.5.3. - Crosslink with local xml-commons-apis and fop javadocs. * Tue Jun 3 2003 Ville Skyttä - 0:6.5.2-7jpp - Non-versioned javadoc symlinking. - Include Main-Class attribute in saxon.jar. - Own (ghost) %%{_javadir}/jaxp_transform_impl.jar. - Remove alternatives in preun instead of postun. * Thu Apr 17 2003 Ville Skyttä - 6.5.2-6jpp - Rebuild for JPackage 1.5. - Split shell script to -scripts subpackage. - Use non-versioned jar in jaxp_transform_impl alternative, and don't remove it on upgrade. - Spec file cleanups. * Thu Jul 25 2002 Ville Skyttä 6.5.2-5jpp - Fix shell script (again). - Rebuild with -Dbuild.compiler=modern (saxon-fop won't build with jikes). * Fri Jul 19 2002 Ville Skyttä 6.5.2-4jpp - First public JPackage release. - Compile with build.xml by yours truly. - AElfred no more provides jaxp_parser_impl; it's SAX only, no DOM. - Fix shell script. * Mon Jul 1 2002 Ville Skyttä 6.5.2-3jpp - Provides jaxp_parser_impl. - Requires xml-commons-apis. * Sun Jun 30 2002 Ville Skyttä 6.5.2-2jpp - Use sed instead of bash 2 extension when symlinking jars. - Provides jaxp_transform_impl. * Sat May 11 2002 Ville Skyttä 6.5.2-1jpp - First JPackage release. - Provides jaxp_parser2 though there's no DOM implementation in this AElfred.