137 lines
5.4 KiB
RPMSpec
137 lines
5.4 KiB
RPMSpec
Name: xerces-j2
|
|
Version: 2.11.0
|
|
Release: 36
|
|
Summary: Java XML parser
|
|
License: ASL 2.0 and W3C
|
|
URL: http://xerces.apache.org/xerces2-j/
|
|
|
|
Source0: http://archive.apache.org/dist/xerces/j/Xerces-J-src.%{version}.tar.gz
|
|
Source1: %{name}-version.sh
|
|
Source2: %{name}-constants.sh
|
|
Source11: %{name}-version.1
|
|
Source12: %{name}-constants.1
|
|
Source3: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_11_0/tools/src/XJavac.java
|
|
Source5: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_11_0/tools/src/ExperimentalTaglet.java
|
|
Source6: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_11_0/tools/src/InternalTaglet.java
|
|
Source7: %{name}-pom.xml
|
|
|
|
Patch0: %{name}-build.patch
|
|
Patch1: %{name}-manifest.patch
|
|
Patch2: xerces-j2-CVE-2013-4002.patch
|
|
|
|
BuildRequires: javapackages-local ant apache-parent xalan-j2 >= 2.7.1
|
|
BuildRequires: xml-commons-apis >= 1.4.01 xml-commons-resolver >= 1.2
|
|
|
|
Requires: xalan-j2 >= 2.7.1 xml-commons-resolver >= 1.2
|
|
Requires: xml-commons-apis >= 1.4.01 javapackages-tools
|
|
|
|
Provides: jaxp_parser_impl = 1.4
|
|
Provides: %{name}-scripts = %{version}-%{release}
|
|
|
|
Obsoletes: %{name}-scripts < 2.11.0-6
|
|
Obsoletes: %{name}-javadoc-apis < %{version}-%{release}
|
|
Obsoletes: %{name}-manual < %{version}-%{release}
|
|
|
|
Provides: %{name}-demo = %{version}-%{release}
|
|
Obsoletes: %{name}-demo < %{version}-%{release}
|
|
|
|
BuildArch: noarch
|
|
|
|
%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 help
|
|
Summary: Documents for %{name}
|
|
Buildarch: noarch
|
|
Requires: man info
|
|
Provides: %{name}-javadoc = %{version}-%{release}
|
|
Obsoletes: %{name}-javadoc < %{version}-%{release}
|
|
Obsoletes: %{name}-javadoc-impl < %{version}-%{release}
|
|
Obsoletes: %{name}-javadoc-xs < %{version}-%{release}
|
|
Obsoletes: %{name}-javadoc-xni < %{version}-%{release}
|
|
Obsoletes: %{name}-javadoc-other < %{version}-%{release}
|
|
|
|
%description help
|
|
Man pages and other related documents for %{name}.
|
|
|
|
%prep
|
|
%autosetup -p0 -n xerces-2_11_0
|
|
install -d tools/org/apache/xerces/util
|
|
install -d tools/bin
|
|
cp -a %{SOURCE3} %{SOURCE5} %{SOURCE6} tools/org/apache/xerces/util
|
|
find -name '*.class' -exec rm -f '{}' \;
|
|
find -name '*.jar' -exec rm -f '{}' \;
|
|
sed -i 's/\r//' LICENSE README NOTICE
|
|
%mvn_alias : xerces:xerces xerces:xmlParserAPIs apache:%{name}
|
|
%mvn_file : %{name} jaxp_parser_impl
|
|
|
|
%build
|
|
pushd tools
|
|
javac -classpath $(build-classpath ant) org/apache/xerces/util/XJavac.java
|
|
jar cf bin/xjavac.jar org/apache/xerces/util/XJavac.class
|
|
javac -classpath /usr/lib/jvm/java/lib/tools.jar org/apache/xerces/util/*Taglet.java
|
|
jar cf bin/xerces2taglets.jar org/apache/xerces/util/*Taglet.class
|
|
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
|
|
ln -sf $(build-classpath %{name}) x.jar
|
|
popd
|
|
export ANT_OPTS="-Xmx256m -Djava.endorsed.dirs=$(pwd)/tools -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
|
|
ant -Djavac.source=1.5 -Djavac.target=1.5 -Dbuild.compiler=modern clean jars javadocs
|
|
%mvn_artifact %{SOURCE7} build/xercesImpl.jar
|
|
|
|
%install
|
|
%mvn_install
|
|
|
|
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}/impl
|
|
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}/xs
|
|
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}/xni
|
|
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}/other
|
|
cp -pr build/docs/javadocs/xerces2/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/impl
|
|
cp -pr build/docs/javadocs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/xs
|
|
cp -pr build/docs/javadocs/xni/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/xni
|
|
cp -pr build/docs/javadocs/other/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}/other
|
|
install -pD -m755 -T %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}-version
|
|
install -pD -m755 -T %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/%{name}-constants
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -p -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -pD -T build/xercesSamples.jar $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-samples.jar
|
|
cp -pr data $RPM_BUILD_ROOT%{_datadir}/%{name}
|
|
|
|
%post
|
|
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar >/dev/null 2>&1 || :
|
|
ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar
|
|
|
|
%files -f .mfiles
|
|
%doc LICENSE
|
|
%{_bindir}/*
|
|
%{_datadir}/%{name}
|
|
|
|
%files help
|
|
%doc NOTICE README
|
|
%{_javadocdir}/%{name}
|
|
%{_mandir}/*/*
|
|
|
|
%changelog
|
|
* Mon Feb 17 2020 zhouyihang<zhouyihang1@huawei.com> - 2.11.0-36
|
|
- Package init
|