2009-06-04 04:31:56 +02:00
|
|
|
#
|
2011-09-23 10:24:26 +02:00
|
|
|
# spec file for package dom4j
|
2009-06-04 04:31:56 +02:00
|
|
|
#
|
2023-07-24 21:39:12 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2009-06-04 04:31:56 +02: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.
|
|
|
|
|
2019-01-25 13:20:07 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-06-04 04:31:56 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: dom4j
|
|
|
|
Version: 1.6.1
|
2013-08-28 15:59:50 +02:00
|
|
|
Release: 0
|
2009-06-04 04:31:56 +02:00
|
|
|
Summary: JarJar of dom4j for JBoss
|
2012-03-27 11:19:49 +02:00
|
|
|
License: Apache-1.1
|
2009-06-04 04:31:56 +02:00
|
|
|
Group: Development/Libraries/Java
|
2022-03-17 16:41:23 +01:00
|
|
|
URL: https://www.dom4j.org/
|
2009-06-04 04:31:56 +02:00
|
|
|
#Source0: dom4j-1.6.1.tar.gz
|
|
|
|
# Debian sources don't need a proprietary msv for build, so that's why I used them
|
|
|
|
# svn co svn://svn.debian.org/svn/pkg-java/trunk/dom4j
|
|
|
|
# rm dom4j/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html
|
|
|
|
# rm dom4j/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html
|
|
|
|
# #bnc501764
|
|
|
|
# rm dom4j/lib/tools/clover.license
|
|
|
|
# tar --exclude-vcs -cjf dom4j-1.6.1-debian.tar.bz2 dom4j/
|
|
|
|
Source0: dom4j-1.6.1-debian.tar.bz2
|
|
|
|
Source1: dom4j_rundemo.sh
|
2022-03-28 15:51:24 +02:00
|
|
|
Source2: https://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom
|
2009-06-04 04:31:56 +02:00
|
|
|
Patch0: dom4j-1.6.1-bug1618750.patch
|
2017-09-08 07:51:51 +02:00
|
|
|
Patch1: dom4j-sourcetarget.patch
|
2018-07-10 14:44:23 +02:00
|
|
|
Patch2: dom4j-javadoc.patch
|
2018-09-18 12:59:09 +02:00
|
|
|
# PATCH-FIX-UPSTREAM bsc#1105443 CVE-2018-1000632
|
|
|
|
Patch3: dom4j-CVE-2018-1000632.patch
|
2019-01-25 13:20:07 +01:00
|
|
|
# PATCH-FIX-OPENSUSE bsc#1123158 Don't disable STAX and datatypes
|
|
|
|
Patch4: dom4j-enable-stax-datatypes.patch
|
2020-04-28 07:31:12 +02:00
|
|
|
# PATCH-FIX-UPSTREAM bsc#1169760 CVE-2020-10683 XML Externl Entity vulnerability in default SAX parser
|
|
|
|
Patch5: dom4j-CVE-2020-10683.patch
|
2009-06-04 04:31:56 +02:00
|
|
|
BuildRequires: ant >= 1.6.5
|
2013-08-28 15:59:50 +02:00
|
|
|
BuildRequires: ant-apache-resolver
|
2009-06-04 04:31:56 +02:00
|
|
|
BuildRequires: ant-junit
|
2013-08-28 15:59:50 +02:00
|
|
|
BuildRequires: bea-stax
|
2018-07-10 14:44:23 +02:00
|
|
|
BuildRequires: fdupes
|
2022-03-30 11:56:28 +02:00
|
|
|
BuildRequires: glassfish-jaxb-api
|
2009-06-04 04:31:56 +02:00
|
|
|
BuildRequires: isorelax
|
2017-09-11 13:54:51 +02:00
|
|
|
BuildRequires: java-devel >= 1.6
|
2017-05-19 11:14:41 +02:00
|
|
|
# Needed for maven conversions
|
|
|
|
BuildRequires: javapackages-local
|
2013-09-09 13:52:40 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2009-06-04 04:31:56 +02:00
|
|
|
BuildRequires: jaxen-bootstrap >= 1.1
|
2013-08-28 15:59:50 +02:00
|
|
|
BuildRequires: junit
|
|
|
|
BuildRequires: junitperf
|
2009-06-04 04:31:56 +02:00
|
|
|
BuildRequires: relaxngDatatype
|
|
|
|
BuildRequires: stax_1_0_api
|
|
|
|
BuildRequires: ws-jaxme
|
|
|
|
BuildRequires: xalan-j2 >= 2.7
|
|
|
|
BuildRequires: xerces-j2
|
|
|
|
BuildRequires: xpp2
|
|
|
|
BuildRequires: xpp3
|
2013-08-28 15:59:50 +02:00
|
|
|
Requires: bea-stax
|
2022-03-30 11:56:28 +02:00
|
|
|
Requires: glassfish-jaxb-api
|
2009-06-04 04:31:56 +02:00
|
|
|
Requires: isorelax
|
2017-09-08 07:51:51 +02:00
|
|
|
Requires: java >= 1.6.0
|
2009-06-04 04:31:56 +02:00
|
|
|
Requires: jaxen >= 1.1
|
2013-08-28 15:59:50 +02:00
|
|
|
Requires: relaxngDatatype
|
2009-06-04 04:31:56 +02:00
|
|
|
Requires: stax_1_0_api
|
|
|
|
Requires: ws-jaxme
|
|
|
|
Requires: xalan-j2
|
2013-08-28 15:59:50 +02:00
|
|
|
Requires: xerces-j2
|
|
|
|
Requires: xpp2
|
|
|
|
Requires: xpp3
|
2009-06-04 04:31:56 +02:00
|
|
|
#Requires: jaxp = 1.2
|
2013-09-09 13:52:40 +02:00
|
|
|
Requires(post): javapackages-tools
|
2022-03-17 06:11:39 +01:00
|
|
|
Requires(postun):javapackages-tools
|
2014-07-08 12:43:45 +02:00
|
|
|
BuildArch: noarch
|
2009-06-04 04:31:56 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
|
|
|
|
Java using the Java Collections Framework. dom4j allows you to read,
|
|
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
|
|
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
|
|
|
|
|
|
|
|
%package demo
|
|
|
|
Summary: XML, XPath and XSLT library for Java
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description demo
|
|
|
|
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
|
|
|
|
Java using the Java Collections Framework. dom4j allows you to read,
|
|
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
|
|
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
|
|
|
|
|
|
|
|
%package manual
|
|
|
|
Summary: JarJar of dom4j for JBoss
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description manual
|
2013-08-28 15:59:50 +02:00
|
|
|
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
|
|
|
|
Java using the Java Collections Framework. dom4j allows you to read,
|
|
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
|
|
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
|
2009-06-04 04:31:56 +02:00
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: XML, XPath and XSLT library for Java
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
|
|
|
|
Java using the Java Collections Framework. dom4j allows you to read,
|
|
|
|
write, navigate, create and modify XML documents. dom4j integrates with
|
|
|
|
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}
|
|
|
|
# replace run.sh
|
|
|
|
cp %{SOURCE1} run.sh
|
2022-03-17 16:41:23 +01:00
|
|
|
cp %{SOURCE2} pom.xml
|
|
|
|
%pom_add_dep javax.xml.bind:jaxb-api pom.xml "<optional>true</optional>"
|
2022-03-30 11:56:28 +02:00
|
|
|
|
2009-06-04 04:31:56 +02:00
|
|
|
rm -f src/test/org/dom4j/xpath/MatrixConcatTest.java
|
|
|
|
# won't succeed in headless environment
|
|
|
|
rm src/test/org/dom4j/bean/BeansTest.java
|
|
|
|
# FIXME Bug in Xalan 2.6 -- reactivate with Xalan 2.7
|
|
|
|
#rm src/test/org/dom4j/XPathExamplesTest.java
|
|
|
|
# fix for deleted jars
|
|
|
|
sed -i -e '/unjar/d' -e 's|,cookbook/\*\*,|,|' build.xml
|
|
|
|
# FIXME: (yyang): failed in JDK6
|
|
|
|
rm -f src/test/org/dom4j/ThreadingTest.java
|
|
|
|
# FIXME: (yyang): failed in JDK6, maybe failed to load russArticle.xml because it's russian encoding
|
|
|
|
rm -f src/test/org/dom4j/io/StaxTest.java
|
|
|
|
%patch0 -p1 -b .bug1618750
|
2017-09-08 07:51:51 +02:00
|
|
|
%patch1 -p1 -b .sourcetarget
|
2018-07-10 14:44:23 +02:00
|
|
|
%patch2 -p1 -b .javadoc
|
2018-09-18 12:59:09 +02:00
|
|
|
%patch3 -p1
|
2019-01-25 13:20:07 +01:00
|
|
|
%patch4 -p1
|
2020-04-28 07:31:12 +02:00
|
|
|
%patch5 -p1
|
2009-06-04 04:31:56 +02:00
|
|
|
perl -pi -e 's/\r//g' LICENSE.txt docs/clover/*.css docs/style/*.css docs/xref/*.css docs/xref-test/*.css src/doc/style/*.css docs/benchmarks/xpath/*.java
|
2013-08-28 15:59:50 +02:00
|
|
|
|
2009-06-04 04:31:56 +02:00
|
|
|
pushd lib
|
|
|
|
ln -sf $(build-classpath xpp2)
|
|
|
|
ln -sf $(build-classpath relaxngDatatype)
|
2014-07-08 12:43:45 +02:00
|
|
|
ln -sf $(build-classpath jaxme/jaxmeapi)
|
|
|
|
#ln -sf $(build-classpath msv-xsdlib)
|
|
|
|
#ln -sf $(build-classpath msv-msv)
|
|
|
|
ln -sf $(build-classpath jaxen)
|
|
|
|
ln -sf $(build-classpath bea-stax-api)
|
2009-06-04 04:31:56 +02:00
|
|
|
pushd test
|
2014-07-08 12:43:45 +02:00
|
|
|
ln -sf $(build-classpath bea-stax-ri)
|
|
|
|
ln -sf $(build-classpath junitperf)
|
|
|
|
ln -sf $(build-classpath junit)
|
2009-06-04 04:31:56 +02:00
|
|
|
popd
|
2014-07-08 12:43:45 +02:00
|
|
|
ln -sf $(build-classpath xpp3)
|
2009-06-04 04:31:56 +02:00
|
|
|
pushd tools
|
2014-07-08 12:43:45 +02:00
|
|
|
ln -sf $(build-classpath jaxme/jaxmexs)
|
|
|
|
ln -sf $(build-classpath xalan-j2)
|
|
|
|
ln -sf $(build-classpath xalan-j2-serializer)
|
|
|
|
ln -sf $(build-classpath jaxme/jaxmejs)
|
|
|
|
ln -sf $(build-classpath isorelax)
|
|
|
|
ln -sf $(build-classpath jaxme/jaxme2)
|
|
|
|
ln -sf $(build-classpath xerces-j2)
|
2009-06-04 04:31:56 +02:00
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
%build
|
2022-03-17 16:41:23 +01:00
|
|
|
export CLASSPATH=$(build-classpath \
|
|
|
|
glassfish-jaxb-api \
|
|
|
|
jaxen relaxngDatatype xpp3 xpp2)
|
2009-06-04 04:31:56 +02:00
|
|
|
export OPT_JAR_LIST="junit ant/ant-junit"
|
2017-09-11 13:54:51 +02:00
|
|
|
rm -rf src/java/org/dom4j/datatype
|
2009-06-04 04:31:56 +02:00
|
|
|
ant package release-javadoc
|
|
|
|
|
|
|
|
%install
|
|
|
|
# jars
|
2014-07-08 12:43:45 +02:00
|
|
|
install -d -m 755 %{buildroot}%{_javadir}
|
|
|
|
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
|
2022-03-28 15:51:24 +02:00
|
|
|
cp -p build/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2013-08-28 15:59:50 +02:00
|
|
|
|
|
|
|
mkdir -p %{buildroot}/%{_mavenpomdir}
|
2022-03-17 16:41:23 +01:00
|
|
|
install -m 644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
|
2022-03-28 15:51:24 +02:00
|
|
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "org.dom4j:dom4j"
|
2013-08-28 15:59:50 +02:00
|
|
|
|
2009-06-04 04:31:56 +02:00
|
|
|
# javadoc
|
2014-07-08 12:43:45 +02:00
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -pr build/doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
2009-06-04 04:31:56 +02:00
|
|
|
# manual
|
2014-07-08 12:43:45 +02:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}
|
2009-06-04 04:31:56 +02:00
|
|
|
rm -rf docs/apidocs
|
2014-07-08 12:43:45 +02:00
|
|
|
cp -pr docs/* %{buildroot}%{_docdir}/%{name}-%{version}
|
2009-06-04 04:31:56 +02:00
|
|
|
# demo
|
2014-07-08 12:43:45 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/classes/org/dom4j
|
|
|
|
cp -pr xml %{buildroot}%{_datadir}/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}/src
|
|
|
|
cp -pr src/samples %{buildroot}%{_datadir}/%{name}/src
|
2018-09-18 12:59:09 +02:00
|
|
|
#cp -pr build/classes/org/dom4j/samples $RPM_BUILD_ROOT%%{_datadir}/%%{name}/classes/org/dom4j
|
2014-07-08 12:43:45 +02:00
|
|
|
install -m 0755 run.sh %{buildroot}%{_datadir}/%{name}
|
2018-07-10 14:44:23 +02:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%fdupes -s %{buildroot}%{_docdir}/%{name}-%{version}
|
|
|
|
%fdupes -s %{buildroot}%{_datadir}/%{name}
|
2009-06-04 04:31:56 +02:00
|
|
|
|
2022-03-28 15:51:24 +02:00
|
|
|
%files -f .mfiles
|
2020-04-28 07:31:12 +02:00
|
|
|
%license LICENSE.txt
|
2009-06-04 04:31:56 +02:00
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files manual
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_docdir}/%{name}-%{version}
|
|
|
|
|
|
|
|
%files demo
|
|
|
|
%defattr(-,root,root,0755)
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
|
|
|
%changelog
|