%global pkg_name xalan-j2 %{?scl:%scl_package %{pkg_name}} %{?maven_find_provides_and_requires} # 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. # %global cvs_version 2_7_1 Name: %{?scl_prefix}%{pkg_name} Version: 2.7.1 Release: 23.2%{?dist} Epoch: 0 Summary: Java XSLT processor # src/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.java is W3C License: ASL 2.0 and W3C Source0: http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_7_1-src.tar.gz Source1: %{pkg_name}-serializer-MANIFEST.MF Source2: http://repo1.maven.org/maven2/xalan/xalan/2.7.1/xalan-2.7.1.pom Source3: http://repo1.maven.org/maven2/xalan/serializer/2.7.1/serializer-2.7.1.pom Source4: xsltc-%{version}.pom Source5: %{pkg_name}-MANIFEST.MF Patch0: %{pkg_name}-noxsltcdeps.patch # Fix the serializer JAR filename in xalan-j2's MANIFEST.MF # https://bugzilla.redhat.com/show_bug.cgi?id=718738 Patch1: %{pkg_name}-serializerJARname.patch # Fix CVE-2014-0107: insufficient constraints in secure processing # feature (oCERT-2014-002). Generated form upstream revisions 1581058 # and 1581426. Patch2: %{pkg_name}-CVE-2014-0107.patch URL: http://xalan.apache.org/ BuildArch: noarch Requires: %{?scl_prefix}xerces-j2 BuildRequires: %{?maven_scl_prefix}javapackages-tools BuildRequires: %{?maven_scl_prefix}ant BuildRequires: %{?maven_scl_prefix}bcel BuildRequires: %{?maven_scl_prefix}java_cup BuildRequires: %{?maven_scl_prefix}regexp BuildRequires: %{?maven_scl_prefix}tomcat-servlet-3.0-api BuildRequires: %{?maven_scl_prefix}xerces-j2 >= 0:2.7.1 BuildRequires: %{?maven_scl_prefix}xml-commons-apis >= 0:1.3 BuildRequires: %{?maven_scl_prefix}xml-stylebook BuildRequires: zip %description Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types. It implements the W3C Recommendations for XSL Transformations (XSLT) and the XML Path Language (XPath). It can be used from the command line, in an applet or a servlet, or as a module in other program. #%package xsltc #Summary: XSLT compiler #Requires: %{?scl_prefix}java_cup #Requires: %{?scl_prefix}bcel #Requires: %{?scl_prefix}regexp #Requires: %{?scl_prefix}xerces-j2 #%description xsltc #The XSLT Compiler is a Java-based tool for compiling XSLT stylesheets into #lightweight and portable Java byte codes called translets. %package manual Summary: Manual for %{pkg_name} %description manual Documentation for %{pkg_name}. %package javadoc Summary: Javadoc for %{pkg_name} %description javadoc Javadoc for %{pkg_name}. #%package demo #Summary: Demo for %{pkg_name} #Requires: %{name} = %{epoch}:%{version}-%{release} #Requires: %{?scl_prefix}tomcat-servlet-3.0-api #%description demo #Demonstrations and samples for %{pkg_name}. %prep %setup -q -n xalan-j_%{cvs_version} %{?scl:scl enable %{scl} - <<"EOF"} set -e -x %patch0 -p0 %patch1 -p0 %patch2 -p1 # Remove all binary libs, except ones needed to build docs and N/A elsewhere. for j in $(find . -name "*.jar"); do mv $j $j.no done # this tar.gz contains bundled software, some of which has unclear # licensing terms (W3C Software/Document license) . We could probably # replicate this with our jars but it's too much work so just generate # non-interlinked documentation rm src/*tar.gz sed -i '/