252 lines
7.9 KiB
RPMSpec
252 lines
7.9 KiB
RPMSpec
|
#
|
||
|
# spec file for package xalan-j2 (Version 2.7.0)
|
||
|
#
|
||
|
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||
|
# This file and all modifications and additions to the pristine
|
||
|
# package are under the same license as the package itself.
|
||
|
#
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
# norootforbuild
|
||
|
# icecream 0
|
||
|
|
||
|
Name: xalan-j2
|
||
|
BuildRequires: ant bcel java2-devel-packages java_cup jlex servletapi5 xml-commons-apis
|
||
|
%define section free
|
||
|
%define version 2.7.0
|
||
|
%define cvs_version 2_7_0
|
||
|
Version: 2.7.0
|
||
|
Release: 1
|
||
|
Summary: Java XSLT processor
|
||
|
License: Apache
|
||
|
Source0: http://www.apache.org/dist/xml/xalan-j/source/xalan-j_%{cvs_version}-src.tar.gz
|
||
|
Patch0: %{name}-noxsltcdeps.patch
|
||
|
Patch1: %{name}-manifest.patch
|
||
|
Patch2: %{name}-crosslink.patch
|
||
|
Patch3: %{name}-java14compat.patch
|
||
|
URL: http://xml.apache.org/xalan-j/
|
||
|
Group: Development/Libraries/Java
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
BuildArch: noarch
|
||
|
Provides: jaxp_transform_impl
|
||
|
Requires: jaxp_parser_impl
|
||
|
PreReq: /usr/sbin/update-alternatives
|
||
|
|
||
|
%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
|
||
|
Requires: java_cup, bcel, jlex, regexp, jaxp_parser_impl
|
||
|
#Requires: /usr/sbin/update-alternatives
|
||
|
#Provides: jaxp_transform_impl
|
||
|
|
||
|
%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 javadoc
|
||
|
PreReq: coreutils
|
||
|
Summary: Javadoc for xalan-j2
|
||
|
Group: Development/Libraries/Java
|
||
|
|
||
|
%description javadoc
|
||
|
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 javadoc documentation for Xalan.
|
||
|
|
||
|
|
||
|
|
||
|
%package demo
|
||
|
Summary: Demonstration and samples for xalan-j2.
|
||
|
Group: Development/Libraries/Java
|
||
|
Requires: %{name} = %{version}-%{release}, servlet
|
||
|
|
||
|
%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}
|
||
|
%patch0 -p0
|
||
|
#%patch1 -p0
|
||
|
#%patch2 -p0
|
||
|
%patch3
|
||
|
# 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
|
||
|
#find . -name "*.jar" \
|
||
|
# ! -name xalan2jdoc.jar \
|
||
|
# ! -name stylebook-1.0-b3_xalan-2.jar \
|
||
|
# -exec rm -f {} \;
|
||
|
|
||
|
%build
|
||
|
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{java_home}" ; fi
|
||
|
pushd lib
|
||
|
ln -sf $(build-classpath java_cup-runtime) runtime.jar
|
||
|
ln -sf $(build-classpath bcel) BCEL.jar
|
||
|
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
|
||
|
ln -sf $(build-classpath java_cup) java_cup.jar
|
||
|
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
|
||
|
export CLASSPATH=$(build-classpath servletapi5)
|
||
|
#
|
||
|
#
|
||
|
#export CLASSPATH=$(build-classpath servletapi5 java_cup java_cup-runtime jlex \
|
||
|
#bcel xerces-j2)
|
||
|
ant \
|
||
|
-Djava.awt.headless=true \
|
||
|
-Dapi.j2se=%{_javadocdir}/java \
|
||
|
-Dbuild.xalan-interpretive.jar=build/xalan-interpretive.jar \
|
||
|
xalan-interpretive.jar\
|
||
|
xsltc.unbundledjar \
|
||
|
docs \
|
||
|
xsltc.docs \
|
||
|
javadocs \
|
||
|
samples \
|
||
|
servlet
|
||
|
|
||
|
%install
|
||
|
# jars
|
||
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||
|
install -p -m 644 build/xalan-interpretive.jar \
|
||
|
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||
|
install -p -m 644 build/xsltc.jar \
|
||
|
$RPM_BUILD_ROOT%{_javadir}/xsltc-%{version}.jar
|
||
|
install -p -m 644 build/serializer.jar \
|
||
|
$RPM_BUILD_ROOT%{_javadir}/%{name}-serializer-%{version}.jar
|
||
|
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||
|
# javadoc
|
||
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||
|
cp -pr build/docs/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||
|
rm -rf build/docs/apidocs
|
||
|
# demo
|
||
|
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||
|
install -p -m 644 build/xalansamples.jar \
|
||
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-samples.jar
|
||
|
install -p -m 644 build/xalanservlet.war \
|
||
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-servlet.war
|
||
|
cp -pr samples $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||
|
# fix link between manual and javadoc
|
||
|
(cd build/docs; ln -sf %{_javadocdir}/%{name}-%{version} apidocs)
|
||
|
# 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 30
|
||
|
|
||
|
%preun
|
||
|
{
|
||
|
[ $1 = 0 ] || exit 0
|
||
|
update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar
|
||
|
} >/dev/null 2>&1 || :
|
||
|
#%post xsltc
|
||
|
#update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
|
||
|
# jaxp_transform_impl %{_javadir}/xsltc.jar 10
|
||
|
#%preun xsltc
|
||
|
#{
|
||
|
# [ $1 = 0 ] || exit 0
|
||
|
# update-alternatives --remove jaxp_transform_impl %{_javadir}/xsltc.jar
|
||
|
#} >/dev/null 2>&1 || :
|
||
|
|
||
|
%post javadoc
|
||
|
rm -f %{_javadocdir}/%{name}
|
||
|
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
||
|
|
||
|
%files
|
||
|
%defattr(0644,root,root,0755)
|
||
|
%doc KEYS licenses/xalan.LICENSE.txt licenses/xalan.NOTICE.txt licenses/serializer.LICENSE.txt licenses/serializer.NOTICE.txt
|
||
|
%{_javadir}/%{name}-%{version}.jar
|
||
|
%{_javadir}/%{name}.jar
|
||
|
%{_javadir}/%{name}-serializer-%{version}.jar
|
||
|
%{_javadir}/%{name}-serializer.jar
|
||
|
%ghost %{_javadir}/jaxp_transform_impl.jar
|
||
|
|
||
|
%files xsltc
|
||
|
%defattr(0644,root,root,0755)
|
||
|
%{_javadir}/xsltc-%{version}.jar
|
||
|
%{_javadir}/xsltc.jar
|
||
|
#%ghost %{_javadir}/jaxp_transform_impl.jar
|
||
|
|
||
|
%files manual
|
||
|
%defattr(0644,root,root,0755)
|
||
|
%doc build/docs/*
|
||
|
|
||
|
%files javadoc
|
||
|
%defattr(0644,root,root,0755)
|
||
|
%doc %{_javadocdir}/%{name}-%{version}
|
||
|
%ghost %doc %{_javadocdir}/%{name}
|
||
|
|
||
|
%files demo
|
||
|
%defattr(0644,root,root,0755)
|
||
|
%{_datadir}/%{name}
|
||
|
|
||
|
%changelog -n xalan-j2
|
||
|
* Thu Sep 21 2006 - skh@suse.de
|
||
|
- update to version 2.7.0 from jpackage.org
|
||
|
- don't use icecream
|
||
|
- use target="1.4" for build with java 1.5
|
||
|
* Wed Jan 25 2006 - mls@suse.de
|
||
|
- converted neededforbuild to BuildRequires
|
||
|
* Fri Jul 29 2005 - jsmeix@suse.de
|
||
|
- Adjustments in the spec file.
|
||
|
* Wed Jul 20 2005 - jsmeix@suse.de
|
||
|
- Current version 2.6.0 from JPackage.org
|
||
|
* Mon Jul 18 2005 - jsmeix@suse.de
|
||
|
- Current version 2.6.0 from JPackage.org
|
||
|
* Thu Sep 16 2004 - skh@suse.de
|
||
|
- Fix prerequires
|
||
|
* Thu Sep 02 2004 - skh@suse.de
|
||
|
- Initial package created with version 2.6.0 (JPackage 1.5)
|