xerces-j2/xerces-j2.spec

508 lines
18 KiB
RPMSpec

#
# spec file for package xerces-j2 (Version 2.8.1)
#
# Copyright (c) 2008 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
Name: xerces-j2
BuildRequires: java2-devel-packages unzip
%define name xerces-j2
%define version 2.8.1
%define cvs_version 2_8_1
%define release 3jpp
%define section free
Version: 2.8.1
Release: 115
Summary: Java XML parser
License: The Apache Software License
Url: http://xml.apache.org/xerces2-j/
Group: Development/Libraries/Java
Source0: Xerces-J-src.%{version}.tar.bz2
Source1: %{name}-version.sh
Source2: %{name}-constants.sh
Source3: Xerces-J-tools.%{version}.tar.bz2
Patch0: %{name}-build.patch
Patch1: java150_build.patch
Patch2: %{name}-%{version}_new_unsupported_dom_methods.patch
Provides: jaxp_parser_impl
PreReq: update-alternatives /bin/ln
# some build requirements removed to enable jpackage bootstrap. this is
# the first package built, and we use the libraries in the tools subdir
# for it.
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 javadoc-impl
Summary: Javadoc for xerces-j2 implementation
Group: Development/Libraries/Java
PreReq: coreutils
%description javadoc-impl
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.
This package contains the javadoc documentation for the Xerces2
implementation.
%package javadoc-apis
Summary: Javadoc for xerces-j2 apis
Group: Development/Libraries/Java
PreReq: coreutils
%description javadoc-apis
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.
This package contains the javadoc documentation for the Xerces2 APIs.
%package javadoc-dom3
Summary: Javadoc for xerces-j2 DOM3.
Group: Development/Libraries/Java
PreReq: coreutils
%description javadoc-dom3
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.
This package contains the javadoc documentation for Xerces2 DOM3.
%package javadoc-xni
Summary: Javadoc for xerces-j2 XNI.
Group: Development/Libraries/Java
PreReq: coreutils
%description javadoc-xni
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.
This package contains the javadoc documentation for Xerces2 XNI.
%package javadoc-other
Summary: Javadoc for other xerces-j2 components.
Group: Development/Libraries/Java
PreReq: coreutils
%description javadoc-other
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.
This package contains the javadoc documentation for other components of
Xerces2.
%package demo
Summary: Demonstration and sample files for xerces-j2.
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
%description demo
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.
This package contains demonstration and sample files for Xerces2.
%package scripts
Summary: Additional utility scripts for xerces-j2.
Group: Development/Libraries/Java
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils >= 1.5
%description scripts
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.
This package contains additional utility scripts for Xerces2.
%package xml-resolver
Summary: Resolver subproject of xml-commons
Group: Development/Libraries/Java
Requires: jpackage-utils >= 1.5
Provides: xml-commons-resolver
%description xml-resolver
xml-commons is focussed on common code and guidelines for xml projects.
The first focus will be to organize and have common packaging for the
various externally-defined standards code relating to XML - things like
the DOM, SAX, and JAXP interfaces.
This package contains the resolver subproject of xml-commons.
%package xml-apis
Summary: APIs subproject of xml-commons
Group: Development/Libraries/Java
Requires: jpackage-utils >= 1.5
Provides: xml-commons-apis
%description xml-apis
xml-commons is focused on common code and guidelines for xml projects.
It's first focus will be to organize and have common packaging for the
various externally-defined standards code relating to XML - things like
the DOM, SAX, and JAXP interfaces. As the xml-commons community forms,
we also hope to serve as a holding area for other common xml-related
utilities and code, and to help promulgate common packaging, testing,
documentation, and other guidelines across all xml.apache.org
subprojects.
This package contains the APIs subproject of xml-commons.
%prep
%setup -q -n xerces-%{cvs_version}
%setup -q -T -a 3 -D -n xerces-%{cvs_version}
%setup -T -D -n xerces-%{cvs_version}
#%patch0 -p1 -b .build
%patch1 -p1
%patch2 -p1
%build
## this uses the ant.jar provided by the xerces packages. Tough luck,
# jpackage bootstrap has to start somewhere. It is not installed,
# though.
sh build.sh jars
sh build.sh javadocs
%install
rm -rf $RPM_BUILD_ROOT
# jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p build/xercesImpl.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
cp -p build/resolver.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}-xml-resolver.jar
cp -p build/xml-apis.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}-xml-apis.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version}
cp -pr build/docs/javadocs/xerces2/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl-%{version}
ln -s %{name}-impl-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-impl
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
cp -pr build/docs/javadocs/api/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis-%{version}
ln -s %{name}-apis-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-apis
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version}
cp -pr build/docs/javadocs/xni/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni-%{version}
ln -s %{name}-xni-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-xni
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-dom-%{version}
cp -pr build/docs/javadocs/xerces2/org/apache/xerces/dom/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-dom-%{version}
ln -s %{name}-dom-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-dom
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version}
cp -pr build/docs/javadocs/other/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-other-%{version}
ln -s %{name}-other-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-other
rm -rf build/docs/javadocs
# scripts
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}-version
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}-constants
# demo
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
cp -p build/xercesSamples.jar \
$RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-samples.jar
cp -pr data $RPM_BUILD_ROOT%{_datadir}/%{name}
# jaxp_parser_impl ghost symlink
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/jaxp_parser_impl.jar
# xml-apis ghost symlink
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/xml-commons-apis.jar
# xml-resolver ghost symlink
ln -s %{_sysconfdir}/alternatives \
$RPM_BUILD_ROOT%{_javadir}/xml-commons-resolver.jar
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc-apis
rm -f %{_javadocdir}/%{name}-apis
ln -s %{name}-apis-%{version} %{_javadocdir}/%{name}-apis
%post javadoc-dom3
rm -f %{_javadocdir}/%{name}-dom3
ln -s %{name}-dom3-%{version} %{_javadocdir}/%{name}-dom3
%post javadoc-impl
rm -f %{_javadocdir}/%{name}-impl
ln -s %{name}-impl-%{version} %{_javadocdir}/%{name}-impl
%post javadoc-other
rm -f %{_javadocdir}/%{name}-other
ln -s %{name}-other-%{version} %{_javadocdir}/%{name}-other
%post javadoc-xni
rm -f %{_javadocdir}/%{name}-xni
ln -s %{name}-xni-%{version} %{_javadocdir}/%{name}-xni
%post
/usr/sbin/update-alternatives --install %{_javadir}/jaxp_parser_impl.jar jaxp_parser_impl %{_javadir}/%{name}.jar 23
/usr/sbin/update-alternatives --auto jaxp_parser_impl
%post xml-apis
/usr/sbin/update-alternatives --install %{_javadir}/xml-commons-apis.jar xml-commons-apis %{_javadir}/%{name}-xml-apis.jar 1
/usr/sbin/update-alternatives --auto xml-commons-apis
%post xml-resolver
/usr/sbin/update-alternatives --install %{_javadir}/xml-commons-resolver.jar xml-commons-resolver %{_javadir}/%{name}-xml-resolver.jar 1
/usr/sbin/update-alternatives --auto xml-commons-resolver
%preun
{
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar
} >/dev/null 2>&1 || :
%preun xml-apis
{
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove xml-commons-apis %{_javadir}/%{name}-xml-apis.jar
} >/dev/null 2>&1 || :
%preun xml-resolver
{
[ $1 = 0 ] || exit 0
/usr/sbin/update-alternatives --remove xml-commons-resolver %{_javadir}/%{name}-xml-commons-resolver.jar
} >/dev/null 2>&1 || :
%files
%defattr(0644,root,root,0755)
%doc LICENSE README ISSUES STATUS TODO
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%ghost %{_javadir}/jaxp_parser_impl.jar
%files xml-apis
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-%{version}-xml-apis.jar
%{_javadir}/%{name}-xml-apis.jar
%ghost %{_javadir}/xml-commons-apis.jar
%files xml-resolver
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-%{version}-xml-resolver.jar
%{_javadir}/%{name}-xml-resolver.jar
%ghost %{_javadir}/xml-commons-resolver.jar
%files javadoc-impl
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-impl-%{version}
%ghost %doc %{_javadocdir}/%{name}-impl
%files javadoc-apis
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-apis-%{version}
%ghost %doc %{_javadocdir}/%{name}-apis
%files javadoc-dom3
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-dom-%{version}
%ghost %doc %{_javadocdir}/%{name}-dom
%files javadoc-other
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-other-%{version}
%ghost %doc %{_javadocdir}/%{name}-other
%files javadoc-xni
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-xni-%{version}
%ghost %doc %{_javadocdir}/%{name}-xni
%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}
%files scripts
%defattr(0755,root,root,0755)
%{_bindir}/*
%changelog
* Wed Jan 23 2008 prusnak@suse.cz
- removed comma between symbols in PreReq
* Wed May 02 2007 dbornkessel@suse.de
- added unzip to BuildRequires
* Tue Jan 23 2007 dbornkessel@suse.de
- added dummy methods for not yet supported new dom methods
* Tue Jan 16 2007 dbornkessel@suse.de
- created sub-packages xml-apis and xml-resolver to avoid Bug #232127
* Wed Nov 15 2006 dbornkessel@suse.de
- Changed
PreReq: /usr/sbin/update-alternatives
to
PreReq: update-alternatives
* Fri Sep 22 2006 dbornkessel@suse.de
- update to 2.8.1
- added source="1.4" target="1.4" to [x]javac & javadoc ant tasks
* Mon Jan 30 2006 dbornkessel@suse.de
- changed update alternatives prios
- corrected update-alternatives name for 'xml-commons-resolver'
* Fri Jan 27 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 24 2006 dbornkessel@suse.de
- added missing jar file (xml-apis & resolver)
- added xml-apis and resolver to alternative system, so they can be
interchanged with xml-commons-apis and commons-resolver
* Wed Jan 18 2006 dbornkessel@suse.de
- Update to version 2.7.1
* Thu Sep 29 2005 dmueller@suse.de
- add norootforbuild
* Thu Sep 16 2004 skh@suse.de
- Fix prerequires
* Thu Sep 02 2004 skh@suse.de
- Initial package created with version 2.6.2 (JPackage 1.5)