Sync from SUSE:ALP:Source:Standard:1.0 xom revision d9ac31ac8ca02d7575c777f2002ecc03

This commit is contained in:
Adrian Schröter 2024-02-19 15:53:05 +01:00
commit f706aff841
6 changed files with 335 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

17
_service Normal file
View File

@ -0,0 +1,17 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/elharo/xom.git</param>
<param name="revision">v1.3.9</param>
<param name="match-tag">v*</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="exclude">lib/*</param>
<param name="exclude">lib2/*</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

BIN
xom-1.3.9.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

179
xom-build.patch Normal file
View File

@ -0,0 +1,179 @@
diff --git a/build.xml b/build.xml
index 201e497..e408abf 100644
--- a/build.xml
+++ b/build.xml
@@ -65,12 +65,12 @@ subject line. The XOM home page is https://xom.nu/
<property name="dist.dir" value="./dist"/>
<property name="clover.dir" value="./clover"/>
<property name="testreports.dir" value="./testreports" />
- <property name="jaxen.dir" value="${build.dir}/jaxen-classes"/>
<property name="xmlapis.jar" value="${lib.dir}/xml-apis-1.4.01.jar"/>
<property name="parser.jar" value="${lib.dir}/xercesImpl-2.12.2.jar"/>
<property name="tagsoup.jar" value="${lib2.dir}/tagsoup-1.2.1.jar"/>
<property name="junit.jar" value="${lib.dir}/junit.jar"/>
+ <property name="jaxen.jar" value="${lib.dir}/jaxen-1.1.6.jar"/>
<property name="xom.jar" value="${build.dir}/${name}-${version}.jar"/>
<property name="xom-core" value="${build.dest}"/>
@@ -89,7 +89,7 @@ subject line. The XOM home page is https://xom.nu/
<pathelement location="${parser.jar}"/>
<pathelement location="${xmlapis.jar}"/>
<pathelement location="${junit.jar}"/>
- <pathelement location="${jaxen.dir}"/>
+ <pathelement location="${jaxen.jar}"/>
<pathelement location="${servlet.jar}"/>
</path>
@@ -97,7 +97,7 @@ subject line. The XOM home page is https://xom.nu/
<pathelement location="${xmlapis.jar}"/>
<pathelement location="${parser.jar}"/>
<pathelement location="${xom-core}"/>
- <pathelement location="${jaxen.dir}"/>
+ <pathelement location="${jaxen.jar}"/>
</path>
<path id="test.class.path">
@@ -183,15 +183,15 @@ XOM Build file
</target>
- <target name="compile-core" depends="prepare, compile-jaxen"
+ <target name="compile-core" depends="prepare"
description="Compile the source code">
<javac srcdir="${build.src}"
destdir="${build.dest}"
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}"
- target="1.6"
- source="1.6"
+ target="1.8"
+ source="1.8"
encoding="UTF-8"
fork="true"
includeAntRuntime="false"
@@ -218,8 +218,8 @@ XOM Build file
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}"
- target="1.6"
- source="1.6"
+ target="1.8"
+ source="1.8"
encoding="UTF-8"
includeAntRuntime="false">
<classpath refid="compile.class.path"/>
@@ -271,21 +271,13 @@ XOM Build file
<target name="jar" depends="compile" description="Create xom.jar">
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
- classpath="${lib2.dir}/jarjar-1.0.jar"/>
- <jarjar jarfile="${build.dir}/${name}-${version}.jar"
+ <jar destfile="${build.dir}/${name}-${version}.jar"
basedir="${build.dest}"
index="no"
compress="yes"
includes="nu/xom/* nu/xom/xslt/* nu/xom/xinclude/* nu/xom/converters/* nu/xom/canonical/* nu/xom/tests/XOMTestCase.class"
excludes="nu/xom/samples/* nu/xom/benchmarks/* nu/xom/pantry/* nu/xom/tools/* nu/xom/integrationtests/*">
- <fileset dir="${jaxen.dir}"
- excludes="**Demo.class **/package.html org/jaxen/xom/** org/jaxen/XPathTestBase.class org/jaxen/jdom/** org/jaxen/dom4j/** org/jaxen/javabean/** org/jaxen/dom/** org/jaxen/**Test.class org/jaxen/saxpath/base/**Test.class org/jaxen/saxpath/helpers/**Test.class org/jaxen/saxpath/helpers/**Test.class org/jaxen/pattern/** org/jaxen/saxpath/SAXPathParseException.class org/w3c/dom/UserDataHandler.class org/jaxen/pattern/PriorityTest.class">
- </fileset>
-
- <rule pattern="org.jaxen.**" result="nu.xom.jaxen.@1"/>
-
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Specification-Title" value="XOM"/>
@@ -345,7 +337,7 @@ XOM Build file
<attribute name="Implementation-Title" value="nu.xom.canonical"/>
</section>
</manifest>
- </jarjar>
+ </jar>
<!-- Put a copy in the dist dir too, because I never remember to upload
the jar from the build directory. -->
@@ -392,7 +384,9 @@ XOM Build file
noindex="false"
windowtitle="${Name} ${version} API"
docencoding="UTF-8"
+ encoding="UTF-8"
charset="UTF-8"
+ source="1.8"
link="http://www.junit.org/junit/javadoc/3.8.1"
doctitle="${Name} ${version}"
bottom="Copyright 2002-${year} &lt;a href='https://www.elharo.com/'&gt;Elliotte Rusty Harold&lt;/a&gt;
@@ -436,7 +430,9 @@ XOM Build file
noindex="false"
windowtitle="${Name} ${version} API"
docencoding="UTF-8"
+ enconding="UTF-8"
charset="UTF-8"
+ source="1.8"
noqualifier="java.lang:java.io"
link="http://www.junit.org/junit/javadoc/3.8.1"
doctitle="${Name} ${version}"
@@ -454,8 +450,8 @@ XOM Build file
debug="${debug}"
optimize="${optimize}"
deprecation="${deprecation}"
- target="1.6"
- source="1.6"
+ target="1.8"
+ source="1.8"
encoding="UTF-8"
includeAntRuntime="false"
includes="nu/xom/tools/*">
@@ -720,7 +716,7 @@ XOM Build file
<!-- Generate a Maven JAR for uploading to OSRRH and hence placement onto ibiblio and mirrors.
See https://maven.apache.org/guides/mini/guide-central-repository-upload.html -->
- <target name="maven2" depends="jar, sources.jar, javadoc.jar" >
+ <target name="maven2" depends="jar" >
<property name="pom2.template" location="project2.xml" />
<property name="pom2.file" location="${build.dir}/maven2/project.xml" />
<property name="package.jar" location="${build.dir}/${name}-${version}.jar"/>
@@ -740,40 +736,6 @@ XOM Build file
</target>
- <target name="compile-jaxen" description="Compile Jaxen" depends="get-jaxen">
- <javac srcdir="${build.dir}/jaxen-${jaxenversion}/src/java/main"
- destdir="${build.dir}/jaxen-classes"
- debug="${debug}"
- optimize="${optimize}"
- deprecation="${deprecation}"
- target="1.6"
- source="1.6"
- encoding="UTF-8"
- includeAntRuntime="false"
- excludes="org/jaxen/dom/**
- org/jaxen/jdom/**
- org/jaxen/dom4j/**
- org/jaxen/pattern/**
- org/jaxen/javabean/**
- org/jaxen/xom/**
- org/jaxen/function/xslt/**
- org/jaxen/function/ext/**
- org/w3c/dom/**
- org/jaxen/saxpath/expr/DefaultPredicated.java
- org/jaxen/saxpath/helpers/DefaultXPathHandler.java
- org/jaxen/util/StackedIterator.java
- org/jaxen/util/XPath2XMLVisitor.java
- org/jaxen/util/LinkedIterator.java
- org/jaxen/util/SelfAxisIterator.java
- ">
- <classpath refid="compile.class.path"/>
- </javac>
- </target>
-
- <target name="get-jaxen" description="Download Jaxen source code" depends="prepare">
- <unzip src="jaxen-${jaxenversion}-src.zip" dest="${build.dir}" />
- </target>
-
<target name="debug" depends="init" description="Print various Ant properties">
<echoproperties/>
</target>

4
xom.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Wed Aug 23 17:05:38 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Initial packaging as standalone package with version 1.3.9

109
xom.spec Normal file
View File

@ -0,0 +1,109 @@
#
# spec file for package xom
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2000-2005, JPackage Project
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xom
Version: 1.3.9
Release: 0
Summary: XML Object Model
License: LGPL-2.0-only
URL: https://github.com/elharo/xom
Source0: %{name}-%{version}.tar.xz
Patch0: %{name}-build.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local >= 6
BuildRequires: jaxen-bootstrap
BuildRequires: junit
BuildRequires: xerces-j2
BuildRequires: xml-apis
BuildArch: noarch
%description
XOM is a new XML object model. It is an open source (LGPL),
tree-based API for processing XML with Java that strives
for correctness, simplicity, and performance, in that order.
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.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
This package provides %{summary}.
%package demo
Summary: Samples for %{name}
Requires: %{name} = %{version}-%{release}
%description demo
This package provides %{summary}.
%prep
%setup -q
%patch0 -p1
%build
mkdir -p lib
pushd lib
ln -sf $(build-classpath junit) junit.jar
ln -sf $(build-classpath xerces-j2) xercesImpl-2.12.2.jar
ln -sf $(build-classpath xml-apis) xml-apis-1.4.01.jar
ln -sf $(build-classpath jaxen) jaxen-1.1.6.jar
popd
%{ant} jar samples javadoc maven
mv build/maven2/project.xml build/maven2/pom.xml
%pom_add_dep jaxen:jaxen build/maven2/pom.xml
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}
install -pm 0644 build/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} build/maven2/pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
%add_maven_depmap %{name}.pom %{name}.jar -a com.io7m.xom:xom
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
# demo
install -d -m 755 %{buildroot}%{_datadir}/%{name}
install -m 644 build/xom-samples.jar %{buildroot}%{_datadir}/%{name}
%files -f .mfiles
%doc README.txt Todo.txt lgpl.txt
%license LICENSE.txt
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE.txt
%doc lgpl.txt
%files demo
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/xom-samples.jar
%changelog