2017-11-30 16:06:41 +01:00
|
|
|
#
|
|
|
|
# spec file for package jing-trang
|
|
|
|
#
|
2021-06-28 08:02:02 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-11-30 16:06:41 +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.
|
|
|
|
|
2018-11-01 12:13:55 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-11-30 16:06:41 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
%global relaxng_hash 1fc8c8d337c2c75b6b15b281f2c69e86110e475f
|
2017-11-30 16:06:41 +01:00
|
|
|
Name: jing-trang
|
2021-06-28 08:02:02 +02:00
|
|
|
Version: 20181222
|
2017-11-30 16:06:41 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Schema validation and conversion based on RELAX NG
|
2017-12-01 09:55:59 +01:00
|
|
|
License: BSD-3-Clause
|
2017-12-15 09:33:21 +01:00
|
|
|
Group: Productivity/Text/Utilities
|
2021-06-28 08:02:02 +02:00
|
|
|
URL: https://github.com/relaxng/%{name}
|
|
|
|
Source0: https://github.com/relaxng/%{name}/archive/V%{version}.tar.gz
|
|
|
|
Source1: https://github.com/relaxng/relaxng.org/archive/%{relaxng_hash}.zip
|
|
|
|
Source2: https://repo1.maven.org/maven2/org/relaxng/jing/%{version}/jing-%{version}.pom
|
|
|
|
Source3: https://repo1.maven.org/maven2/org/relaxng/trang/%{version}/trang-%{version}.pom
|
|
|
|
Source10: dtdinst.1
|
2017-12-01 09:55:59 +01:00
|
|
|
#
|
2021-06-28 08:02:02 +02:00
|
|
|
Patch0: 0000-Various-build-fixes.patch
|
2017-11-30 16:06:41 +01:00
|
|
|
Patch1: 0002-Use-Xalan-instead-of-Saxon-for-the-build-655601.patch
|
2021-07-02 11:22:38 +02:00
|
|
|
Patch2: no-tests.patch
|
2021-06-28 08:02:02 +02:00
|
|
|
BuildRequires: ant >= 1.8.2
|
2021-07-02 11:22:38 +02:00
|
|
|
BuildRequires: beust-jcommander
|
|
|
|
#
|
|
|
|
BuildRequires: bsh2
|
2017-12-15 09:33:21 +01:00
|
|
|
BuildRequires: fdupes
|
2021-07-02 11:22:38 +02:00
|
|
|
BuildRequires: isorelax
|
2021-06-28 08:02:02 +02:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2017-11-30 16:06:41 +01:00
|
|
|
BuildRequires: javacc
|
2021-06-28 08:02:02 +02:00
|
|
|
BuildRequires: javapackages-local
|
2021-07-02 11:22:38 +02:00
|
|
|
BuildRequires: qdox
|
|
|
|
BuildRequires: relaxngDatatype >= 2011.1
|
|
|
|
BuildRequires: saxon6
|
|
|
|
BuildRequires: saxon9
|
2017-12-15 09:33:21 +01:00
|
|
|
BuildRequires: unzip
|
2021-07-02 11:22:38 +02:00
|
|
|
BuildRequires: xalan-j2
|
|
|
|
BuildRequires: xml-commons-apis
|
|
|
|
BuildRequires: xml-commons-resolver
|
2021-06-28 08:02:02 +02:00
|
|
|
#
|
2017-11-30 16:06:41 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
2017-12-01 09:55:59 +01:00
|
|
|
%{summary}:
|
|
|
|
|
|
|
|
jing: Schema validator
|
|
|
|
trang: Multi-format schema converter
|
|
|
|
|
2017-11-30 16:06:41 +01:00
|
|
|
%package -n jing
|
|
|
|
Summary: RELAX NG validator in Java
|
|
|
|
Group: Productivity/Text/Utilities
|
|
|
|
Requires: java-headless
|
|
|
|
Requires: jpackage-utils
|
2021-06-28 08:02:02 +02:00
|
|
|
Requires: mvn(com.github.relaxng:relaxngDatatype) >= 2011.1
|
|
|
|
Requires: mvn(xml-resolver:xml-resolver)
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%description -n jing
|
2017-12-01 09:55:59 +01:00
|
|
|
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
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%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
|
2021-06-28 08:02:02 +02:00
|
|
|
Requires: mvn(com.github.relaxng:relaxngDatatype) >= 2011.1
|
|
|
|
Requires: mvn(xerces:xercesImpl)
|
|
|
|
Requires: mvn(xml-resolver:xml-resolver)
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%description -n trang
|
2021-06-28 08:02:02 +02:00
|
|
|
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.
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%package -n dtdinst
|
|
|
|
Summary: XML DTD to XML instance format converter
|
|
|
|
Group: Productivity/Text/Utilities
|
2021-06-28 08:02:02 +02:00
|
|
|
Requires: java-headless
|
2017-11-30 16:06:41 +01:00
|
|
|
Requires: jpackage-utils
|
|
|
|
|
|
|
|
%description -n dtdinst
|
2021-06-28 08:02:02 +02:00
|
|
|
DTDinst is a program for converting XML DTDs into an XML instance format.
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%prep
|
2021-06-28 08:02:02 +02:00
|
|
|
%setup -q -a 0
|
|
|
|
rmdir relaxng.org
|
|
|
|
unzip %{SOURCE1}
|
|
|
|
mv relaxng.org-%{relaxng_hash} relaxng.org
|
2017-12-01 09:55:59 +01:00
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
cp %{SOURCE10} .
|
2017-12-01 09:55:59 +01:00
|
|
|
mv gcj/{trang,jing}.1 .
|
|
|
|
|
2017-11-30 16:06:41 +01:00
|
|
|
rm -r gcj mod/datatype/src/main/org $(find . -name "*.jar")
|
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2021-07-02 11:22:38 +02:00
|
|
|
%patch2 -p1
|
2017-11-30 16:06:41 +01:00
|
|
|
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
|
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
# The saxon9 package provides mvn(net.sf.saxon:saxon)
|
|
|
|
# instead of mvn(net.sf.saxon:Saxon-HE)
|
|
|
|
%pom_remove_dep net.sf.saxon:Saxon-HE %{SOURCE2}
|
|
|
|
%pom_add_dep net.sf.saxon:saxon %{SOURCE2}
|
|
|
|
|
2017-11-30 16:06:41 +01:00
|
|
|
%build
|
|
|
|
CLASSPATH=$(build-classpath \
|
2021-06-28 08:02:02 +02:00
|
|
|
xalan-j2 xalan-j2-serializer xerces-j2 xml-commons-apis \
|
2021-07-02 11:22:38 +02:00
|
|
|
saxon9 saxon6 relaxngDatatype beust-jcommander) \
|
2017-11-30 16:06:41 +01:00
|
|
|
%{ant} \
|
|
|
|
-Dlib.dir=%{_javadir} -Dbuild.sysclasspath=last \
|
2021-06-28 08:02:02 +02:00
|
|
|
-Dant.build.javac.source=8 -Dant.build.javac.target=8 \
|
2017-11-30 16:06:41 +01:00
|
|
|
dist
|
|
|
|
|
|
|
|
%install
|
2021-07-02 11:22:38 +02:00
|
|
|
install -dm 0755 %{buildroot}{%{_mandir}/man1,%{_javadocdir}}
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
unzip build/dist/jing-%{version}.zip
|
2021-06-28 08:02:02 +02:00
|
|
|
unzip build/dist/trang-%{version}.zip
|
|
|
|
unzip build/dist/dtdinst-%{version}.zip
|
2017-11-30 16:06:41 +01:00
|
|
|
rm -f jing-%{version}/sample/datatype/datatype-sample.jar
|
2017-12-01 09:55:59 +01:00
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
# JAR artifacts
|
2021-07-02 11:22:38 +02:00
|
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
|
|
|
|
|
|
|
install -pm 0644 jing-%{version}/bin/jing.jar %{buildroot}%{_javadir}/jing.jar
|
|
|
|
install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/jing.pom
|
|
|
|
%add_maven_depmap jing.pom jing.jar -f jing
|
|
|
|
|
|
|
|
install -pm 0644 trang-%{version}/trang.jar %{buildroot}%{_javadir}/trang.jar
|
|
|
|
install -pm 0644 %{SOURCE3} %{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
|
2021-06-28 08:02:02 +02:00
|
|
|
|
|
|
|
# API cocumentation
|
|
|
|
mv jing-%{version}/doc/api %{buildroot}%{_javadocdir}/jing
|
|
|
|
%fdupes %{buildroot}%{_javadocdir}
|
|
|
|
|
2017-12-01 09:55:59 +01:00
|
|
|
# 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
|
2017-11-30 16:06:41 +01:00
|
|
|
%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
|
|
|
|
|
2017-12-01 09:55:59 +01:00
|
|
|
%define name trang
|
2017-11-30 16:06:41 +01:00
|
|
|
%jpackage_script com.thaiopensource.relaxng.translate.Driver "" "" trang:relaxngDatatype:xml-commons-resolver:xerces-j2 trang true
|
|
|
|
|
2017-12-01 09:55:59 +01:00
|
|
|
%define name dtdinst
|
2017-11-30 16:06:41 +01:00
|
|
|
%jpackage_script com.thaiopensource.xml.dtd.app.Driver "" "" dtdinst dtdinst true
|
|
|
|
|
2017-12-01 09:55:59 +01:00
|
|
|
# Install manpages and replace @VERSION@
|
2021-06-28 08:02:02 +02:00
|
|
|
install -Dm0644 {dtdinst,jing,trang}.1 %{buildroot}%{_mandir}/man1/
|
2017-12-01 09:55:59 +01:00
|
|
|
sed -i 's/@VERSION@/%{version}/g' %{buildroot}%{_mandir}/man1/*.1
|
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
%files -n jing -f .mfiles-jing
|
2017-11-30 16:06:41 +01:00
|
|
|
%license jing-%{version}/_licenses/*
|
|
|
|
%doc jing-%{version}/{readme.html,doc,sample}
|
2021-06-28 08:02:02 +02:00
|
|
|
%{_mandir}/man1/jing.1%{?ext_man}
|
2017-11-30 16:06:41 +01:00
|
|
|
%{_bindir}/jing
|
|
|
|
|
|
|
|
%files -n jing-javadoc
|
2021-06-28 08:02:02 +02:00
|
|
|
%{_javadocdir}/jing
|
2017-11-30 16:06:41 +01:00
|
|
|
%license jing-%{version}/_licenses/*
|
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
%files -n trang -f .mfiles-trang
|
2017-11-30 16:06:41 +01:00
|
|
|
%license trang-%{version}/copying.txt
|
|
|
|
%doc trang-%{version}/*.html
|
|
|
|
%{_bindir}/trang
|
2021-06-28 08:02:02 +02:00
|
|
|
%{_mandir}/man1/trang.1%{?ext_man}
|
2017-11-30 16:06:41 +01:00
|
|
|
|
2021-06-28 08:02:02 +02:00
|
|
|
%files -n dtdinst -f .mfiles-dtdinst
|
2017-11-30 16:06:41 +01:00
|
|
|
%license dtdinst-%{version}/copying.txt
|
|
|
|
%doc dtdinst-%{version}/*.{html,rng,xsl}
|
|
|
|
%doc dtdinst-%{version}/{dtdinst.rnc.txt,teixml.dtd.txt,example}
|
|
|
|
%{_bindir}/dtdinst
|
2021-06-28 08:02:02 +02:00
|
|
|
%{_mandir}/man1/dtdinst.1%{?ext_man}
|
2017-11-30 16:06:41 +01:00
|
|
|
|
|
|
|
%changelog
|