2007-01-16 00:41:47 +01:00
|
|
|
#
|
2013-01-07 13:19:19 +01:00
|
|
|
# spec file for package xalan-j2
|
2007-01-16 00:41:47 +01:00
|
|
|
#
|
2024-02-21 17:26:29 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2007-01-16 00:41:47 +01:00
|
|
|
#
|
2009-03-20 19:36:49 +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.
|
|
|
|
|
2018-11-07 14:14:25 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:41:47 +01:00
|
|
|
#
|
|
|
|
|
2008-07-21 18:03:55 +02:00
|
|
|
|
2023-08-30 21:40:03 +02:00
|
|
|
%define cvs_version 2_7_3
|
2013-08-28 09:48:24 +02:00
|
|
|
Name: xalan-j2
|
2023-08-30 21:40:03 +02:00
|
|
|
Version: 2.7.3
|
2013-01-07 13:19:19 +01:00
|
|
|
Release: 0
|
2007-01-16 00:41:47 +01:00
|
|
|
Summary: Java XSLT processor
|
2011-12-06 19:13:36 +01:00
|
|
|
License: Apache-2.0
|
2013-01-07 13:19:19 +01:00
|
|
|
Group: Development/Libraries/Java
|
2021-07-06 09:31:38 +02:00
|
|
|
URL: https://xalan.apache.org/index.html
|
2023-08-30 21:40:03 +02:00
|
|
|
Source0: https://www.apache.org/dist/xalan/xalan-j/source/xalan-j_%{cvs_version}-src.tar.gz
|
|
|
|
Source1: https://repo1.maven.org/maven2/xalan/xalan/%{version}/xalan-%{version}.pom
|
|
|
|
Source2: https://repo1.maven.org/maven2/xalan/serializer/%{version}/serializer-%{version}.pom
|
2018-11-18 22:08:23 +01:00
|
|
|
Source3: xsltc-%{version}.pom
|
2019-02-01 11:12:56 +01:00
|
|
|
Source4: xalan-j2-serializer-MANIFEST.MF
|
|
|
|
Source5: xalan-j2-MANIFEST.MF
|
2018-11-18 22:08:23 +01:00
|
|
|
# OSGi manifests
|
2007-01-16 00:41:47 +01:00
|
|
|
Patch0: %{name}-noxsltcdeps.patch
|
|
|
|
Patch1: %{name}-manifest.patch
|
|
|
|
Patch2: %{name}-crosslink.patch
|
2017-10-03 14:09:15 +02:00
|
|
|
Patch3: openjdk-build.patch
|
2013-08-28 09:48:24 +02:00
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: bcel
|
2014-06-23 09:57:58 +02:00
|
|
|
BuildRequires: dos2unix
|
2017-10-03 14:09:15 +02:00
|
|
|
BuildRequires: fdupes
|
2014-06-23 09:57:58 +02:00
|
|
|
BuildRequires: java-cup-bootstrap
|
2022-03-18 17:35:58 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-02-21 17:26:29 +01:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2013-08-28 09:48:24 +02:00
|
|
|
BuildRequires: jlex
|
2023-08-30 21:40:03 +02:00
|
|
|
BuildRequires: regexp
|
2013-08-28 09:48:24 +02:00
|
|
|
BuildRequires: servletapi5
|
|
|
|
BuildRequires: xml-commons-apis-bootstrap
|
2023-08-30 23:37:58 +02:00
|
|
|
#!BuildIgnore: apache-commons-lang3
|
2021-07-06 09:31:38 +02:00
|
|
|
#!BuildIgnore: java-cup
|
|
|
|
#!BuildIgnore: xerces-j2
|
|
|
|
#!BuildIgnore: xml-commons
|
|
|
|
#!BuildIgnore: xml-commons-apis
|
|
|
|
#!BuildIgnore: xml-commons-jaxp-1.3-apis
|
|
|
|
#!BuildIgnore: xml-commons-resolver
|
2014-06-23 09:59:00 +02:00
|
|
|
Requires: jaxp_parser_impl
|
|
|
|
Requires(post): update-alternatives
|
2024-02-21 17:26:29 +01:00
|
|
|
Requires(postun): update-alternatives
|
2014-06-23 09:59:00 +02:00
|
|
|
Provides: jaxp_transform_impl
|
|
|
|
BuildArch: noarch
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%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: Java XSLT compiler
|
|
|
|
Group: Development/Libraries/Java
|
2013-01-07 13:19:19 +01:00
|
|
|
Requires: bcel
|
|
|
|
Requires: java_cup
|
|
|
|
Requires: jaxp_parser_impl
|
|
|
|
Requires: jlex
|
|
|
|
Requires: regexp
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%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 xalan-j2
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description manual
|
|
|
|
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.
|
|
|
|
|
|
|
|
This package contains the manual for Xalan.
|
|
|
|
|
|
|
|
%package demo
|
2013-08-28 09:48:24 +02:00
|
|
|
Summary: Demonstration and samples for xalan-j2
|
2007-01-16 00:41:47 +01:00
|
|
|
Group: Development/Libraries/Java
|
2013-01-07 13:19:19 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: servlet
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%description demo
|
|
|
|
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.
|
|
|
|
|
|
|
|
This package contains demonstration and sample files for Xalan.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n xalan-j_%{cvs_version}
|
2024-02-21 17:26:29 +01:00
|
|
|
%patch -P 0 -p1
|
|
|
|
%patch -P 1 -p1
|
|
|
|
%patch -P 2 -p1
|
|
|
|
%patch -P 3 -p1
|
2007-01-16 00:41:47 +01:00
|
|
|
# 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
|
|
|
|
mv tools/xalan2jdoc.jar.no tools/xalan2jdoc.jar
|
|
|
|
mv tools/xalan2jtaglet.jar.no tools/xalan2jtaglet.jar
|
2014-06-23 09:57:58 +02:00
|
|
|
dos2unix KEYS LICENSE.txt NOTICE.txt xdocs/sources/xsltc/README.xsltc xdocs/sources/xsltc/README.xslt
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{java_home}" ; fi
|
|
|
|
pushd lib
|
2022-03-09 11:04:34 +01:00
|
|
|
ln -sf $(build-classpath java-cup-runtime) runtime.jar
|
2023-08-30 21:40:03 +02:00
|
|
|
ln -sf $(build-classpath bcel) bcel-6.7.0.jar
|
2007-01-16 00:41:47 +01:00
|
|
|
ln -sf $(build-classpath regexp) regexp.jar
|
|
|
|
ln -sf $(build-classpath xerces-j2) xercesImpl.jar
|
|
|
|
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
|
|
|
|
popd
|
|
|
|
pushd tools
|
2022-03-09 11:04:34 +01:00
|
|
|
ln -sf $(build-classpath java-cup) java_cup.jar
|
2007-01-16 00:41:47 +01:00
|
|
|
ln -sf $(build-classpath ant) ant.jar
|
|
|
|
ln -sf $(build-classpath jlex) JLex.jar
|
|
|
|
ln -sf $(build-classpath stylebook) stylebook-1.0-b3_xalan-2.jar
|
|
|
|
popd
|
2023-08-30 21:40:03 +02:00
|
|
|
%{ant} \
|
2017-10-03 14:09:15 +02:00
|
|
|
-Dservlet-api.jar=$(build-classpath servletapi5) \
|
2022-03-18 17:35:58 +01:00
|
|
|
-Dcompiler.source=1.8 -Dcompiler.target=1.8 \
|
2007-01-16 00:41:47 +01:00
|
|
|
-Djava.awt.headless=true \
|
|
|
|
-Dapi.j2se=%{_javadocdir}/java \
|
|
|
|
-Dbuild.xalan-interpretive.jar=build/xalan-interpretive.jar \
|
|
|
|
xalan-interpretive.jar\
|
|
|
|
xsltc.unbundledjar \
|
|
|
|
docs \
|
|
|
|
xsltc.docs \
|
|
|
|
samples \
|
|
|
|
servlet
|
|
|
|
|
2019-02-01 11:12:56 +01:00
|
|
|
# inject OSGi manifests
|
|
|
|
jar ufm build/serializer.jar %{SOURCE4}
|
|
|
|
jar ufm build/xalan-interpretive.jar %{SOURCE5}
|
|
|
|
|
2007-01-16 00:41:47 +01:00
|
|
|
%install
|
|
|
|
# jars
|
2013-08-28 09:48:24 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
2007-01-16 00:41:47 +01:00
|
|
|
install -p -m 644 build/xalan-interpretive.jar \
|
2021-07-06 09:31:38 +02:00
|
|
|
%{buildroot}%{_javadir}/%{name}.jar
|
2007-01-16 00:41:47 +01:00
|
|
|
install -p -m 644 build/xsltc.jar \
|
2021-07-06 09:31:38 +02:00
|
|
|
%{buildroot}%{_javadir}/xsltc.jar
|
2007-01-16 00:41:47 +01:00
|
|
|
install -p -m 644 build/serializer.jar \
|
2021-07-06 09:31:38 +02:00
|
|
|
%{buildroot}%{_javadir}/%{name}-serializer.jar
|
|
|
|
|
2018-11-07 14:14:25 +01:00
|
|
|
# pom
|
|
|
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
2024-02-21 17:26:29 +01:00
|
|
|
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom
|
2021-07-06 09:31:38 +02:00
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar
|
2024-02-21 17:26:29 +01:00
|
|
|
%{mvn_install_pom} %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}-serializer.pom
|
2021-07-06 09:31:38 +02:00
|
|
|
%add_maven_depmap %{name}-serializer.pom %{name}-serializer.jar
|
2024-02-21 17:26:29 +01:00
|
|
|
%{mvn_install_pom} %{SOURCE3} %{buildroot}%{_mavenpomdir}/xsltc.pom
|
2021-07-06 09:31:38 +02:00
|
|
|
%add_maven_depmap xsltc.pom xsltc.jar -f xsltc
|
2018-11-07 14:14:25 +01:00
|
|
|
|
2007-01-16 00:41:47 +01:00
|
|
|
# demo
|
2013-08-28 09:48:24 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
2007-01-16 00:41:47 +01:00
|
|
|
install -p -m 644 build/xalansamples.jar \
|
2013-08-28 09:48:24 +02:00
|
|
|
%{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
|
2007-01-16 00:41:47 +01:00
|
|
|
install -p -m 644 build/xalanservlet.war \
|
2013-08-28 09:48:24 +02:00
|
|
|
%{buildroot}%{_datadir}/%{name}/%{name}-servlet.war
|
|
|
|
cp -pr samples %{buildroot}%{_datadir}/%{name}
|
2017-10-03 14:09:15 +02:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
2007-01-16 00:41:47 +01:00
|
|
|
|
2013-08-28 09:48:24 +02:00
|
|
|
# alternatives
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2014-07-28 08:49:26 +02:00
|
|
|
ln -sf %{_sysconfdir}/alternatives/jaxp_transform_impl.jar %{buildroot}%{_javadir}/jaxp_transform_impl.jar
|
2013-08-28 09:48:24 +02:00
|
|
|
|
|
|
|
# bnc#485299
|
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
|
|
|
echo xalan-j2-serializer > %{buildroot}/%{_sysconfdir}/ant.d/serializer
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%post
|
|
|
|
update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
|
|
|
|
jaxp_transform_impl %{_javadir}/%{name}.jar 30
|
|
|
|
|
|
|
|
%preun
|
|
|
|
{
|
|
|
|
[ $1 = 0 ] || exit 0
|
|
|
|
update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar
|
|
|
|
} >/dev/null 2>&1 || :
|
|
|
|
|
2021-07-06 09:31:38 +02:00
|
|
|
%files -f .mfiles
|
2007-01-16 00:41:47 +01:00
|
|
|
%defattr(0644,root,root,0755)
|
2021-07-06 09:31:38 +02:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc KEYS NOTICE.txt
|
2014-06-23 09:57:58 +02:00
|
|
|
%config %{_sysconfdir}/ant.d/serializer
|
2013-08-28 09:48:24 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/jaxp_transform_impl.jar
|
2014-07-21 10:46:52 +02:00
|
|
|
%{_javadir}/jaxp_transform_impl.jar
|
2021-07-06 09:31:38 +02:00
|
|
|
|
|
|
|
%files xsltc -f .mfiles-xsltc
|
2007-01-16 00:41:47 +01:00
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%doc build/docs/*
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
2008-07-21 18:03:55 +02:00
|
|
|
%changelog
|