Sync from SUSE:ALP:Source:Standard:1.0 jing-trang revision c8540ce90de2a9e96a7f8dc1ff6311c2

This commit is contained in:
Adrian Schröter 2024-01-12 15:23:46 +01:00
commit cdc0ad6678
11 changed files with 994 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

View File

@ -0,0 +1,296 @@
From 62ad89204c223441bf540fb8b4cb5b7b0beba29b Mon Sep 17 00:00:00 2001
From: Tom Schraitle <tom_schr@web.de>
Date: Mon, 25 Jul 2022 18:30:18 +0200
Subject: [PATCH] Various build fixes
---
build.xml | 15 ++-------------
build.xsl | 17 +++++++----------
datatype-sample/build.xml | 3 ++-
mod/catalog/mod.xml | 2 +-
mod/datatype/mod.xml | 1 +
mod/jing/mod.xml | 2 --
mod/pattern/mod.xml | 1 +
mod/regex/mod.xml | 6 +++---
mod/rng-jaxp/mod.xml | 1 +
mod/rng-validate/mod.xml | 2 +-
mod/schematron/mod.xml | 2 +-
mod/trang/mod.xml | 3 +--
mod/xerces/mod.xml | 2 +-
mod/xsd-datatype/mod.xml | 1 +
14 files changed, 23 insertions(+), 35 deletions(-)
diff --git a/build.xml b/build.xml
index 31c0b64..51c695f 100644
--- a/build.xml
+++ b/build.xml
@@ -161,8 +161,7 @@
<mkdir dir="${build.dir}/api/regex"/>
<javadoc sourcepath="mod/datatype/src/main" destdir="${build.dir}/api/datatype"
additionalparam="-html5 -Xdoclint:none"
- doctitle="RELAX NG Datatype API" windowtitle="RELAX NG Datatype API"
- packagenames="org.relaxng.datatype,org.relaxng.datatype.helpers">
+ doctitle="RELAX NG Datatype API" windowtitle="RELAX NG Datatype API">
<link offline="true" href="http://java.sun.com/j2se/1.5.0/docs/api/"
packagelistLoc="extapidoc/jdk/1.5"/>
<classpath>
@@ -453,18 +452,8 @@
labels="Type-Archive, OpSys-All, Version-${version}"/>
</target>
-<target name="ant-clean"
- description="Remove almost all files created during the build process">
- <delete dir="${build.dir}"/>
- <exec executable="git">
- <arg value="clean"/>
- <arg value="-d"/>
- <arg value="--force"/>
- <arg value="${doc.dir}"/>
- </exec>
-</target>
-<target name="realclean" depends="ant-clean"
+<target name="realclean"
description="Remove all files created during the build process">
<delete>
<fileset dir="mod" includes="*/*.iml"/>
diff --git a/build.xsl b/build.xsl
index 1703937..e45acf6 100644
--- a/build.xsl
+++ b/build.xsl
@@ -4,7 +4,7 @@
<xsl:output indent="yes"
encoding="utf-8"/>
-
+
<xsl:variable name="build" select="'${build.dir}'"/>
<xsl:variable name="doc" select="'${doc.dir}'"/>
<xsl:template match="/">
@@ -23,12 +23,6 @@
<target name="dummy"/>
<target name="init">
<mkdir dir="{$build}"/>
- <exec executable="git">
- <arg value="submodule"/>
- <arg value="update"/>
- <arg value="--init"/>
- <arg value="--recursive"/>
- </exec>
<copy todir="{$doc}">
<fileset dir="relaxng.org/jclark" includes="**"/>
</copy>
@@ -165,7 +159,6 @@
<pathelement location="${{lib.dir}}/{@lib}.jar"/>
</xsl:for-each>
<xsl:if test="test[@type='testng']">
- <pathelement location="${{lib.dir}}/testng.jar"/>
</xsl:if>
</classpath>
</javac>
@@ -311,11 +304,12 @@
<xsl:if test="@lib">
<pathelement location="${{lib.dir}}/{@lib}.jar"/>
<xsl:if test="@lib='xalan'">
- <pathelement location="${{lib.dir}}/serializer.jar"/>
+ <pathelement location="${{lib.dir}}/xalan-j2-serializer.jar"/>
</xsl:if>
</xsl:if>
<xsl:if test="$app = 'jing'">
- <pathelement location="${{lib.dir}}/xercesImpl.jar"/>
+ <pathelement location="${{lib.dir}}/xerces-j2.jar"/>
+ <pathelement location="${{lib.dir}}/relaxngDatatype.jar"/>
</xsl:if>
</classpath>
</java>
@@ -397,6 +391,9 @@
<xsl:for-each select="../depends[@lib]">
<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>
</java>
</target>
diff --git a/datatype-sample/build.xml b/datatype-sample/build.xml
index 1bc068a..5ec4dd8 100644
--- a/datatype-sample/build.xml
+++ b/datatype-sample/build.xml
@@ -2,6 +2,7 @@
<property name="build.dir" value="build"/>
<property name="jing.jar" value="jing.jar"/>
+<property name="datatype.jar" value="relaxngDatatype.jar"/>
<target name="init">
<mkdir dir="${build.dir}"/>
@@ -9,7 +10,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="ant-jar" depends="compile">
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 8d304f8..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 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 1b10caa..f1bc0a4 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">
@@ -46,14 +46,14 @@
failonerror="yes">
<arg value="com.thaiopensource.datatype.xsd.regex.java.Categories"/>
<arg value="${build.dir}/mod/regex/gensrc/main"/>
- <arg value="${lib.dir}/UnicodeData-3.1.0.txt"/>
+ <arg value="lib/UnicodeData-3.1.0.txt"/>
<classpath>
<pathelement location="${build.dir}/mod/regex-gen/classes/main"/>
<pathelement location="${build.dir}/mod/util/classes/main"/>
</classpath>
</java>
</target>
-
+
<target name="mod.regex.check-gen" depends="mod.regex-gen.compile-main">
<uptodate property="mod.regex.gen-ok"
targetfile="${build.dir}/mod/regex/gensrc/main/com/thaiopensource/datatype/xsd/regex/java/Categories.java">
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 1e370c7..773b375 100644
--- a/mod/schematron/mod.xml
+++ b/mod/schematron/mod.xml
@@ -3,7 +3,7 @@
<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"
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"/>
--
2.35.3

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/relaxng/jing-trang.git</param>
<param name="revision">V20220510</param>
<param name="match-tag">V*</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">V(.*)</param>
<param name="exclude">lib/*.jar</param>
<param name="exclude">mod/datatype/src/main/org</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>

20
dtdinst.1 Normal file
View File

@ -0,0 +1,20 @@
.TH DTDINST "1" "@VERSION@" "DTDinst" "User Commands"
.SH NAME
dtdinst \- XML DTD to XML instance format converter
.SH SYNOPSIS
\fBdtdinst\fR \fB[ \-i ]\fR \fB[ \-r \fIdir\fB ]\fR \fIDTD\fR
.SH DESCRIPTION
.B dtdinst
writes an XML representation of the DTD in DTDinst format to the standard
output.
.SH OPTIONS
.TP
\fB\-r \fIdir\fR
make DTDinst write one or more files containing a RELAX NG schema to the
directory \fIdir\fR.
.TP
\fI\-i\fR
inline ATTLIST declarations. Without this option, DTDinst will generate a define
in the RELAX NG schema for each ATTLIST declaration in the DTD. With this
option, DTDinst will move the patterns generated from ATTLIST declarations into
the corresponding element pattern.

73
jing-20220510.pom Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.relaxng</groupId>
<artifactId>jing</artifactId>
<version>20220510</version>
<name>Jing</name>
<description>Jing, a tool for validating documents against RelaxNG schemas.</description>
<url>http://www.thaiopensource.com/relaxng/jing.html</url>
<licenses>
<license>
<name>3-clause BSD license</name>
<url>https://github.com/relaxng/jing-trang/blob/master/copying.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>jjc@jclark.com</id>
<name>James Clark</name>
<email>jjc@jclark.com</email>
<url>http://jclark.com/</url>
</developer>
<developer>
<id>georgebina</id>
<name>George Bina</name>
<email>george@oxygenxml.com</email>
<url>http://www.oxygenxml.com</url>
</developer>
<developer>
<id>sideshowbarker</id>
<name>Michael[tm] Smith</name>
<email>mike@w3.org</email>
<url>https://people.w3.org/mike/</url>
</developer>
</developers>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/relaxng/jing-trang/issues</url>
</issueManagement>
<scm>
<connection>scm:git:git@github.com:relaxng/jing-trang.git</connection>
<developerConnection>scm:git:git@github.com:relaxng/jing-trang.git</developerConnection>
<url>https://github.com/relaxng/jing-trang/</url>
</scm>
<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/relaxng/jing-trang</url>
</ciManagement>
<dependencies>
<dependency>
<groupId>isorelax</groupId>
<artifactId>isorelax</artifactId>
<version>20030108</version>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.6.0-4</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.0.b2</version>
</dependency>
</dependencies>
</project>

BIN
jing-trang-20220510.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

156
jing-trang.changes Normal file
View File

@ -0,0 +1,156 @@
-------------------------------------------------------------------
Tue Aug 15 18:18:54 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Build against saxon 10+
-------------------------------------------------------------------
Mon Mar 20 18:55:39 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Fetch the sources using the source service and filter out stray
binaries and other files that we don't want to distribute because
of licensing.
-------------------------------------------------------------------
Sat Jan 21 15:21:58 UTC 2023 - Thomas Schraitle <thomas.schraitle@suse.com>
- Add Maven Provides line for Jing & Trang
-------------------------------------------------------------------
Mon Jul 25 17:12:32 UTC 2022 - Thomas Schraitle <thomas.schraitle@suse.com>
- Update to 20220510
- Removed patch:
* 0002-Use-Xalan-instead-of-Saxon-for-the-build-655601.patch
Use Saxon9 instead of Xalan
- Recreated patch files
-------------------------------------------------------------------
Fri Jul 2 11:40:01 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* old-saxon.patch
+ Avoid building old saxon validator in order to avoid
dependency on old saxon6
-------------------------------------------------------------------
Fri Jul 2 09:21:15 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Do not use xmvn-tools, since this is a ring package
- Added patch:
* no-tests.patch
+ avoid unnecessary dependency on testng
-------------------------------------------------------------------
Sun Jun 27 18:54:26 UTC 2021 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v20181222
- Package maven metadata
- Use testng in build process
- Remove unneeded patches:
* jing-trang-20091111-datatype-sample.patch
* jing-trang-20151127-notestng.patch
- Modified patch:
* 0001-Various-build-fixes.patch -> 0000-Various-build-fixes.patch
-------------------------------------------------------------------
Fri Dec 7 07:31:06 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Build against xml-commons-apis instead of xerces-j2-xml-apis
-------------------------------------------------------------------
Thu Nov 1 11:09:25 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Change to build against bsh2 instead of the old bsh
-------------------------------------------------------------------
Fri Dec 1 09:33:20 UTC 2017 - thomas.schraitle@suse.com
- Fix bsc#1069796 to combine jing and trang into a single jing-trang
source package
-------------------------------------------------------------------
Wed Nov 15 13:50:44 UTC 2017 - thomas.schraitle@suse.com
- First attempt to combine jing and trang packages into a
single package on OBS
- Use patches and instructions from Fedora, but use %buildroot
instead of $RPM_BUILD_ROOT
- Install manpages for dtdinst, jing, and trang
- Use spec-cleaner
-------------------------------------------------------------------
Tue Nov 14 14:50:00 UTC 2017 - toms@opensuse.org
- Use saxon9 instead of saxon6 for jing script
- Apply spec-cleaner for spec file
-------------------------------------------------------------------
Mon Jan 26 14:25:32 UTC 2015 - toms@opensuse.org
- Fixed name of saxon jar [bsc#914681]
-------------------------------------------------------------------
Mon Sep 9 11:06:03 UTC 2013 - tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
-------------------------------------------------------------------
Thu Nov 29 15:02:09 UTC 2012 - mvyskocil@suse.com
- used saxon9 for build and as a dependency (bnc#780666)
-------------------------------------------------------------------
Sun Nov 13 19:36:49 UTC 2011 - toms@opensuse.org
- Improved jing script: use now jpackage-utils, added
xml-commons-resolver to better support catalogs
- Adapted requires and buildrequires in spec file
- Updated documentation
* explained -C and -s options, removed obsolete -f
* updated version
-------------------------------------------------------------------
Mon Mar 15 16:46:41 CET 2010 - prusnak@suse.cz
- updated to 20091111
* add -C option to specify the catalog
* fix schematron test suite schema
* provide a resolver that implements OASIS XML catalogs
* take advantage of Java 5 features
-------------------------------------------------------------------
Wed Mar 18 15:14:29 CET 2009 - prusnak@suse.cz
- added documentation (manpage) by Thomas Schraitle
-------------------------------------------------------------------
Thu Nov 27 14:38:07 CET 2008 - prusnak@suse.cz
- updated to 20081028
-------------------------------------------------------------------
Tue Feb 19 16:02:09 CET 2008 - prusnak@suse.cz
- fixed build
-------------------------------------------------------------------
Thu Mar 29 17:46:49 CEST 2007 - rguenther@suse.de
- add unzip BuildRequires
-------------------------------------------------------------------
Wed Jan 25 21:46:46 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Jun 6 14:18:13 CEST 2005 - ke@suse.de
- Add wrapper script; proposed by Martin Vidner.
-------------------------------------------------------------------
Fri Jun 3 11:15:16 CEST 2005 - ke@suse.de
- New package: jing version 20030619.

212
jing-trang.spec Normal file
View File

@ -0,0 +1,212 @@
#
# spec file for package jing-trang
#
# Copyright (c) 2023 SUSE LLC
#
# 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: jing-trang
Version: 20220510
Release: 0
Summary: Schema validation and conversion based on RELAX NG
License: BSD-3-Clause
Group: Productivity/Text/Utilities
URL: https://github.com/relaxng/%{name}
Source0: %{name}-%{version}.tar.xz
Source1: https://repo1.maven.org/maven2/org/relaxng/jing/%{version}/jing-%{version}.pom
Source2: https://repo1.maven.org/maven2/org/relaxng/trang/%{version}/trang-%{version}.pom
Source10: dtdinst.1
#
Patch0: 0000-Various-build-fixes.patch
Patch2: no-tests.patch
Patch3: old-saxon.patch
BuildRequires: ant >= 1.8.2
#
BuildRequires: bsh2
BuildRequires: fdupes
BuildRequires: isorelax
BuildRequires: java-devel >= 1.8
BuildRequires: javacc
BuildRequires: javapackages-local >= 6
BuildRequires: qdox
BuildRequires: relaxngDatatype >= 2011.1
BuildRequires: saxon10
BuildRequires: unzip
BuildRequires: xalan-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-resolver
#
BuildArch: noarch
%description
%{summary}:
jing: Schema validator
trang: Multi-format schema converter
%package -n jing
Summary: RELAX NG validator in Java
Group: Productivity/Text/Utilities
Requires: java-headless
Requires: jpackage-utils
Requires: mvn(com.github.relaxng:relaxngDatatype) >= 2011.1
Requires: mvn(xml-resolver:xml-resolver)
Provides: mvn(com.thaiopensource:jing)
Provides: mvn(org.relaxng:jing) = %{version}
%description -n jing
jing is an XML validator implemented in Java. It validates against the
RELAX NG schema language and implements the following specifications:
* RELAX NG 1.0 Specification
* RELAX NG Compact Syntax
* Parts of RELAX NG DTD Compatibility (checking of ID/IDREF/IDREFS)
It also comes with experimental support for schema languages other than
RELAX NG:
* W3C XML Schema (based on Xerces-J)
* Schematron 1.5
* Namespace Routing Language
%package -n jing-javadoc
Summary: Javadoc API documentation for Jing
Group: Documentation/HTML
%description -n jing-javadoc
Javadoc API documentation for Jing.
%package -n trang
Summary: Multi-format schema converter based on RELAX NG
Group: Productivity/Text/Utilities
Requires: java-headless
Requires: jpackage-utils
Requires: mvn(com.github.relaxng:relaxngDatatype) >= 2011.1
Requires: mvn(xerces:xercesImpl)
Requires: mvn(xml-resolver:xml-resolver)
Provides: mvn(com.thaiopensource:trang)
Provides: mvn(org.relaxng:trang) = %{version}
%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: Productivity/Text/Utilities
Requires: java-headless
Requires: jpackage-utils
%description -n dtdinst
DTDinst is a program for converting XML DTDs into an XML instance format.
%prep
%setup -q
cp %{SOURCE1} jing.pom
cp %{SOURCE2} trang.pom
cp %{SOURCE10} .
mv gcj/{trang,jing}.1 .
%patch0 -p1
%patch2 -p1
%patch3 -p1
rm -f \
mod/schematron/src/main/com/thaiopensource/validate/schematron/OldSaxonSchemaReaderFactory.java
sed -i -e 's/\r//g' lib/isorelax.copying.txt
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 \
xalan-j2 xalan-j2-serializer xerces-j2 xml-commons-apis \
saxon10 relaxngDatatype) \
%{ant} \
-Dlib.dir=%{_javadir} -Dbuild.sysclasspath=last \
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
dist
%install
install -dm 0755 %{buildroot}{%{_mandir}/man1,%{_javadocdir}}
unzip build/dist/jing-%{version}.zip
unzip build/dist/trang-%{version}.zip
unzip build/dist/dtdinst-%{version}.zip
rm -f jing-%{version}/sample/datatype/datatype-sample.jar
# JAR artifacts
install -dm 0755 %{buildroot}%{_javadir}
install -dm 0755 %{buildroot}%{_mavenpomdir}
install -pm 0644 jing-%{version}/bin/jing.jar %{buildroot}%{_javadir}/jing.jar
%mvn_install_pom jing.pom %{buildroot}%{_mavenpomdir}/jing.pom
%add_maven_depmap jing.pom jing.jar -f jing
install -pm 0644 trang-%{version}/trang.jar %{buildroot}%{_javadir}/trang.jar
%mvn_install_pom trang.pom %{buildroot}%{_mavenpomdir}/trang.pom
%add_maven_depmap trang.pom trang.jar -f trang
install -pm 0644 dtdinst-%{version}/dtdinst.jar %{buildroot}%{_javadir}/dtdinst.jar
%add_maven_depmap org.relaxng:dtdinst:%{version} dtdinst.jar -f dtdinst
# API cocumentation
mv jing-%{version}/doc/api %{buildroot}%{_javadocdir}/jing
%fdupes %{buildroot}%{_javadocdir}
# We need to redefine name here to make jpackage_script aware of
# the correct name, otherwise it would use "jing-trang" in configuration names etc.
%define name jing
%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
%define name trang
%jpackage_script com.thaiopensource.relaxng.translate.Driver "" "" trang:relaxngDatatype:xml-commons-resolver:xerces-j2 trang true
%define name dtdinst
%jpackage_script com.thaiopensource.xml.dtd.app.Driver "" "" dtdinst dtdinst true
# Install manpages and replace @VERSION@
install -Dm0644 {dtdinst,jing,trang}.1 %{buildroot}%{_mandir}/man1/
sed -i 's/@VERSION@/%{version}/g' %{buildroot}%{_mandir}/man1/*.1
%files -n jing -f .mfiles-jing
%license jing-%{version}/_licenses/*
%doc jing-%{version}/{readme.html,doc,sample}
%{_mandir}/man1/jing.1%{?ext_man}
%{_bindir}/jing
%files -n jing-javadoc
%{_javadocdir}/jing
%license jing-%{version}/_licenses/*
%files -n trang -f .mfiles-trang
%license trang-%{version}/copying.txt
%doc trang-%{version}/*.html
%{_bindir}/trang
%{_mandir}/man1/trang.1%{?ext_man}
%files -n dtdinst -f .mfiles-dtdinst
%license dtdinst-%{version}/copying.txt
%doc dtdinst-%{version}/*.{html,rng,xsl}
%doc dtdinst-%{version}/{dtdinst.rnc.txt,teixml.dtd.txt,example}
%{_bindir}/dtdinst
%{_mandir}/man1/dtdinst.1%{?ext_man}
%changelog

123
no-tests.patch Normal file
View File

@ -0,0 +1,123 @@
From 1c6338f2640ed9e7a93f84986d3019a22450515a Mon Sep 17 00:00:00 2001
From: Tom Schraitle <tom_schr@web.de>
Date: Mon, 25 Jul 2022 19:08:57 +0200
Subject: [PATCH] No tests
---
build.xml | 2 +-
build.xsl | 6 +-----
mod/catalog/mod.xml | 3 +--
mod/infer/mod.xml | 3 +--
mod/pattern/mod.xml | 3 +--
mod/rng-jaxp/mod.xml | 3 +--
mod/util/mod.xml | 3 +--
mod/xsd-datatype/mod.xml | 4 +---
8 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/build.xml b/build.xml
index 51c695f..b88d420 100644
--- a/build.xml
+++ b/build.xml
@@ -409,7 +409,7 @@
<gzip zipfile="${build.dir}/dist/relaxng.tar.gz" src="${build.dir}/relaxng.tar"/>
</target>
-<target name="dist" depends="ant-test,validate,jing-dist,trang-dist,dtdinst-dist,website"
+<target name="dist" depends="validate,jing-dist,trang-dist,dtdinst-dist,website"
description="Make a distribution, leaving artifacts in ${build.dir}/dist"/>
<target name="googlecode.properties.available">
diff --git a/build.xsl b/build.xsl
index e45acf6..334b1a6 100644
--- a/build.xsl
+++ b/build.xsl
@@ -15,11 +15,7 @@
<property name="javacc.dir" value="${{lib.dir}}"/>
<property name="ant.build.javac.source" value="8"/>
<property name="ant.build.javac.target" value="1.8"/>
- <taskdef name="testng" classname="org.testng.TestNGAntTask">
- <classpath>
- <pathelement location="${{lib.dir}}/testng.jar"/>
- </classpath>
- </taskdef>
+
<target name="dummy"/>
<target name="init">
<mkdir dir="{$build}"/>
diff --git a/mod/catalog/mod.xml b/mod/catalog/mod.xml
index 5398646..ae21910 100644
--- a/mod/catalog/mod.xml
+++ b/mod/catalog/mod.xml
@@ -1,6 +1,5 @@
<module>
- <compile test="yes"/>
- <test name="unit" type="testng"/>
+ <compile test="no"/>
<depends module="util"/>
<depends module="resolver"/>
<depends lib="xml-commons-resolver"/>
diff --git a/mod/infer/mod.xml b/mod/infer/mod.xml
index 8a781e9..e997d69 100644
--- a/mod/infer/mod.xml
+++ b/mod/infer/mod.xml
@@ -4,6 +4,5 @@
<depends module="datatype"/>
<depends module="xsd-datatype"/>
<depends module="regex"/>
- <compile test="yes"/>
- <test name="unit" type="testng"/>
+ <compile test="no"/>
</module>
diff --git a/mod/pattern/mod.xml b/mod/pattern/mod.xml
index 875f1cb..1f1f199 100644
--- a/mod/pattern/mod.xml
+++ b/mod/pattern/mod.xml
@@ -4,6 +4,5 @@
<depends module="datatype"/>
<depends module="rng-parse"/>
<depends lib="relaxngDatatype"/>
- <compile test="yes"/>
- <test name="unit" type="testng"/>
+ <compile test="no"/>
</module>
diff --git a/mod/rng-jaxp/mod.xml b/mod/rng-jaxp/mod.xml
index 48c5d8c..c387216 100644
--- a/mod/rng-jaxp/mod.xml
+++ b/mod/rng-jaxp/mod.xml
@@ -8,6 +8,5 @@
<depends module="pattern"/>
<depends module="jaxp"/>
<depends lib="relaxngDatatype"/>
- <compile test="yes"/>
- <test name="unit" type="testng"/>
+ <compile test="no"/>
</module>
diff --git a/mod/util/mod.xml b/mod/util/mod.xml
index d9e1853..5317816 100644
--- a/mod/util/mod.xml
+++ b/mod/util/mod.xml
@@ -1,5 +1,4 @@
<module>
- <compile test="yes"/>
- <test name="unit" type="testng"/>
+ <compile test="no"/>
</module>
diff --git a/mod/xsd-datatype/mod.xml b/mod/xsd-datatype/mod.xml
index cc7645b..2d717b3 100644
--- a/mod/xsd-datatype/mod.xml
+++ b/mod/xsd-datatype/mod.xml
@@ -3,9 +3,7 @@
<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"/>
+ <compile test="no"/>
<service type="org.relaxng.datatype.DatatypeLibraryFactory">
<provider classname="com.thaiopensource.datatype.xsd.DatatypeLibraryFactoryImpl"/>
</service>
--
2.35.3

20
old-saxon.patch Normal file
View File

@ -0,0 +1,20 @@
--- jing-trang-20181222/mod/schematron/mod.xml 2018-12-21 23:36:19.000000000 +0100
+++ jing-trang-20181222/mod/schematron/mod.xml 2021-07-02 13:29:44.941625566 +0200
@@ -6,9 +6,6 @@
<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"/>
@@ -39,7 +36,6 @@
<compile/>
<service type="com.thaiopensource.validate.SchemaReaderFactory">
<provider classname="com.thaiopensource.validate.schematron.NewSaxonSchemaReaderFactory"/>
- <provider classname="com.thaiopensource.validate.schematron.OldSaxonSchemaReaderFactory"/>
<provider classname="com.thaiopensource.validate.schematron.XalanSchemaReaderFactory"/>
<provider classname="com.thaiopensource.validate.schematron.SchematronSchemaReaderFactory"/>
</service>

51
trang-20220510.pom Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.relaxng</groupId>
<artifactId>trang</artifactId>
<version>20220510</version>
<name>Trang</name>
<description>Trang, a multi-format schema converter based on RELAX NG.</description>
<url>http://www.thaiopensource.com/relaxng/trang.html</url>
<licenses>
<license>
<name>3-clause BSD license</name>
<url>https://github.com/relaxng/jing-trang/blob/master/copying.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>jjc@jclark.com</id>
<name>James Clark</name>
<email>jjc@jclark.com</email>
<url>http://jclark.com/</url>
</developer>
<developer>
<id>georgebina</id>
<name>George Bina</name>
<email>george@oxygenxml.com</email>
<url>http://www.oxygenxml.com</url>
</developer>
<developer>
<id>sideshowbarker</id>
<name>Michael[tm] Smith</name>
<email>mike@w3.org</email>
<url>https://people.w3.org/mike/</url>
</developer>
</developers>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/relaxng/jing-trang/issues</url>
</issueManagement>
<scm>
<connection>scm:git:git@github.com:relaxng/jing-trang.git</connection>
<developerConnection>scm:git:git@github.com:relaxng/jing-trang.git</developerConnection>
<url>https://github.com/relaxng/jing-trang/</url>
</scm>
<ciManagement>
<system>Travis CI</system>
<url>https://travis-ci.org/relaxng/jing-trang</url>
</ciManagement>
</project>