2007-01-15 23:42:13 +00:00
|
|
|
#
|
2011-03-14 15:49:30 +00:00
|
|
|
# spec file for package xerces-j2
|
2007-01-15 23:42:13 +00:00
|
|
|
#
|
2018-05-17 20:07:53 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-15 23:42:13 +00:00
|
|
|
#
|
2008-11-17 23:20:42 +00: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-18 21:21:49 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-15 23:42:13 +00:00
|
|
|
#
|
|
|
|
|
2008-02-29 20:29:11 +00:00
|
|
|
|
2018-12-06 16:07:46 +00:00
|
|
|
%global cvs_version 2_12_0
|
|
|
|
%define __requires_exclude system.bundle
|
2014-06-25 09:31:58 +00:00
|
|
|
Name: xerces-j2
|
2018-12-06 16:07:46 +00:00
|
|
|
Version: 2.12.0
|
2013-01-08 13:11:16 +00:00
|
|
|
Release: 0
|
2007-01-15 23:42:13 +00:00
|
|
|
Summary: Java XML parser
|
2018-12-06 16:07:46 +00:00
|
|
|
License: Apache-2.0 AND W3C
|
2007-01-15 23:42:13 +00:00
|
|
|
Group: Development/Libraries/Java
|
2018-12-06 16:07:46 +00:00
|
|
|
URL: http://xerces.apache.org/xerces2-j/
|
2014-06-25 09:31:58 +00:00
|
|
|
Source0: http://www.eu.apache.org/dist/xerces/j/source/Xerces-J-src.%{version}.tar.gz
|
2018-12-06 16:07:46 +00:00
|
|
|
Source1: %{name}-version.sh
|
|
|
|
Source2: %{name}-constants.sh
|
2014-06-25 09:31:58 +00:00
|
|
|
Source3: %{name}-version.1
|
2018-12-06 16:07:46 +00:00
|
|
|
Source4: %{name}-constants.1
|
|
|
|
Source5: http://repo.maven.apache.org/maven2/xerces/xercesImpl/%{version}/xercesImpl-%{version}.pom
|
|
|
|
# Patch the build so that it doesn't try to use bundled xml-commons source
|
|
|
|
# Also remove the use of the special taglets and xjavac task
|
|
|
|
Patch0: %{name}-build.patch
|
|
|
|
Patch1: xerces-2_11_0-jdk7.patch
|
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: apache-parent
|
2016-02-11 15:20:10 +00:00
|
|
|
BuildRequires: dos2unix
|
2018-12-06 16:07:46 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: java-devel
|
2018-11-18 21:21:49 +00:00
|
|
|
BuildRequires: javapackages-local
|
2018-12-06 16:07:46 +00:00
|
|
|
BuildRequires: xalan-j2 >= 2.7.1
|
|
|
|
BuildRequires: xml-commons-apis >= 1.4.01
|
|
|
|
BuildRequires: xml-commons-resolver >= 1.2
|
|
|
|
# Explicit javapackages-tools requires since scripts use
|
|
|
|
# /usr/share/java-utils/java-functions
|
|
|
|
Requires: javapackages-tools
|
|
|
|
Requires: xalan-j2 >= 2.7.1
|
|
|
|
Requires: xml-commons-apis >= 1.4.01
|
|
|
|
Requires: xml-commons-resolver >= 1.2
|
|
|
|
Provides: %{name}-scripts = %{version}-%{release}
|
|
|
|
Provides: jaxp_parser_impl = 1.4
|
|
|
|
Obsoletes: %{name}-scripts < %{version}-%{release}
|
2014-06-25 09:31:58 +00:00
|
|
|
BuildArch: noarch
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%description
|
2018-12-06 16:07:46 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
Xerces2 is a fully conforming XML Schema processor. For more information,
|
|
|
|
refer to the XML Schema page.
|
|
|
|
|
|
|
|
Xerces2 also provides a complete implementation of the Document Object Model
|
|
|
|
Level 3 Core and Load/Save W3C Recommendations and provides a complete
|
|
|
|
implementation of the XML Inclusions (XInclude) W3C Recommendation. It also
|
|
|
|
provides support for OASIS XML Catalogs v1.1.
|
|
|
|
|
|
|
|
Xerces2 is able to parse documents written according to the XML 1.1
|
|
|
|
Recommendation, except that it does not yet provide an option to enable
|
|
|
|
normalization checking as described in section 2.13 of this specification. It
|
|
|
|
also handles name spaces according to the XML Namespaces 1.1 Recommendation,
|
|
|
|
and will correctly serialize XML 1.1 documents if the DOM level 3 load/save
|
|
|
|
APIs are in use.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadocs for %{name}
|
|
|
|
Group: Development/Libraries/Java
|
2007-01-15 23:42:13 +00:00
|
|
|
|
2018-12-06 16:07:46 +00:00
|
|
|
%description javadoc
|
|
|
|
This package contains the API documentation for %{name}.
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%package demo
|
2018-12-06 16:07:46 +00:00
|
|
|
Summary: Demonstrations and samples for %{name}
|
2007-01-15 23:42:13 +00:00
|
|
|
Group: Development/Libraries/Java
|
2018-12-06 16:07:46 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%description demo
|
2018-12-06 16:07:46 +00:00
|
|
|
%{summary}.
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n xerces-%{cvs_version}
|
2018-12-06 16:07:46 +00:00
|
|
|
find -name '*.class' -exec rm -f '{}' \;
|
|
|
|
find -name '*.jar' -exec rm -f '{}' \;
|
2016-02-11 15:20:10 +00:00
|
|
|
find -type f -print |xargs -i dos2unix {}
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%build
|
2018-12-06 16:07:46 +00:00
|
|
|
mkdir -p tools
|
|
|
|
pushd tools
|
|
|
|
ln -sf $(build-classpath xalan-j2-serializer) serializer.jar
|
|
|
|
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
|
|
|
|
ln -sf $(build-classpath xml-commons-resolver) resolver.jar
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Build everything
|
|
|
|
export ANT_OPTS="-Xmx256m -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
|
|
|
|
ant -Djavac.source=1.6 -Djavac.target=1.6 \
|
|
|
|
-Dbuild.compiler=modern \
|
|
|
|
clean jars javadocs
|
2007-01-15 23:42:13 +00:00
|
|
|
|
|
|
|
%install
|
2018-12-06 16:07:46 +00:00
|
|
|
# jar
|
|
|
|
install -dm 755 %{buildroot}%{_javadir}
|
|
|
|
install -pm 644 build/xercesImpl.jar %{buildroot}%{_javadir}/%{name}.jar
|
|
|
|
(cd %{buildroot}%{_javadir} && ln -s %{name}.jar jaxp_parser_impl.jar)
|
|
|
|
|
|
|
|
# pom
|
|
|
|
install -dm 755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -pm 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/%{name}.pom
|
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar -a xerces:xerces,xerces:xmlParserAPIs,apache:xerces-j2
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}/impl
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}/xs
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}/xni
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}/other
|
|
|
|
|
|
|
|
cp -pr build/docs/javadocs/xerces2/* %{buildroot}%{_javadocdir}/%{name}/impl
|
|
|
|
cp -pr build/docs/javadocs/api/* %{buildroot}%{_javadocdir}/%{name}/xs
|
|
|
|
cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}/xni
|
|
|
|
cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}/other
|
|
|
|
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
2007-01-15 23:42:13 +00:00
|
|
|
# scripts
|
2018-12-06 16:07:46 +00:00
|
|
|
install -pD -m755 -T %{SOURCE1} %{buildroot}%{_bindir}/%{name}-version
|
|
|
|
install -pD -m755 -T %{SOURCE2} %{buildroot}%{_bindir}/%{name}-constants
|
|
|
|
|
|
|
|
# manual pages
|
2014-06-25 09:31:58 +00:00
|
|
|
install -d -m 755 %{buildroot}%{_mandir}/man1
|
|
|
|
install -p -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1
|
2018-12-06 16:07:46 +00:00
|
|
|
install -p -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1
|
|
|
|
|
2007-01-15 23:42:13 +00:00
|
|
|
# demo
|
2018-12-06 16:07:46 +00:00
|
|
|
install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
|
2014-06-25 09:31:58 +00:00
|
|
|
cp -pr data %{buildroot}%{_datadir}/%{name}
|
2014-07-21 09:59:16 +00:00
|
|
|
|
2007-01-15 23:42:13 +00:00
|
|
|
%post
|
2018-12-06 16:07:46 +00:00
|
|
|
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar >/dev/null 2>&1 || :
|
|
|
|
# it deletes the link, set it up again
|
|
|
|
ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar
|
2007-01-16 19:18:40 +00:00
|
|
|
|
2007-01-15 23:42:13 +00:00
|
|
|
%files
|
2018-12-06 16:07:46 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc NOTICE README
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_javadir}/*
|
|
|
|
%{_mandir}/*/*
|
|
|
|
%{_mavenpomdir}/*
|
|
|
|
%if %{defined _maven_repository}
|
|
|
|
%{_mavendepmapfragdir}/%{name}
|
|
|
|
%else
|
|
|
|
%{_datadir}/maven-metadata/%{name}.xml*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
2007-01-16 19:18:40 +00:00
|
|
|
|
2007-01-15 23:42:13 +00:00
|
|
|
%files demo
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
2007-05-03 21:10:21 +00:00
|
|
|
%changelog
|