2008-03-26 16:16:05 +01:00
|
|
|
|
#
|
2009-06-05 23:12:40 +02:00
|
|
|
|
# spec file for package jdom (Version 1.1)
|
2008-03-26 16:16:05 +01:00
|
|
|
|
#
|
2009-06-05 23:12:40 +02:00
|
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-03-26 16:16:05 +01:00
|
|
|
|
#
|
2008-11-21 17:12:46 +01: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.
|
|
|
|
|
|
2008-03-26 16:16:05 +01:00
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
|
|
%define xom_version 1.2b1
|
|
|
|
|
%define xom_suffix ""
|
|
|
|
|
%define xom_dir %{_builddir}/%{name}-%{jdom_version}/XOM
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%define xom_included_jaxen_archive jaxen-1.1-src.zip
|
|
|
|
|
%define jdom_version 1.1
|
2008-03-26 16:16:05 +01:00
|
|
|
|
%define jdom_suffix ""
|
|
|
|
|
%define dom4j_version 1.6.1
|
|
|
|
|
%define dom4j_suffix ""
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%define dom4j_dir %{_builddir}/%{name}-%{jdom_version}/dom4j
|
2008-03-26 16:16:05 +01:00
|
|
|
|
%define saxpath_version 1.0
|
|
|
|
|
%define saxpath_suffix -FCS
|
|
|
|
|
%define saxpath_dir %{_builddir}/%{name}-%{jdom_version}/saxpath-%{saxpath_version}%{saxpath_suffix}
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%define jaxen_version 1.1.1
|
2008-03-26 16:16:05 +01:00
|
|
|
|
%define jaxen_suffix ""
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%define jaxen_dir %{_builddir}/%{name}-%{jdom_version}/jaxen-%{jaxen_version}
|
2008-03-26 16:16:05 +01:00
|
|
|
|
%define jdom_dir %{_builddir}/%{name}-%{jdom_version}/%{name}-%{jdom_version}
|
|
|
|
|
%define stage1_build_dir %{_builddir}/build
|
2011-03-18 10:02:18 +01:00
|
|
|
|
|
|
|
|
|
Name: jdom
|
2008-03-26 16:16:05 +01:00
|
|
|
|
License: The Apache Software License
|
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
AutoReqProv: on
|
2009-06-05 23:12:40 +02:00
|
|
|
|
Version: 1.1
|
|
|
|
|
Release: 3
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Summary: JDOM is a Java Representation of an XML Document
|
|
|
|
|
Url: http://www.jdom.org
|
|
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
|
|
|
Source1: saxpath-%{saxpath_version}.tar.bz2
|
|
|
|
|
Source2: xom-%{xom_version}-src.tar.bz2
|
2009-06-05 23:12:40 +02:00
|
|
|
|
# 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/
|
|
|
|
|
Source3: dom4j-%{dom4j_version}-debian.tar.bz2
|
|
|
|
|
Source4: jaxen-%{jaxen_version}-src.tar.bz2
|
|
|
|
|
Patch0: jdom-1.1-build.xml.patch
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Patch1: include-glibj.jar.patch
|
2009-06-05 23:12:40 +02:00
|
|
|
|
Patch2: jdom-1.1-xom-get-jaxen.patch
|
2008-03-26 16:16:05 +01:00
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildArch: noarch
|
2011-03-18 10:02:18 +01:00
|
|
|
|
BuildRequires: ant
|
|
|
|
|
BuildRequires: ant-junit
|
|
|
|
|
BuildRequires: junit
|
|
|
|
|
BuildRequires: servletapi5
|
|
|
|
|
BuildRequires: xalan-j2
|
|
|
|
|
BuildRequires: xerces-j2
|
|
|
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
|
|
|
|
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
|
|
|
|
|
BuildRequires: unzip
|
2008-03-26 16:16:05 +01:00
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
JDOM is, quite simply, a Java representation of an XML document. JDOM
|
|
|
|
|
provides a way to represent that document for easy and efficient
|
|
|
|
|
reading, manipulation, and writing. It has a straightforward API, is
|
|
|
|
|
lightweight and fast, and is optimized for the Java programmer. It is
|
|
|
|
|
an alternative to DOM and SAX, although it integrates well with both
|
|
|
|
|
DOM and SAX.
|
|
|
|
|
|
|
|
|
|
%package -n saxpath
|
2008-11-21 17:12:46 +01:00
|
|
|
|
License: The Apache Software License
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Version: 1.0_FCS
|
2009-06-05 23:12:40 +02:00
|
|
|
|
Release: 274
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Summary: SAXPath is an event-based API for XPath parsers
|
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
|
|
%description -n saxpath
|
|
|
|
|
SAXPath is an event-based API for XPath parsers, that is, for parsers
|
|
|
|
|
which parse XPath expressions. SAXPath is intended to be for XPath
|
|
|
|
|
what SAX is for XML. Note that the SAXPath package only parses XPath
|
|
|
|
|
expressions; it does not evaluate them, or even provide an object
|
|
|
|
|
structure for representing them once they have been parsed.
|
|
|
|
|
|
|
|
|
|
%package -n xom
|
2008-11-21 17:12:46 +01:00
|
|
|
|
License: LGPL v2.1 or later
|
2009-06-05 23:12:40 +02:00
|
|
|
|
Version: 1.2b1
|
|
|
|
|
Release: 2
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Summary: XOM<EFBFBD> is a new XML object model
|
|
|
|
|
Group: Development/Languages/Java
|
|
|
|
|
|
|
|
|
|
%description -n xom
|
|
|
|
|
XOM is designed to be easy to learn and easy to use. It works very
|
|
|
|
|
straight-forwardly, and has a very shallow learning curve. Assuming
|
|
|
|
|
you're already familiar with XML, you should be able to get up and
|
|
|
|
|
running with XOM very quickly.
|
|
|
|
|
|
|
|
|
|
XOM is the only XML API that makes no compromises on correctness. XOM
|
|
|
|
|
only accepts namespace well-formed XML documents, and only allows you
|
|
|
|
|
to create namespace well-formed XML documents. (In fact, it's a little
|
|
|
|
|
stricter than that: it actually guarantees that all documents are
|
|
|
|
|
round-trippable and have well-defined XML infosets.) XOM manages your
|
|
|
|
|
XML so you don't have to. With XOM, you can focus on the unique value
|
|
|
|
|
of your application, and trust XOM to get the XML right.
|
|
|
|
|
|
|
|
|
|
XOM is fairly unique in that it is a dual streaming/tree-based API.
|
|
|
|
|
Individual nodes in the tree can be processed while the document is
|
|
|
|
|
still being built. The enables XOM programs to operate almost as fast
|
|
|
|
|
as the underlying parser can supply data. You don't need to wait for
|
|
|
|
|
the document to be completely parsed before you can start working with
|
|
|
|
|
it.
|
|
|
|
|
|
|
|
|
|
XOM is very memory efficient. If you read an entire document into
|
|
|
|
|
memory, XOM uses as little memory as possible. More importantly, XOM
|
|
|
|
|
allows you to filter documents as they're built so you don't have to
|
|
|
|
|
build the parts of the tree you aren't interested in. For instance, you
|
|
|
|
|
can skip building text nodes that only represent boundary white space,
|
|
|
|
|
if such white space is not significant in your application. You can
|
|
|
|
|
even process a document piece by piece and throw away each piece when
|
|
|
|
|
you're done with it. XOM has been used to process documents that are
|
|
|
|
|
gigabytes in size.
|
|
|
|
|
|
|
|
|
|
XOM includes built-in support for a number of XML technologies
|
|
|
|
|
including Namespaces in XML, XPath, XSLT, XInclude, xml:id, and
|
|
|
|
|
Canonical XML. XOM documents can be converted to and from SAX and DOM.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n jaxen
|
2008-11-21 17:12:46 +01:00
|
|
|
|
License: The Apache Software License
|
2009-06-05 23:12:40 +02:00
|
|
|
|
Version: 1.1.1
|
|
|
|
|
Release: 2
|
2008-03-26 16:16:05 +01:00
|
|
|
|
Summary: The jaxen project is a Java XPath Engine
|
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
|
|
%description -n jaxen
|
|
|
|
|
Jaxen is a universal object model walker, capable of evaluating XPath
|
|
|
|
|
expressions across multiple models. Currently supported are dom4j,
|
|
|
|
|
JDOM, and DOM.
|
|
|
|
|
|
|
|
|
|
%prep
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%setup -q -c foo -a 1 -a 2 -a 3 -a 4
|
|
|
|
|
rm %{xom_dir}/%{xom_included_jaxen_archive}
|
2008-03-26 16:16:05 +01:00
|
|
|
|
mkdir %{stage1_build_dir}
|
|
|
|
|
# delete all inlcuded jar files:
|
|
|
|
|
find . -name "*.jar" -delete -name "*.class" -delete
|
2009-06-05 23:12:40 +02:00
|
|
|
|
%patch0
|
|
|
|
|
%patch1
|
|
|
|
|
%patch2
|
|
|
|
|
#%patch150 -p1
|
2008-03-26 16:16:05 +01:00
|
|
|
|
#<<< prep
|
|
|
|
|
#>>> build
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
LIBGCJ=$(ls /usr/share/java/libgcj* | tail -n1 )
|
|
|
|
|
LIBGCJ=$(basename $LIBGCJ)
|
|
|
|
|
export GC_MAXIMUM_HEAP_SIZE="134217728" #128M
|
2009-06-05 23:12:40 +02:00
|
|
|
|
export JAVACMD_OPTS="-C -ftarget=1.5"
|
|
|
|
|
export JAVACMD="javac ${JAVACMD_OPTS} "
|
2008-03-26 16:16:05 +01:00
|
|
|
|
i=0
|
2009-06-05 23:12:40 +02:00
|
|
|
|
export CLASSPATH="%{stage1_build_dir}:$(build-classpath $LIBGCJ xerces-j2 xalan-j2 xalan-j2-serializer junit servletapi5):%{jaxen_dir}/src/java/main/:%{jdom_dir}/src/java/:%{saxpath_dir}/src/java/main/:%{xom_dir}/src/:%{dom4j_dir}/src/java"
|
|
|
|
|
SOURCE_DIRS="%{jaxen_dir}/src/java/main/ %{jdom_dir}/src/java/ %{saxpath_dir}/src/java/main/ %{xom_dir}/src/ %{dom4j_dir}/src/java"
|
|
|
|
|
MAX=$(find ${SOURCE_DIRS} -iname "*.java" | wc -l)
|
|
|
|
|
for file in $(find ${SOURCE_DIRS} -name "*.java")
|
2008-03-26 16:16:05 +01:00
|
|
|
|
do
|
|
|
|
|
i=$((i+1))
|
2009-06-05 23:12:40 +02:00
|
|
|
|
echo compiling class \# $i of ${MAX}
|
|
|
|
|
${JAVACMD} -classpath ${CLASSPATH} -d %{stage1_build_dir} $file || FAILED_FILES="$FAILED_FILES $file"
|
2008-03-26 16:16:05 +01:00
|
|
|
|
done
|
2009-06-05 23:12:40 +02:00
|
|
|
|
unset CLASSPATH SOURCE_DIRS MAX
|
2011-03-18 10:02:18 +01:00
|
|
|
|
|
2008-03-26 16:16:05 +01:00
|
|
|
|
pushd %{jdom_dir}
|
|
|
|
|
ant -Dparser.jar=$(build-classpath xerces-j2) \
|
|
|
|
|
-Dxml-apis.jar=$(build-classpath xml-commons-apis) \
|
|
|
|
|
-Dglibj.jar=$(build-classpath glibj) \
|
2009-06-05 23:12:40 +02:00
|
|
|
|
-Djaxen.lib.dir=%{stage1_build_dir} \
|
|
|
|
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
|
|
|
|
package
|
2008-03-26 16:16:05 +01:00
|
|
|
|
mv build/jdom.jar %{_builddir}/jdom-%{jdom_version}.jar
|
|
|
|
|
popd
|
|
|
|
|
pushd %{jaxen_dir}/src/java/main
|
|
|
|
|
mkdir build
|
|
|
|
|
#mkdir %{_builddir}/jaxen-excluded
|
|
|
|
|
#mv org/jaxen/dom4j %{_builddir}/jaxen-excluded
|
|
|
|
|
${JAVACMD} -classpath $(build-classpath glibj):%{_builddir}/jdom-%{jdom_version}.jar:%{stage1_build_dir} -d build/ $(find . -name "*.java")
|
|
|
|
|
cd build
|
|
|
|
|
jar -cf %{_builddir}/jaxen-%{jaxen_version}.jar *
|
|
|
|
|
popd
|
|
|
|
|
pushd %{saxpath_dir}
|
|
|
|
|
mkdir src/conf
|
|
|
|
|
touch src/conf/MANIFEST.MF
|
|
|
|
|
CLASSPATH=$(build-classpath glibj):%{_builddir}/jaxen-%{jaxen_version}.jar:%{_builddir}/jdom-%{jdom_version}.jar:%{stage1_build_dir} ant package
|
|
|
|
|
mv build/saxpath.jar %{_builddir}/saxpath-%{saxpath_version}.jar
|
|
|
|
|
popd
|
|
|
|
|
pushd %{xom_dir}
|
|
|
|
|
ant \
|
|
|
|
|
-Djaxen.dir=%{stage1_build_dir} \
|
|
|
|
|
-Dxml-apis.jar=$(build-classpath xml-commons-apis) \
|
|
|
|
|
-Dparser.jar=$(build-classpath xerces-j2) \
|
|
|
|
|
-Dxslt.jar=$(build-classpath xalan-j2) \
|
|
|
|
|
-Dserializer.jar=$(build-classpath xalan-j2-serializer) \
|
|
|
|
|
-Djunit.jar=$(build-classpath junit) \
|
|
|
|
|
-Dresolver.jar=$(build-classpath xml-commons-resolver) \
|
|
|
|
|
-Ddom4j.jar=%{stage1_build_dir} \
|
|
|
|
|
-Dglibj.jar=$(build-classpath glibj) \
|
2009-06-05 23:12:40 +02:00
|
|
|
|
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 \
|
2008-03-26 16:16:05 +01:00
|
|
|
|
compile compile15 jar
|
|
|
|
|
mv build/xom-%{xom_version}.jar %{_builddir}
|
|
|
|
|
popd
|
|
|
|
|
#<<< build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_javadir}
|
|
|
|
|
mv %{_builddir}/*.jar $RPM_BUILD_ROOT/%{_javadir}
|
|
|
|
|
ln -sf %{_javadir}/jdom-%{jdom_version}.jar $RPM_BUILD_ROOT/%{_javadir}/jdom.jar
|
|
|
|
|
ln -sf %{_javadir}/jaxen-%{jaxen_version}.jar $RPM_BUILD_ROOT/%{_javadir}/jaxen.jar
|
|
|
|
|
ln -sf %{_javadir}/saxpath-%{saxpath_version}.jar $RPM_BUILD_ROOT/%{_javadir}/saxpath.jar
|
|
|
|
|
ln -sf %{_javadir}/xom-%{xom_version}.jar $RPM_BUILD_ROOT/%{_javadir}/xom.jar
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%{_javadir}/jdom*.jar
|
|
|
|
|
|
|
|
|
|
%files -n xom
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%{_javadir}/xom*.jar
|
|
|
|
|
|
|
|
|
|
%files -n saxpath
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%{_javadir}/saxpath*.jar
|
|
|
|
|
|
|
|
|
|
%files -n jaxen
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%{_javadir}/jaxen*.jar
|
|
|
|
|
# vim:fdm=marker:foldmarker=#>>>,#<<<:foldcolumn=6:foldlevel=42:
|
|
|
|
|
|
|
|
|
|
%changelog
|
2009-06-05 23:12:40 +02:00
|
|
|
|
* Wed May 20 2009 mvyskocil@suse.cz
|
|
|
|
|
- 'fixed bnc#501764: removed clover.license from source tarball'
|
|
|
|
|
* Mon May 18 2009 mvyskocil@suse.cz
|
|
|
|
|
- Removed documentation of ConcurrentReaderHashMap (bnc#504663)
|
|
|
|
|
* dom4j-1.6.1/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html
|
|
|
|
|
* dom4j-1.6.1/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html
|
|
|
|
|
* Thu May 14 2009 mvyskocil@suse.cz
|
|
|
|
|
- fixed version tag for jaxen and xom
|
|
|
|
|
* Tue Jan 20 2009 mvyskocil@suse.cz
|
|
|
|
|
- update jdom to 1.1 fixed bnc#467366
|
|
|
|
|
- updated jaxen to 1.1.1 (do not use an included jaxen)
|
|
|
|
|
- cleaned build requires
|
|
|
|
|
- Obsoleted java150 patch
|
2008-11-21 17:12:46 +01:00
|
|
|
|
* Fri Nov 21 2008 ro@suse.de
|
|
|
|
|
- update check-build.sh
|
2008-03-26 16:16:05 +01:00
|
|
|
|
* Wed Jan 23 2008 mvyskocil@suse.cz
|
|
|
|
|
- fixed beta build
|
|
|
|
|
* Thu Mar 29 2007 dbornkessel@suse.de
|
|
|
|
|
- added unzip to build requires
|
|
|
|
|
* Mon Jan 15 2007 dbornkessel@suse.de
|
|
|
|
|
- removed xml-commons-apis build req. (Bug #232127)
|
|
|
|
|
* Thu Sep 28 2006 dbornkessel@suse.de
|
|
|
|
|
- first versions
|
|
|
|
|
- fixes necessary to compile with Java 1.5.0
|
|
|
|
|
- set source="1.4" and target="1.4" for ant "javac" tasks
|
|
|
|
|
- set source="1.4" for ant "javadoc" tasks
|