Merge with latest version from jpp.

Undo ExcludeArch since eclipse available for all arch-es.
Remove jars from sources for new upstream version.
Purge unused patches from previous release.
Conditional native compilation with GCJ.
Use NVR macros wherever possible.
This commit is contained in:
Vivek Lakshmanan 2006-07-20 05:43:53 +00:00
parent 0ef7e69110
commit e0862eeae3
3 changed files with 173 additions and 63 deletions

View File

@ -1,5 +1,2 @@
xalan-j_2_6_0-src-RHsemiCLEAN.tar.bz2
xalan-j_2_6_0
i386
*.src.rpm
xalan-j2-notarget.patch
xalan-j_2_7_0-src-RHsemiCLEAN.tar.gz

View File

@ -1,2 +1,2 @@
ed5d8bdfcac79989486ee418abe51f80 xalan-j_2_6_0-src-RHsemiCLEAN.tar.bz2
3461365d8636e454f73e14884c3f8692 xalan-j2-notarget.patch
a03a7531cac901e9aa185b1dfc714126 xalan-j_2_7_0-src-RHsemiCLEAN.tar.gz

View File

@ -1,37 +1,78 @@
# 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.
#
%define _with_gcj_support 1
%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
%define section free
%define version 2.6.0
%define cvs_version 2_6_0
%define cvs_version 2_7_0
Name: xalan-j2
Version: %{version}
Release: 3jpp_10fc
Version: 2.7.0
Release: 3jpp_1fc
Epoch: 0
Summary: Java XSLT processor
License: Apache Software License
Source0: xalan-j_%{cvs_version}-src-RHsemiCLEAN.tar.bz2
#Source0: http://www.apache.org/dist/xml/xalan-j/xalan-j_2_7_0-src.tar.gz
Source0: xalan-j_%{cvs_version}-src-RHsemiCLEAN.tar.gz
Patch0: %{name}-noxsltcdeps.patch
Patch1: %{name}-manifest.patch
Patch2: %{name}-crosslink.patch
Patch4: %{name}-bz152255.patch
Patch5: %{name}-javadoc.patch
Patch6: %{name}-notarget.patch
URL: http://xml.apache.org/xalan-j/
URL: http://xalan.apache.org/
Group: Text Processing/Markup/XML
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%if ! %{gcj_support}
BuildArch: noarch
%endif
Provides: jaxp_transform_impl
Requires: jaxp_parser_impl, /usr/sbin/update-alternatives
BuildRequires: ant, xml-commons-apis, bcel, servletapi5, jlex, java_cup, sed
BuildRequires: jpackage-utils >= 0:1.5, java-devel, xerces-j2
# RHEL3 and FC2
Obsoletes: xalan-j <= 0:2.4.1
# libgcj aot-compiled native libraries
BuildRequires: java-gcj-compat-devel >= 1.0.31
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
Requires: jaxp_parser_impl
Requires: /usr/sbin/update-alternatives
BuildRequires: jpackage-utils >= 0:1.6
BuildRequires: java-devel
BuildRequires: ant
BuildRequires: bcel
BuildRequires: jlex
BuildRequires: java_cup
BuildRequires: regexp
BuildRequires: sed
BuildRequires: servletapi5
BuildRequires: xerces-j2 >= 0:2.7.1
BuildRequires: xml-commons-apis >= 0:1.3
# excluded due to eclipse
ExcludeArch: s390 s390x ppc64
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
Xalan is an XSLT processor for transforming XML documents into HTML,
@ -43,11 +84,17 @@ in other program.
%package xsltc
Summary: XSLT compiler
Group: Text Processing/Markup/XML
Requires: java_cup, bcel, jlex, regexp, jaxp_parser_impl
#Requires: /usr/sbin/update-alternatives
#Provides: jaxp_transform_impl
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
Requires: java_cup
Requires: bcel
Requires: jlex
Requires: regexp
Requires: jaxp_parser_impl
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description xsltc
The XSLT Compiler is a Java-based tool for compiling XSLT stylesheets into
@ -64,7 +111,6 @@ Documentation for %{name}.
Summary: Javadoc for %{name}
Group: Development/Documentation
BuildRequires: java-javadoc
Prereq: coreutils
%description javadoc
Javadoc for %{name}.
@ -72,10 +118,14 @@ Javadoc for %{name}.
%package demo
Summary: Demo for %{name}
Group: Text Processing/Markup/XML
Requires: %{name} = %{epoch}:%{version}-%{release}, servletapi5
BuildRequires: servletapi5
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
Requires: %{name} = %{epoch}:%{version}-%{release}, servlet
BuildRequires: servlet
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description demo
Demonstrations and samples for %{name}.
@ -83,21 +133,32 @@ Demonstrations and samples for %{name}.
%prep
%setup -q -n xalan-j_%{cvs_version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch4 -p1
%patch5 -p1
%patch6 -p0
#%patch1 -p0
#%patch2 -p0
# Remove all binary libs, except ones needed to build docs and N/A elsewhere.
find . -name "*.jar" \
! -name xalan2jdoc.jar \
! -name stylebook-1.0-b3_xalan-2.jar \
-exec rm -f {} \;
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
# FIXME who knows where the sources are? xalan-j1 ?
mv tools/xalan2jdoc.jar.no tools/xalan2jdoc.jar
mv tools/xalan2jtaglet.jar.no tools/xalan2jtaglet.jar
%build
if [ ! -e "$JAVA_HOME" ] ; then export JAVA_HOME="%{java_home}" ; fi
export CLASSPATH=$(build-classpath servletapi5 java_cup java_cup-runtime jlex \
bcel xerces-j2)
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 xml-stylebook) stylebook-1.0-b3_xalan-2.jar
popd
export CLASSPATH=$(build-classpath servletapi5)
ant \
-Djava.awt.headless=true \
@ -121,6 +182,8 @@ 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
@ -144,21 +207,25 @@ cp -pr samples $RPM_BUILD_ROOT%{_datadir}/%{name}
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/jaxp_transform_impl.jar
aot-compile-rpm --exclude %{_datadir}/%{name}/%{name}-servlet.war
%if %{gcj_support}
%{_bindir}/aot-compile-rpm --exclude %{_datadir}/%{name}/%{name}-servlet.war
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%pre
rm -f %{_javadir}/%{name}.jar
%post
update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
jaxp_transform_impl %{_javadir}/%{name}.jar 30
%{_bindir}/rebuild-gcj-db
%postun
%{_bindir}/rebuild-gcj-db
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%preun
{
@ -166,43 +233,76 @@ update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
update-alternatives --remove jaxp_transform_impl %{_javadir}/%{name}.jar
} >/dev/null 2>&1 || :
%post xsltc
#%post xsltc
#update-alternatives --install %{_javadir}/jaxp_transform_impl.jar \
# jaxp_transform_impl %{_javadir}/xsltc.jar 10
%{_bindir}/rebuild-gcj-db
%preun xsltc
#%preun xsltc
#{
# [ $1 = 0 ] || exit 0
# update-alternatives --remove jaxp_transform_impl %{_javadir}/xsltc.jar
#} >/dev/null 2>&1 || :
%{_bindir}/rebuild-gcj-db
%post demo
%{_bindir}/rebuild-gcj-db
%postun demo
%{_bindir}/rebuild-gcj-db
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%post xsltc
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun xsltc
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%post demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%postun demo
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
%{_bindir}/rebuild-gcj-db
fi
%endif
%files
%defattr(0644,root,root,0755)
%doc KEYS LICENSE NOTICE
%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
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.*
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-serializer-%{version}.jar.*
%endif
%files xsltc
%defattr(0644,root,root,0755)
%{_javadir}/xsltc-%{version}.jar
%{_javadir}/xsltc.jar
#%ghost %{_javadir}/jaxp_transform_impl.jar
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/xsltc-%{version}.jar.*
%endif
%files manual
%defattr(0644,root,root,0755)
@ -216,9 +316,20 @@ ln -s %{name}-%{version} %{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}
%if %{gcj_support}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-samples.jar.*
%endif
%changelog
* Wed Jul 19 2006 Vivek Lakshmanan <vivekl@redhat.com> - 0:2.7.0-3jpp_1fc
- Merge with latest version from jpp.
- Undo ExcludeArch since eclipse available for all arch-es.
- Remove jars from sources for new upstream version.
- Purge unused patches from previous release.
- Conditional native compilation with GCJ.
- Use NVR macros wherever possible.
* Wed Mar 8 2006 Rafael Schloming <rafaels@redhat.com> - 0:2.6.0-3jpp_10fc
- excluded s390[x] and ppc64 due to eclipse
@ -424,3 +535,5 @@ ln -s %{name}-%{version} %{_javadocdir}/%{name}
* Wed Aug 08 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.2.D6-1mdk
- first Mandrake release