commit
20521d70e7
BIN
xom-1.2.10-src.tar.gz
Normal file
BIN
xom-1.2.10-src.tar.gz
Normal file
Binary file not shown.
139
xom-build.patch
Normal file
139
xom-build.patch
Normal file
@ -0,0 +1,139 @@
|
||||
diff --git a/build.xml b/build.xml
|
||||
index afe9c1f..23f2797 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -68,11 +68,11 @@ subject line. The XOM home page is http://www.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="xml-apis.jar" value="${lib.dir}/xml-apis.jar"/>
|
||||
<property name="parser.jar" value="${lib.dir}/dtd-xercesImpl.jar"/>
|
||||
<property name="xslt.jar" value="${lib.dir}/xalan.jar"/>
|
||||
+ <property name="jaxen.jar" value="${lib.dir}/jaxen.jar"/>
|
||||
<property name="serializer.jar" value="${lib.dir}/serializer.jar"/>
|
||||
<property name="tagsoup.jar" value="${lib2.dir}/tagsoup-1.2.jar"/>
|
||||
<property name="junit.jar" value="${lib.dir}/junit.jar"/>
|
||||
@@ -107,7 +107,7 @@ subject line. The XOM home page is http://www.xom.nu/
|
||||
<pathelement location="${xml-apis.jar}"/>
|
||||
<pathelement location="${parser.jar}"/>
|
||||
<pathelement location="${junit.jar}"/>
|
||||
- <pathelement location="${jaxen.dir}"/>
|
||||
+ <pathelement location="${jaxen.jar}"/>
|
||||
<pathelement location="${servlet.jar}"/>
|
||||
</path>
|
||||
|
||||
@@ -115,7 +115,7 @@ subject line. The XOM home page is http://www.xom.nu/
|
||||
<pathelement location="${xml-apis.jar}"/>
|
||||
<pathelement location="${parser.jar}"/>
|
||||
<pathelement location="${xom-core}"/>
|
||||
- <pathelement location="${jaxen.dir}"/>
|
||||
+ <pathelement location="${jaxen.jar}"/>
|
||||
<pathelement location="${xslt.jar}"/>
|
||||
<pathelement location="${serializer.jar}"/>
|
||||
</path>
|
||||
@@ -214,15 +214,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.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
fork="true"
|
||||
includeAntRuntime="false"
|
||||
@@ -253,8 +253,8 @@ XOM Build file
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.6"
|
||||
+ source="1.6"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false">
|
||||
<classpath refid="compile.class.path"/>
|
||||
@@ -270,8 +270,8 @@ XOM Build file
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.5"
|
||||
+ source="1.5"
|
||||
encoding="UTF-8"
|
||||
failonerror="false"
|
||||
includeAntRuntime="false">
|
||||
@@ -330,13 +330,7 @@ XOM Build file
|
||||
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/*">
|
||||
-
|
||||
- <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"/>
|
||||
@@ -512,8 +506,8 @@ XOM Build file
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.5"
|
||||
+ source="1.5"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
includes="nu/xom/tools/*">
|
||||
@@ -840,7 +834,7 @@ location="${dist.dir}/maven1/xom-maven-${version}.jar" />
|
||||
<!-- Generate a Maven 2 JAR for uploading to the maven
|
||||
bug repository and hence placement onto ibiblio and mirrors.
|
||||
See http://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"/>
|
||||
@@ -862,14 +856,14 @@ location="${dist.dir}/maven1/xom-maven-${version}.jar" />
|
||||
</target>
|
||||
|
||||
|
||||
- <target name="compile-jaxen" description="Compile Jaxen" depends="get-jaxen">
|
||||
+ <target name="compile-jaxen" description="Compile Jaxen">
|
||||
<javac srcdir="${build.dir}/jaxen-${jaxenversion}/src/java/main"
|
||||
destdir="${build.dir}/jaxen-classes"
|
||||
debug="${debug}"
|
||||
optimize="${optimize}"
|
||||
deprecation="${deprecation}"
|
||||
- target="1.2"
|
||||
- source="1.3"
|
||||
+ target="1.5"
|
||||
+ source="1.5"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
excludes="org/jaxen/dom/**
|
||||
@@ -891,10 +885,6 @@ location="${dist.dir}/maven1/xom-maven-${version}.jar" />
|
||||
<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/>
|
||||
115
xom.spec
Normal file
115
xom.spec
Normal file
@ -0,0 +1,115 @@
|
||||
%define with_dom4j %{?_with_dom4j:1}%{!?_with_dom4j:0}
|
||||
%define without_dom4j %{!?_with_dom4j:1}%{?_with_dom4j:0}
|
||||
Summary: XML Object Model
|
||||
Name: xom
|
||||
Version: 1.2.10
|
||||
Release: 1
|
||||
Epoch: 0
|
||||
License: LGPLv2
|
||||
URL: http://www.xom.nu
|
||||
Source0: http://www.cafeconleche.org/XOM/%{name}-%{version}-src.tar.gz
|
||||
Patch0: %{name}-build.patch
|
||||
BuildRequires: ant >= 0:1.6 javapackages-local javapackages-tools jarjar jaxen junit xalan-j2
|
||||
BuildRequires: xerces-j2
|
||||
%if %{with_dom4j}
|
||||
BuildRequires: dom4j
|
||||
%endif
|
||||
BuildRequires: xml-commons-apis tagsoup java-devel xml-commons-resolver servlet
|
||||
Requires: jaxen xalan-j2 xerces-j2 xml-commons-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 -n XOM
|
||||
find \( -name '*.jar' -or -name '*.class' \) -delete
|
||||
%patch0 -p1
|
||||
for s in src/nu/xom/tests/BuilderTest.java\
|
||||
src/nu/xom/tests/SerializerTest.java;do
|
||||
native2ascii -encoding UTF8 ${s} ${s}
|
||||
done
|
||||
sed -i 's/\r//g' LICENSE.txt
|
||||
sed -i "s,59 Temple Place,51 Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301," $(find -name "*.java") \
|
||||
LICENSE.txt lgpl.txt
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
pushd lib
|
||||
ln -sf $(build-classpath junit) junit.jar
|
||||
ln -sf $(build-classpath xerces-j2) dtd-xercesImpl.jar
|
||||
ln -sf $(build-classpath xalan-j2) xalan.jar
|
||||
ln -sf $(build-classpath xml-commons-apis) xmlParserAPIs.jar
|
||||
ln -sf $(build-classpath jaxen) jaxen.jar
|
||||
while IFS=':' read -ra JARJAR_JARS; do
|
||||
for j in "${JARJAR_JARS[@]}";do
|
||||
ln -sf $j $(basename $j .jar)-1.0.jar
|
||||
done
|
||||
done <<<$(build-classpath jarjar)
|
||||
popd
|
||||
mkdir -p lib2
|
||||
pushd lib2
|
||||
ln -sf $(build-classpath tagsoup) tagsoup-1.2.jar
|
||||
ln -sf $(build-classpath xml-commons-resolver) resolver.jar
|
||||
%if %{with_dom4j}
|
||||
ln -sf $(build-classpath dom4j) dom4j.jar
|
||||
%endif
|
||||
ln -sf $(build-classpath servlet) servlet.jar
|
||||
popd
|
||||
ant -v compile15 jar samples betterdoc maven2
|
||||
pushd build/apidocs
|
||||
for f in `find -name \*.css -o -name \*.html`; do
|
||||
sed -i 's/\r//g' $f
|
||||
done
|
||||
popd
|
||||
mv build/maven2/project.xml build/maven2/pom.xml
|
||||
%pom_add_dep jaxen:jaxen build/maven2/pom.xml
|
||||
%mvn_artifact build/maven2/pom.xml build/%{name}-%{version}.jar
|
||||
%mvn_alias xom:xom com.io7m.xom:xom
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
ln -s xom/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||
install -m 644 build/xom-samples.jar %{buildroot}%{_datadir}/%{name}
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
ln -s xom/xom.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
|
||||
%files -f .mfiles
|
||||
%doc README.txt
|
||||
%doc LICENSE.txt
|
||||
%doc Todo.txt
|
||||
%doc lgpl.txt
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%doc LICENSE.txt
|
||||
%doc lgpl.txt
|
||||
|
||||
%files demo
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/xom-samples.jar
|
||||
|
||||
%changelog
|
||||
* Thu Jul 23 2020 Jeffery.Gao <gaojianxing@huawei.com> - 1.2.10-1
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user