packages xerces-j210.spec
      Pages: < 1 >  DOWNLOAD      
Name:          xerces-j210
Version:       2.1.0
Release:       2mamba
Summary:       High performance, fully compliant XML parser
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://xerces.apache.org/
# jsvn export http://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_1_0/ xerces-j2-2.1.0
Source:        xerces-j2-%{version}-src-svn.tar.gz
Patch0:        xerces-j202-jdk5.patch
Patch1:        xerces-j210-no-samples-dom3.patch
License:       Apache Software License 1.1
BuildRequires: apache-ant
BuildRequires: apache-ant-javamail
BuildRequires: apache-ant-jdepend
BuildRequires: apache-ant-nodeps
BuildRequires: coreutils
BuildRequires: java-junit3
BuildRequires: java-xml-stylebook
BuildRequires: jpackage-utils
BuildRequires: xalan-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-resolver
Requires:      xml-commons-apis
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Welcome to the future! Xerces2 is the next generation of high
performance, fully compliant XML parsers in the Apache Xerces family.
This new version of Xerces introduces the Xerces Native Interface (XNI),
a complete framework for building parser components and configurations
that is extremely modular and easy to program.

The Apache Xerces2 parser is the reference implementation of XNI but
other parser components, configurations, and parsers can be written
using the Xerces Native Interface. For complete design and
implementation documents, refer to the XNI Manual.

Xerces 2 is a fully conforming XML Schema processor. For more
information, refer to the XML Schema page.

Xerces 2 also provides a partial implementation of Document Object Model
Level 3 Core, Load and Save and Abstract Schemas [deprecated] Working
Drafts. For more information, refer to the DOM Level 3 Implementation
page.

%package apis-javadoc
Group:         Documentation
Summary:       Javadoc for %{name} apis

%description apis-javadoc
High performance, fully compliant XML parser.

This package contains javadoc for %{name} apis.

%package dom3-javadoc
Group:         Documentation
Summary:       Javadoc for other %{name} components

%description dom3-javadoc
High performance, fully compliant XML parser.

This package contains javadoc for dom3 %{name} components.

%package impl-javadoc
Group:         Documentation
Summary:       Javadoc for %{name} implementation

%description impl-javadoc
High performance, fully compliant XML parser.

This package contains javadoc for %{name} implementation.

%package other-javadoc
Group:         Documentation
Summary:       Javadoc for other %{name} components

%description other-javadoc
High performance, fully compliant XML parser.

This package contains javadoc for other %{name} components.

%package xni-javadoc
Group:         Documentation
Summary:       Javadoc for %{name} xni

%description xni-javadoc
High performance, fully compliant XML parser.

This package contains javadoc for %{name} xni.

%package manual
Group:         Documentation
Summary:       Documents for %{name}

%description manual
High performance, fully compliant XML parser.

This package contains Java XML parser documentation

%package demo
Group:         Applications/Publishing
Summary:       Demo for %{name}
Requires:      %{name} = %{version}-%{release}

%description demo
High performance, fully compliant XML parser.

This package contains demonstrations and samples for %{name}.

%prep

%setup -q -n xerces-j2-%{version}

%patch0 -p1
%patch1

for j in $(find . -name "*.jar"); do
	mv $j $j.no
done

pushd tools
#  ln -sf $(build-classpath ant)
#  ln -sf $(build-classpath ant/ant-nodeps) optional.jar
  ln -sf $(build-classpath junit-3.8.2) junit.jar
  ln -sf $(build-classpath xml-commons-apis) .
  ln -sf $(build-classpath xml-commons-resolver) resolver.jar
  ln -sf $(build-classpath xalan-j2) xalan.jar
  ln -sf $(build-classpath xalan-j2-serializer) .
  ln -sf $(build-classpath xml-stylebook) stylebook-1.0-b2.jar
popd

%build
export CLASSPATH=$(build-classpath junit-3.8.2 xalan-j2 xml-commons-apis \
	xml-commons-resolver xml-stylebook ant/ant-nodeps ant-launcher ant/ant-javamail ant/ant-jdepend):build/xercesImpl.jar:build/xerces.jar
export ANT_OPTS="-Xmx768m -Djava.endorsed.dirs=$(pwd)/tools -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Djar.apis=xmlParserAPIs.jar \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
  clean jars deprecatedjar

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Djar.apis=dtd-xmlParserAPIs.jar \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
  dtdjars

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Djar.apis=xml11-xmlParserAPIs.jar \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
  xml11jars

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Djar.dv=dv-xercesImpl.jar \
  -Dsrc.dir=src \
  -Dbuild.src=build-src \
  -Dbuild.dir=build \
  -Dbuild.dest=build-dest \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
  dvjar

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Dsrc.dir=src \
  -Dbuild.dir=build \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
   jars-dom3

ant  \
  -Dbuild.compiler=modern \
  -Dtools.dir=%{_javadir} \
  -Ddoc.generator.package=tools/stylebook-1.0-b2.jar \
  javadocs docs

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}

install -pm 644 build/xercesImpl.jar %{buildroot}%{_javadir}/xercesImpl210-%{version}.jar
install -pm 644 build/xmlParserAPIs.jar %{buildroot}%{_javadir}/xmlParserAPIs210-%{version}.jar
# deprecated
install -pm 644 build/xerces.jar %{buildroot}%{_javadir}/xerces210-%{version}.jar

install -pm 644 build/dtd-xercesImpl.jar %{buildroot}%{_javadir}/dtd-xercesImpl210-%{version}.jar
install -pm 644 build/dtd-xmlParserAPIs.jar %{buildroot}%{_javadir}/dtd-xmlParserAPIs210-%{version}.jar

install -pm 644 build/dom3-xercesImpl.jar %{buildroot}%{_javadir}/dom3-xercesImpl210-%{version}.jar
install -pm 644 build/dom3-xmlParserAPIs.jar %{buildroot}%{_javadir}/dom3-xmlParserAPIs210-%{version}.jar

install -pm 644 build/dv-xercesImpl.jar %{buildroot}%{_javadir}/dv-xercesImpl210-%{version}.jar

install -pm 644 build/xml11-xmlParserAPIs.jar %{buildroot}%{_javadir}/xml11-xmlParserAPIs210-%{version}.jar
install -pm 644 build/xml11-xercesImpl.jar %{buildroot}%{_javadir}/xml11-xercesImpl210-%{version}.jar

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do 
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/%{name}-apis-%{version}
cp -pr build/docs/javadocs/api/* %{buildroot}%{_javadocdir}/%{name}-apis-%{version}
ln -s %{name}-apis-%{version} %{buildroot}%{_javadocdir}/%{name}-apis

mkdir -p %{buildroot}%{_javadocdir}/%{name}-dom3-%{version}
cp -pr build/docs/javadocs/dom3-api/* %{buildroot}%{_javadocdir}/%{name}-dom3-%{version}
ln -s %{name}-dom3-%{version} %{buildroot}%{_javadocdir}/%{name}-dom3

mkdir -p %{buildroot}%{_javadocdir}/%{name}-impl-%{version}
cp -pr build/docs/javadocs/xerces2/* %{buildroot}%{_javadocdir}/%{name}-impl-%{version}
ln -s %{name}-impl-%{version} %{buildroot}%{_javadocdir}/%{name}-impl

mkdir -p %{buildroot}%{_javadocdir}/%{name}-other-%{version}
cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}-other-%{version}
ln -s %{name}-other-%{version} %{buildroot}%{_javadocdir}/%{name}-other

mkdir -p %{buildroot}%{_javadocdir}/%{name}-xni-%{version}
cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}-xni-%{version}
ln -s %{name}-xni-%{version} %{buildroot}%{_javadocdir}/%{name}-xni

rm -rf build/docs/javadocs

mkdir -p %{buildroot}%{_datadir}/%{name}
cp -p build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
cp -pr data %{buildroot}%{_datadir}/%{name}

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/dom3-xercesImpl210-%{version}.jar
%{_javadir}/dom3-xercesImpl210.jar
%{_javadir}/dom3-xmlParserAPIs210-%{version}.jar
%{_javadir}/dom3-xmlParserAPIs210.jar
%{_javadir}/dtd-xercesImpl210-%{version}.jar
%{_javadir}/dtd-xercesImpl210.jar
%{_javadir}/dtd-xmlParserAPIs210-%{version}.jar
%{_javadir}/dtd-xmlParserAPIs210.jar
%{_javadir}/dv-xercesImpl210-%{version}.jar
%{_javadir}/dv-xercesImpl210.jar
%{_javadir}/xerces210-%{version}.jar
%{_javadir}/xerces210.jar
%{_javadir}/xercesImpl210-%{version}.jar
%{_javadir}/xercesImpl210.jar
%{_javadir}/xmlParserAPIs210-%{version}.jar
%{_javadir}/xmlParserAPIs210.jar
%{_javadir}/xml11-xmlParserAPIs210-%{version}.jar
%{_javadir}/xml11-xmlParserAPIs210.jar
%{_javadir}/xml11-xercesImpl210-%{version}.jar
%{_javadir}/xml11-xercesImpl210.jar
%doc ISSUES LICENSE README STATUS TODO
%doc Readme.html REL-PLAN-SchemaAlpha.html REL-PLAN-SchemaBeta.html
%doc Xerces2.0.2-REL_PLAN.html Xerces2.1-REL_PLAN.html

%files apis-javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-apis-%{version}
%{_javadocdir}/%{name}-apis

%files dom3-javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-dom3-%{version}
%{_javadocdir}/%{name}-dom3

%files impl-javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-impl-%{version}
%{_javadocdir}/%{name}-impl

%files other-javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-other-%{version}
%{_javadocdir}/%{name}-other

%files xni-javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-xni-%{version}
%{_javadocdir}/%{name}-xni

%files manual
%defattr(-,root,root)
%doc build/docs/*

%files demo
%defattr(-,root,root)
%{_datadir}/%{name}

%changelog
* Sat Feb 12 2011 gil <puntogil@...> 2.1.0-2mamba
- rebuilt with OpenJDK support

* Sat Feb 27 2010 gil <puntogil@...> 2.1.0-1mamba
- package created by autospec