import jing-trang-20151127-4.el8

c8 imports/c8/jing-trang-20151127-4.el8
CentOS Sources 2019-05-07 05:50:55 -04:00 committed by Andrew Lukoshko
commit e470c1262e
6 changed files with 745 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/V20151127.tar.gz

1
.jing-trang.metadata Normal file
View File

@ -0,0 +1 @@
560315f03315b0ceeb3ca2a0e59d7401a117e11d SOURCES/V20151127.tar.gz

View File

@ -0,0 +1,317 @@
From 212c793fe0f4b9e352e2ae9949beb187e77abe68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Mon, 9 Jun 2014 09:54:16 +0300
Subject: [PATCH 1/2] Various build fixes
---
build.xml | 19 ++++++++-----------
build.xsl | 28 ++++++++++++++++++----------
mod/catalog/mod.xml | 2 +-
mod/datatype/mod.xml | 1 +
mod/jing/mod.xml | 2 --
mod/pattern/mod.xml | 1 +
mod/regex/mod.xml | 2 +-
mod/rng-jaxp/mod.xml | 1 +
mod/rng-validate/mod.xml | 2 +-
mod/schematron/mod.xml | 8 ++------
mod/trang/mod.xml | 3 +--
mod/xerces/mod.xml | 2 +-
mod/xsd-datatype/mod.xml | 1 +
13 files changed, 37 insertions(+), 35 deletions(-)
diff --git a/build.xml b/build.xml
index a2bc499..ee0f061 100644
--- a/build.xml
+++ b/build.xml
@@ -145,22 +145,19 @@
<target name="javadoc" depends="init">
<mkdir dir="${build.dir}/api"/>
- <mkdir dir="${build.dir}/api/datatype"/>
<mkdir dir="${build.dir}/api/jing"/>
<mkdir dir="${build.dir}/api/regex"/>
- <javadoc sourcepath="mod/datatype/src/main" destdir="${build.dir}/api/datatype"
- doctitle="RELAX NG Datatype API" windowtitle="RELAX NG Datatype API"
- packagenames="org.relaxng.datatype,org.relaxng.datatype.helpers"/>
<javadoc sourcepath="mod/util/src/main:mod/regex/src/main" destdir="${build.dir}/api/regex"
packagenames="com.thaiopensource.datatype.xsd.regex,
com.thaiopensource.datatype.xsd.regex.java,
- com.thaiopensource.datatype.xsd.regex.xerces2"/>
+ com.thaiopensource.datatype.xsd.regex.xerces2">
+ <link href="/usr/share/javadoc/java"/>
+ </javadoc>
<javadoc sourcepathref="javadoc.sourcepath" destdir="${build.dir}/api/jing"
doctitle="Jing API" windowtitle="Jing API"
packagenames="${javadoc.packagenames}">
- <link offline="true" href="../datatype" packagelistLoc="${build.dir}/api/datatype"/>
- <link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/"
- packagelistLoc="extapidoc/jdk/1.5"/>
+ <link href="/usr/share/javadoc/java"/>
+ <link href="/usr/share/javadoc/relaxngDatatype"/>
</javadoc>
</target>
@@ -170,7 +167,7 @@
destdir="${build.dir}/doccheck"
packagenames="${javadoc.packagenames}"
doclet="com.sun.tools.doclets.doccheck.DocCheck"
- docletpath="lib/doccheck.jar"/>
+ docletpath="${lib.dir}/doccheck.jar"/>
</target>
<target name="datatype-sample" depends="jar">
@@ -290,7 +287,7 @@
<java classname="com.thaiopensource.relaxng.translate.Driver"
fork="true"
failonerror="yes"
- classpath="${build.dir}/trang.jar">
+ classpath="${build.dir}/trang.jar:/usr/share/java/relaxngDatatype.jar">
<arg value="dtdinst/dtdinst.rnc"/>
<arg value="${build.dir}/dtdinst/dtdinst.rng"/>
</java>
@@ -360,7 +357,7 @@
depends="version,googlecode.properties"
description="Upload files to Google Code. Run dist before this.">
<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
- classpath="lib/ant-googlecode.jar" name="gcupload"/>
+ classpath="${lib.dir}/ant-googlecode.jar" name="gcupload"/>
<gcupload username="${googlecode.username}"
password="${googlecode.password}"
projectname="jing-trang"
diff --git a/build.xsl b/build.xsl
index d76508f..e084fca 100644
--- a/build.xsl
+++ b/build.xsl
@@ -10,12 +10,12 @@
<project>
<xmlproperty file="version.xml"/>
<property name="build.dir" value="${{basedir}}/build"/>
- <property name="javacc.dir" value="lib"/>
+ <property name="javacc.dir" value="${{lib.dir}}"/>
<property name="ant.build.javac.source" value="1.5"/>
<property name="ant.build.javac.target" value="1.5"/>
<taskdef name="testng" classname="org.testng.TestNGAntTask">
<classpath>
- <pathelement location="lib/testng.jar"/>
+ <pathelement location="${{lib.dir}}/testng.jar"/>
</classpath>
</taskdef>
<target name="dummy"/>
@@ -111,7 +111,7 @@
<pathelement location="{$build}/mod/{@module}/classes/main"/>
</xsl:for-each>
<xsl:for-each select="depends[@lib]">
- <pathelement location="lib/{@lib}.jar"/>
+ <pathelement location="${{lib.dir}}/{@lib}.jar"/>
</xsl:for-each>
</classpath>
</javac>
@@ -151,10 +151,10 @@
<pathelement location="{$build}/mod/{@module}/classes/main"/>
</xsl:for-each>
<xsl:for-each select="depends[@lib]">
- <pathelement location="lib/{@lib}.jar"/>
+ <pathelement location="${{lib.dir}}/{@lib}.jar"/>
</xsl:for-each>
<xsl:if test="test[@type='testng']">
- <pathelement location="lib/testng.jar"/>
+ <pathelement location="${{lib.dir}}/testng.jar"/>
</xsl:if>
</classpath>
</javac>
@@ -298,13 +298,18 @@
<classpath>
<pathelement location="{$build}/{$app}.jar"/>
<xsl:if test="@lib">
- <pathelement location="lib/{@lib}.jar"/>
+ <pathelement location="${{lib.dir}}/{@lib}.jar"/>
<xsl:if test="@lib='xalan'">
- <pathelement location="lib/serializer.jar"/>
+ <pathelement location="${{lib.dir}}/xalan-j2-serializer.jar"/>
</xsl:if>
</xsl:if>
+ <!-- Upstream build assumes Class-Path in jing, trang manifests -->
<xsl:if test="$app = 'jing'">
- <pathelement location="lib/xercesImpl.jar"/>
+ <pathelement location="${{lib.dir}}/xerces-j2.jar"/>
+ <pathelement location="${{lib.dir}}/relaxngDatatype.jar"/>
+ </xsl:if>
+ <xsl:if test="$app = 'trang'">
+ <pathelement location="${{lib.dir}}/relaxngDatatype.jar"/>
</xsl:if>
</classpath>
</java>
@@ -373,7 +378,7 @@
<pathelement location="mod/{@module}/src/main"/>
</xsl:for-each>
<xsl:for-each select="../depends[@lib]">
- <pathelement location="lib/{@lib}.jar"/>
+ <pathelement location="${{lib.dir}}/{@lib}.jar"/>
</xsl:for-each>
</classpath>
</java>
@@ -402,8 +407,11 @@
<pathelement location="mod/{@module}/src/main"/>
</xsl:for-each>
<xsl:for-each select="../depends[@lib]">
- <pathelement location="lib/{@lib}.jar"/>
+ <pathelement location="${{lib.dir}}/{@lib}.jar"/>
</xsl:for-each>
+ <!-- Upstream testng.jar includes bsh and qdox -->
+ <pathelement location="${{lib.dir}}/bsh.jar"/>
+ <pathelement location="${{lib.dir}}/qdox.jar"/>
</classpath>
</testng>
</target>
diff --git a/mod/catalog/mod.xml b/mod/catalog/mod.xml
index c8e2feb..5398646 100644
--- a/mod/catalog/mod.xml
+++ b/mod/catalog/mod.xml
@@ -3,5 +3,5 @@
<test name="unit" type="testng"/>
<depends module="util"/>
<depends module="resolver"/>
- <depends lib="resolver"/>
+ <depends lib="xml-commons-resolver"/>
</module>
diff --git a/mod/datatype/mod.xml b/mod/datatype/mod.xml
index cd79499..cdb420a 100644
--- a/mod/datatype/mod.xml
+++ b/mod/datatype/mod.xml
@@ -1,4 +1,5 @@
<module>
<depends module="util"/>
+ <depends lib="relaxngDatatype"/>
<compile/>
</module>
diff --git a/mod/jing/mod.xml b/mod/jing/mod.xml
index 86583f8..8b2ec82 100644
--- a/mod/jing/mod.xml
+++ b/mod/jing/mod.xml
@@ -21,8 +21,6 @@
<jar>
<manifest>
<attribute name="Main-Class" value="com/thaiopensource/relaxng/util/Driver"/>
- <attribute name="Class-Path"
- value="xercesImpl.jar xml-apis.jar saxon.jar saxon9.jar xalan.jar isorelax.jar resolver.jar"/>
</manifest>
<service type="com.thaiopensource.datatype.xsd.regex.RegexEngine"/>
<service type="org.relaxng.datatype.DatatypeLibraryFactory"/>
diff --git a/mod/pattern/mod.xml b/mod/pattern/mod.xml
index 777f484..875f1cb 100644
--- a/mod/pattern/mod.xml
+++ b/mod/pattern/mod.xml
@@ -3,6 +3,7 @@
<depends module="resolver"/>
<depends module="datatype"/>
<depends module="rng-parse"/>
+ <depends lib="relaxngDatatype"/>
<compile test="yes"/>
<test name="unit" type="testng"/>
</module>
diff --git a/mod/regex/mod.xml b/mod/regex/mod.xml
index 3d1f73f..b682d6d 100644
--- a/mod/regex/mod.xml
+++ b/mod/regex/mod.xml
@@ -1,6 +1,6 @@
<module>
<depends module="util"/>
- <depends lib="xercesImpl"/>
+ <depends lib="xerces-j2"/>
<compile test="yes"/>
<test name="xerces" type="java"
class="com.thaiopensource.datatype.xsd.regex.test.TestDriver">
diff --git a/mod/rng-jaxp/mod.xml b/mod/rng-jaxp/mod.xml
index 10a8c6d..48c5d8c 100644
--- a/mod/rng-jaxp/mod.xml
+++ b/mod/rng-jaxp/mod.xml
@@ -7,6 +7,7 @@
<depends module="rng-parse"/>
<depends module="pattern"/>
<depends module="jaxp"/>
+ <depends lib="relaxngDatatype"/>
<compile test="yes"/>
<test name="unit" type="testng"/>
</module>
diff --git a/mod/rng-validate/mod.xml b/mod/rng-validate/mod.xml
index 109543b..b05b996 100644
--- a/mod/rng-validate/mod.xml
+++ b/mod/rng-validate/mod.xml
@@ -7,7 +7,7 @@
<depends module="pattern"/>
<depends module="validate"/>
<depends lib="ant"/>
- <depends lib="resolver"/>
+ <depends lib="xml-commons-resolver"/>
<test name="spec" type="validate" schema="eg/testSuite.rng"/>
<compile/>
<version package="com/thaiopensource/relaxng/util"/>
diff --git a/mod/schematron/mod.xml b/mod/schematron/mod.xml
index 51d85cd..3786625 100644
--- a/mod/schematron/mod.xml
+++ b/mod/schematron/mod.xml
@@ -3,15 +3,11 @@
<depends module="resolver"/>
<depends module="validate"/>
<depends module="rng-validate"/>
- <depends lib="xalan"/>
+ <depends lib="xalan-j2"/>
<depends lib="saxon"/>
- <depends lib="saxon9"/>
- <test name="old-saxon" in="mod/schematron/test/schematrontest.xml"
- type="validate" schema="test/schematrontest.nrl"
- lib="saxon"/>
<test name="new-saxon" in="mod/schematron/test/schematrontest.xml"
type="validate" schema="test/schematrontest.nrl"
- lib="saxon9"/>
+ lib="saxon"/>
<test name="xalan" in="mod/schematron/test/schematrontest.xml"
type="validate" schema="test/schematrontest.nrl"
lib="xalan"/>
diff --git a/mod/trang/mod.xml b/mod/trang/mod.xml
index 69b5cc0..fa2d6d0 100644
--- a/mod/trang/mod.xml
+++ b/mod/trang/mod.xml
@@ -13,13 +13,12 @@
<depends module="convert-to-xsd"/>
<depends module="convert-from-dtd"/>
<depends module="convert-to-dtd"/>
- <depends lib="resolver"/>
+ <depends lib="xml-commons-resolver"/>
<compile/>
<version package="com/thaiopensource/relaxng/translate"/>
<jar>
<manifest>
<attribute name="Main-Class" value="com/thaiopensource/relaxng/translate/Driver"/>
- <attribute name="Class-Path" value="resolver.jar"/>
</manifest>
<service type="com.thaiopensource.datatype.xsd.regex.RegexEngine">
<provider classname="com.thaiopensource.datatype.xsd.regex.xerces2.RegexEngineImpl"/>
diff --git a/mod/xerces/mod.xml b/mod/xerces/mod.xml
index b7dc603..56bc85f 100644
--- a/mod/xerces/mod.xml
+++ b/mod/xerces/mod.xml
@@ -1,7 +1,7 @@
<module>
<depends module="util"/>
<depends module="validate"/>
- <depends lib="xercesImpl"/>
+ <depends lib="xerces-j2"/>
<compile/>
<service type="com.thaiopensource.validate.SchemaReaderFactory">
<provider classname="com.thaiopensource.validate.xerces.XsdSchemaReaderFactory"/>
diff --git a/mod/xsd-datatype/mod.xml b/mod/xsd-datatype/mod.xml
index f81eb3c..cc7645b 100644
--- a/mod/xsd-datatype/mod.xml
+++ b/mod/xsd-datatype/mod.xml
@@ -2,6 +2,7 @@
<depends module="util"/>
<depends module="datatype"/>
<depends module="regex"/>
+ <depends lib="relaxngDatatype"/>
<test name="xsd" type="validate" transform="xsdtest.xsl" schema="test/xsdtest.rnc"/>
<test name="unit" type="testng"/>
<compile test="yes"/>
--
1.9.3

View File

@ -0,0 +1,154 @@
From c8a7800f6424beb64f4487e8c450875846e0d16a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Mon, 9 Jun 2014 09:57:38 +0300
Subject: [PATCH 2/2] Use Xalan instead of Saxon for the build (#655601)
---
build.xml | 10 +++++-----
build.xsl | 4 ++--
mod/schematron/mod.xml | 4 ++--
mod/xsd-datatype/test/xsdtest.xml | 2 ++
test/saxon.xsl | 14 +++++++-------
5 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/build.xml b/build.xml
index ee0f061..574c75f 100644
--- a/build.xml
+++ b/build.xml
@@ -40,7 +40,7 @@
<target name="modbuild" depends="modules,check-modbuild" unless="modbuild-ok">
<xslt style="build.xsl" in="modules.xml" out="modbuild.xml" force="true">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
</target>
@@ -74,7 +74,7 @@
includes="${moddir}/*/${modfile}"
filedirparameter="name"
destdir=".">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
<regexpmapper from="mod/([-a-zA-Z0-9_]*)/mod.xml"
to="mod/\1/\1.iml"
handledirsep="true"/>
@@ -180,15 +180,15 @@
<target name="jing-doc" depends="version">
<xslt basedir="doc" destdir="${build.dir}" includes="derivative.xml"
style="doc/derivative.xsl">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
<xslt basedir="doc" destdir="${build.dir}" includes="design.xml"
style="doc/design.xsl">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
<xslt basedir="doc" destdir="${build.dir}" includes="nrl.xml"
style="doc/nrl.xsl">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
<copy todir="${build.dir}">
<fileset dir="doc" includes="*.html"/>
diff --git a/build.xsl b/build.xsl
index e084fca..b29694f 100644
--- a/build.xsl
+++ b/build.xsl
@@ -330,7 +330,7 @@
<xslt style="{$srctestdir}/{@transform}"
in="{$srctest}"
out="{$runtestdir}/{@name}test.xml">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
<!-- XXX Could validate intermediate result against a schema -->
</xsl:if>
@@ -346,7 +346,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
<param name="dir" expression="{$runtestdir}"/>
</xslt>
</target>
diff --git a/mod/schematron/mod.xml b/mod/schematron/mod.xml
index 3786625..3e1d5b9 100644
--- a/mod/schematron/mod.xml
+++ b/mod/schematron/mod.xml
@@ -23,12 +23,12 @@
<xslt style="mod/schematron/lib/xsltc-fixup.xsl"
in="mod/schematron/src/main/${mod.schematron.respackage}/schematron.xsl"
out="${mod.schematron.resdir}/schematron-xsltc.xsl">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
<xslt style="mod/schematron/lib/xsltc-fixup.xsl"
in="mod/schematron/src/main/${mod.schematron.respackage}/iso-schematron.xsl"
out="${mod.schematron.resdir}/iso-schematron-xsltc.xsl">
- <factory name="com.icl.saxon.TransformerFactoryImpl"/>
+ <factory name="org.apache.xalan.processor.TransformerFactoryImpl"/>
</xslt>
</target>
</ant>
diff --git a/mod/xsd-datatype/test/xsdtest.xml b/mod/xsd-datatype/test/xsdtest.xml
index 5bbba48..fc0221b 100644
--- a/mod/xsd-datatype/test/xsdtest.xml
+++ b/mod/xsd-datatype/test/xsdtest.xml
@@ -739,7 +739,9 @@ B EEF </value>
<length value="0"></length>
<length value="1">x</length>
<length value="1"> x </length>
+<!-- xalan creates invalid XML out of this: &#55298;&#56320;
<length value="1">&#x10800;</length>
+-->
</datatype>
<datatype name="language">
<valid>en</valid>
diff --git a/test/saxon.xsl b/test/saxon.xsl
index 9a86877..1471783 100644
--- a/test/saxon.xsl
+++ b/test/saxon.xsl
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:saxon="http://icl.com/saxon"
- extension-element-prefixes="saxon">
+ xmlns:xalan="http://xml.apache.org/xalan"
+ extension-element-prefixes="xalan">
<xsl:output method="text"/>
@@ -10,21 +10,21 @@
<xsl:variable name="prepped">
<xsl:apply-templates select="*"/>
</xsl:variable>
- <xsl:apply-templates select="saxon:node-set($prepped)/documents/*" mode="output"/>
+ <xsl:apply-templates select="xalan:nodeset($prepped)/documents/*" mode="output"/>
</xsl:template>
<xsl:template match="document" mode="output">
- <saxon:output href="{@href}" method="{@method}">
+ <xsl:document href="{@href}" method="{@method}">
<xsl:if test="@dtd">
<xsl:value-of select="@dtd" disable-output-escaping="yes"/>
</xsl:if>
<xsl:copy-of select="node()"/>
- </saxon:output>
+ </xsl:document>
</xsl:template>
<xsl:template match="dir" mode="output">
<xsl:value-of select="substring(File:mkdir(File:new(@name)),0,0)"
- xmlns:File="java:java.io.File"/>
+ xmlns:File="xalan://java.io.File"/>
</xsl:template>
</xsl:stylesheet>
--
1.9.3

View File

@ -0,0 +1,20 @@
--- jing-trang-20091111/datatype-sample/build.xml~ 2001-09-22 07:10:47.000000000 +0300
+++ jing-trang-20091111/datatype-sample/build.xml 2010-11-30 22:49:33.352540838 +0200
@@ -1,7 +1,7 @@
<project name="RELAX NG Datatype Sample" default="jar" basedir=".">
<property name="build.dir" value="build"/>
-<property name="jing.jar" value="jing.jar"/>
+<property name="datatype.jar" value="/usr/share/java/relaxngDatatype.jar"/>
<target name="init">
<mkdir dir="${build.dir}"/>
@@ -9,7 +9,7 @@
<target name="compile" depends="init">
<mkdir dir="${build.dir}/classes"/>
- <javac srcdir="src" destdir="${build.dir}/classes" classpath="${jing.jar}"/>
+ <javac srcdir="src" destdir="${build.dir}/classes" classpath="${datatype.jar}"/>
</target>
<target name="jar" depends="compile">

252
SPECS/jing-trang.spec Normal file
View File

@ -0,0 +1,252 @@
# TODO:
# - Install dtdinst's schemas, XSL etc as non-doc and to system catalogs?
# - Drop isorelax and xerces license texts and references to them because
# our package does not actually contain them?
%if 0%{?fedora} || 0%{?rhel} >= 7
%global headless -headless
%endif
Name: jing-trang
Version: 20151127
Release: 4%{?dist}
Summary: Schema validation and conversion based on RELAX NG
License: BSD
URL: https://github.com/relaxng/jing-trang
Source0: https://github.com/relaxng/jing-trang/archive/V%{version}.tar.gz
# Applicable parts submitted upstream:
# https://github.com/relaxng/jing-trang/pull/215
# https://github.com/relaxng/jing-trang/pull/216
Patch0: 0001-Various-build-fixes.patch
# Saxon "HE" doesn't work for this, no old Saxon available, details in #655601
Patch1: 0002-Use-Xalan-instead-of-Saxon-for-the-build-655601.patch
Patch2: %{name}-20091111-datatype-sample.patch
BuildArch: noarch
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: ant-trax
%else
BuildRequires: ant >= 1.8.2
%endif
BuildRequires: bsh
BuildRequires: isorelax
BuildRequires: java-devel-openjdk >= 1:1.6.0
BuildRequires: java-javadoc
BuildRequires: javacc
BuildRequires: jpackage-utils
BuildRequires: qdox
BuildRequires: relaxngDatatype
BuildRequires: relaxngDatatype-javadoc
BuildRequires: testng
BuildRequires: xalan-j2
BuildRequires: xerces-j2
BuildRequires: xml-commons-resolver
%description
%{summary}.
%package -n jing
Summary: RELAX NG validator in Java
Group: Applications/Text
Requires: jpackage-utils
Requires: java%{?headless} >= 1.5.0
Requires: relaxngDatatype
Requires: xerces-j2
Requires: xml-commons-resolver
%description -n jing
Jing is a RELAX NG validator written in Java. It implements the RELAX
NG 1.0 Specification, RELAX NG Compact Syntax, and parts of RELAX NG
DTD Compatibility, specifically checking of ID/IDREF/IDREFS. It also
has experimental support for schema languages other than RELAX NG;
specifically W3C XML Schema, Schematron 1.5, and Namespace Routing
Language.
%package -n jing-javadoc
Summary: Javadoc API documentation for Jing
Group: Documentation
Requires: java-javadoc
Requires: relaxngDatatype-javadoc
%description -n jing-javadoc
Javadoc API documentation for Jing.
%package -n trang
Summary: Multi-format schema converter based on RELAX NG
Group: Applications/Text
Requires: jpackage-utils
Requires: java%{?headless} >= 1.5.0
Requires: relaxngDatatype
Requires: xerces-j2
Requires: xml-commons-resolver
%description -n trang
Trang converts between different schema languages for XML. It
supports the following languages: RELAX NG (both XML and compact
syntax), XML 1.0 DTDs, W3C XML Schema. A schema written in any of the
supported schema languages can be converted into any of the other
supported schema languages, except that W3C XML Schema is supported
for output only, not for input.
%package -n dtdinst
Summary: XML DTD to XML instance format converter
Group: Applications/Text
Requires: jpackage-utils
Requires: java%{?headless} >= 1.5.0
%description -n dtdinst
DTDinst is a program for converting XML DTDs into an XML instance
format.
%prep
%setup -q
rm -r gcj mod/datatype/src/main/org $(find . -name "*.jar")
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i -e 's/\r//g' lib/isorelax.copying.txt
# No "old" saxon available in Fedora, and "new" one can be skipped altogether
find . -name "*Saxon*.java" -delete
sed -i -e 's|"\(copying\.txt\)"|"%{_licensedir}/dtdinst/\1"|' \
dtdinst/index.html
sed -i -e 's|"\(copying\.txt\)"|"%{_licensedir}/trang/\1"|' \
trang/doc/trang.html trang/doc/trang-manual.html
%build
CLASSPATH=$(build-classpath \
beust-jcommander xalan-j2 xalan-j2-serializer) \
%ant -Dlib.dir=%{_javadir} -Dbuild.sysclasspath=last dist
%install
rm -rf $RPM_BUILD_ROOT *-%{version}
install -dm 755 $RPM_BUILD_ROOT{%{_javadir},%{_javadocdir}}
%{__unzip} build/dist/jing-%{version}.zip
install -Dpm 644 jing-%{version}/bin/jing.jar $RPM_BUILD_ROOT%{_javadir}
mv jing-%{version}/doc/api $RPM_BUILD_ROOT%{_javadocdir}/jing
ln -s %{_javadocdir}/jing jing-%{version}/doc/api
rm -f jing-%{version}/sample/datatype/datatype-sample.jar
%jpackage_script com.thaiopensource.relaxng.util.Driver "" "" jing:relaxngDatatype:xml-commons-resolver:xerces-j2 jing true
mkdir -p jing-%{version}/_licenses
mv jing-%{version}/doc/*copying.* jing-%{version}/_licenses
%{__unzip} build/dist/trang-%{version}.zip
install -pm 644 trang-%{version}/trang.jar $RPM_BUILD_ROOT%{_javadir}
%jpackage_script com.thaiopensource.relaxng.translate.Driver "" "" trang:relaxngDatatype:xml-commons-resolver:xerces-j2 trang true
%{__unzip} build/dist/dtdinst-%{version}.zip
install -pm 644 dtdinst-%{version}/dtdinst.jar $RPM_BUILD_ROOT%{_javadir}
%jpackage_script com.thaiopensource.xml.dtd.app.Driver "" "" dtdinst dtdinst true
%files -n jing
%license jing-%{version}/_licenses/*
%doc jing-%{version}/{readme.html,doc,sample}
%{_bindir}/jing
%{_javadir}/jing.jar
%files -n jing-javadoc
%license jing-%{version}/_licenses/*
%{_javadocdir}/jing/
%files -n trang
%license trang-%{version}/copying.txt
%doc trang-%{version}/*.html
%{_bindir}/trang
%{_javadir}/trang.jar
%files -n dtdinst
%license dtdinst-%{version}/copying.txt
%doc dtdinst-%{version}/*.{html,rng,xsl}
%doc dtdinst-%{version}/{dtdinst.rnc.txt,teixml.dtd.txt,example}
%{_bindir}/dtdinst
%{_javadir}/dtdinst.jar
%changelog
* Thu Aug 09 2018 Jan Pokorný <jpokorny+rpm-jing-trang@redhat.com> - 20151127-4
- Do not BuildRequire Saxon anymore
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20151127-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Ville Skyttä <ville.skytta@iki.fi> - 20151127-2
- Update to 20151127
- Clean up some obsolete specfile constructs
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20131210-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20131210-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 20131210-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Jan 26 2016 Ville Skyttä <ville.skytta@iki.fi> - 20131210-5
- Clean up pre-EL6 specfile constructs
* Wed Sep 16 2015 Ville Skyttä <ville.skytta@iki.fi> - 20131210-4
- Use new upstream github tarball
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20131210-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jan 31 2015 Ville Skyttä <ville.skytta@iki.fi> - 20131210-2
- Apply upstream BTS patch to fix build with Java 8
- Ship license files as %%license where available
* Mon Jun 9 2014 Ville Skyttä <ville.skytta@iki.fi> - 20131210-1
- Update to 20131210
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Nov 25 2013 Ville Skyttä <ville.skytta@iki.fi> - 20091111-16
- Fix build and depend on headless JRE on EL7 (Jan Pokorný).
* Fri Oct 25 2013 Ville Skyttä <ville.skytta@iki.fi> - 20091111-15
- Depend on headless JRE where available.
* Mon Aug 5 2013 Ville Skyttä <ville.skytta@iki.fi> - 20091111-14
- BuildRequire ant instead of -trax in non-EL builds.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Jan 11 2012 Ville Skyttä <ville.skytta@iki.fi> - 20091111-10
- Tweak java-devel build dep for buildability without Java 1.6.
- Fix build classpath with recent TestNG.
* Fri Jun 24 2011 Ville Skyttä <ville.skytta@iki.fi> - 20091111-9
- Apply upstream Saxon >= 9.3 patch (#716177).
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 2 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-7
- Put Xalan instead of Saxon in build path (regression in -6).
- Build with OpenJDK.
* Tue Nov 30 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-6
- Address more comments/TODO's from #655601:
- Patch test suite generation to use Xalan.
- Include license texts in jing-javadoc.
- Make datatype-sample buildable out of the box, drop prebuilt jar.
* Mon Nov 29 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-5
- Simplify doc installation (#655601).
* Sun Nov 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-4
- First Fedora build, combining my earlier separate jing and trang packages.