Blame SPECS/jing-trang.spec

993fda
# TODO:
993fda
# - Install dtdinst's schemas, XSL etc as non-doc and to system catalogs?
993fda
# - Drop isorelax and xerces license texts and references to them because
993fda
#   our package does not actually contain them?
993fda
993fda
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
993fda
%global headless -headless
993fda
%endif
993fda
993fda
Name:           jing-trang
993fda
Version:        20091111
993fda
Release:        14%{?dist}
993fda
Summary:        Schema validation and conversion based on RELAX NG
993fda
993fda
Group:          Applications/Text
993fda
License:        BSD
993fda
URL:            http://code.google.com/p/jing-trang/
993fda
# Source0 generated with Source99, upstream does not distribute archives
993fda
# containing the complete build system
993fda
Source0:        %{name}-%{version}.tar.xz
993fda
Source99:       %{name}-prepare-tarball.sh
993fda
# Applicable parts submitted upstream:
993fda
# http://code.google.com/p/jing-trang/issues/detail?id=129
993fda
# http://code.google.com/p/jing-trang/issues/detail?id=130
993fda
Patch0:         %{name}-20091111-build.patch
993fda
# Saxon "HE" doesn't work for this, no old Saxon available, details in #655601
993fda
Patch1:         %{name}-20091111-xalan.patch
993fda
Patch2:         %{name}-20091111-datatype-sample.patch
993fda
# http://code.google.com/p/jing-trang/source/detail?r=2356, #716177
993fda
Patch3:         %{name}-20091111-saxon93-716177.patch
993fda
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
993fda
BuildArch:      noarch
993fda
993fda
%if 0%{?rhel} && 0%{?rhel} < 7
993fda
BuildRequires:  ant-trax
993fda
%else
993fda
BuildRequires:  ant >= 1.8.2
993fda
%endif
993fda
BuildRequires:  bsh
993fda
BuildRequires:  isorelax
993fda
BuildRequires:  java-devel-openjdk >= 1:1.6.0
993fda
BuildRequires:  java-javadoc
993fda
BuildRequires:  javacc
993fda
BuildRequires:  jpackage-utils
993fda
BuildRequires:  qdox
993fda
BuildRequires:  relaxngDatatype
993fda
BuildRequires:  relaxngDatatype-javadoc
993fda
BuildRequires:  saxon >= 9.3
993fda
BuildRequires:  testng
993fda
BuildRequires:  xalan-j2
993fda
BuildRequires:  xerces-j2
993fda
BuildRequires:  xml-commons-resolver
993fda
993fda
%description
993fda
%{summary}.
993fda
993fda
%package     -n jing
993fda
Summary:        RELAX NG validator in Java
993fda
Group:          Applications/Text
993fda
Requires:       jpackage-utils
993fda
Requires:       java%{?headless} >= 1.5.0
993fda
Requires:       relaxngDatatype
993fda
Requires:       xerces-j2
993fda
Requires:       xml-commons-resolver
993fda
993fda
%description -n jing
993fda
Jing is a RELAX NG validator written in Java.  It implements the RELAX
993fda
NG 1.0 Specification, RELAX NG Compact Syntax, and parts of RELAX NG
993fda
DTD Compatibility, specifically checking of ID/IDREF/IDREFS.  It also
993fda
has experimental support for schema languages other than RELAX NG;
993fda
specifically W3C XML Schema, Schematron 1.5, and Namespace Routing
993fda
Language.
993fda
993fda
%package     -n jing-javadoc
993fda
Summary:        Javadoc API documentation for Jing
993fda
Group:          Documentation
993fda
Requires:       java-javadoc
993fda
Requires:       relaxngDatatype-javadoc
993fda
993fda
%description -n jing-javadoc
993fda
Javadoc API documentation for Jing.
993fda
993fda
%package     -n trang
993fda
Summary:        Multi-format schema converter based on RELAX NG
993fda
Group:          Applications/Text
993fda
Requires:       jpackage-utils
993fda
Requires:       java%{?headless} >= 1.5.0
993fda
Requires:       relaxngDatatype
993fda
Requires:       xerces-j2
993fda
Requires:       xml-commons-resolver
993fda
993fda
%description -n trang
993fda
Trang converts between different schema languages for XML.  It
993fda
supports the following languages: RELAX NG (both XML and compact
993fda
syntax), XML 1.0 DTDs, W3C XML Schema.  A schema written in any of the
993fda
supported schema languages can be converted into any of the other
993fda
supported schema languages, except that W3C XML Schema is supported
993fda
for output only, not for input.
993fda
993fda
%package     -n dtdinst
993fda
Summary:        XML DTD to XML instance format converter
993fda
Group:          Applications/Text
993fda
Requires:       jpackage-utils
993fda
Requires:       java%{?headless} >= 1.5.0
993fda
993fda
%description -n dtdinst
993fda
DTDinst is a program for converting XML DTDs into an XML instance
993fda
format.
993fda
993fda
993fda
%prep
993fda
%setup -q
993fda
%patch0 -p1
993fda
%patch1 -p0
993fda
%patch2 -p1
993fda
%patch3 -p1
993fda
sed -i -e 's/\r//g' lib/isorelax.copying.txt
993fda
find . -name "OldSaxon*.java" -delete # No "old" saxon available in Fedora
993fda
993fda
993fda
%build
993fda
CLASSPATH=$(build-classpath beust-jcommander xalan-j2 xalan-j2-serializer) \
993fda
%ant -Dlib.dir=%{_javadir} -Dbuild.sysclasspath=last dist
993fda
993fda
993fda
%install
993fda
rm -rf $RPM_BUILD_ROOT *-%{version}
993fda
993fda
install -dm 755 $RPM_BUILD_ROOT{%{_javadir},%{_javadocdir}}
993fda
993fda
%{__unzip} build/dist/jing-%{version}.zip
993fda
install -Dpm 644 jing-%{version}/bin/jing.jar $RPM_BUILD_ROOT%{_javadir}
993fda
mv jing-%{version}/doc/api $RPM_BUILD_ROOT%{_javadocdir}/jing
993fda
ln -s %{_javadocdir}/jing jing-%{version}/doc/api
993fda
rm -f jing-%{version}/sample/datatype/datatype-sample.jar
993fda
%jpackage_script com.thaiopensource.relaxng.util.Driver "" "" jing:relaxngDatatype:xml-commons-resolver:xerces-j2 jing true
993fda
993fda
%{__unzip} build/dist/trang-%{version}.zip
993fda
install -pm 644 trang-%{version}/trang.jar $RPM_BUILD_ROOT%{_javadir}
993fda
%jpackage_script com.thaiopensource.relaxng.translate.Driver "" "" trang:relaxngDatatype:xml-commons-resolver:xerces-j2 trang true
993fda
993fda
%{__unzip} build/dist/dtdinst-%{version}.zip
993fda
install -pm 644 dtdinst-%{version}/dtdinst.jar $RPM_BUILD_ROOT%{_javadir}
993fda
%jpackage_script com.thaiopensource.xml.dtd.app.Driver "" "" dtdinst dtdinst true
993fda
993fda
993fda
%clean
993fda
rm -rf $RPM_BUILD_ROOT
993fda
993fda
993fda
%files -n jing
993fda
%defattr(-,root,root,-)
993fda
%doc jing-%{version}/{readme.html,doc,sample}
993fda
%{_bindir}/jing
993fda
%{_javadir}/jing.jar
993fda
993fda
%files -n jing-javadoc
993fda
%defattr(-,root,root,-)
993fda
%doc jing-%{version}/doc/{copying.html,isorelax.copying.txt,xerces.copying.txt}
993fda
%{_javadocdir}/jing/
993fda
993fda
%files -n trang
993fda
%defattr(-,root,root,-)
993fda
%doc trang-%{version}/*.{txt,html}
993fda
%{_bindir}/trang
993fda
%{_javadir}/trang.jar
993fda
993fda
%files -n dtdinst
993fda
%defattr(-,root,root,-)
993fda
%doc dtdinst-%{version}/{*.{txt,html,rng,xsl},example}
993fda
%{_bindir}/dtdinst
993fda
%{_javadir}/dtdinst.jar
993fda
993fda
993fda
%changelog
993fda
* Tue Jan 07 2014 Jan Pokorný <jpokorny@redhat.com> - 20091111-14
993fda
- Resync with recent spec file changes in Fedora by Ville Skyttä:
993fda
- BuildRequire ant instead of -trax (non-EL).
993fda
- Depend on headless JRE where available.
993fda
- Fix build (#1048867) and depend on headless JRE on EL7
993fda
993fda
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 20091111-13
993fda
- Mass rebuild 2013-12-27
993fda
993fda
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-12
993fda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
993fda
993fda
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-11
993fda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
993fda
993fda
* Wed Jan 11 2012 Ville Skyttä <ville.skytta@iki.fi> - 20091111-10
993fda
- Tweak java-devel build dep for buildability without Java 1.6.
993fda
- Fix build classpath with recent TestNG.
993fda
993fda
* Fri Jun 24 2011 Ville Skyttä <ville.skytta@iki.fi> - 20091111-9
993fda
- Apply upstream Saxon >= 9.3 patch (#716177).
993fda
993fda
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20091111-8
993fda
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
993fda
993fda
* Thu Dec  2 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-7
993fda
- Put Xalan instead of Saxon in build path (regression in -6).
993fda
- Build with OpenJDK.
993fda
993fda
* Tue Nov 30 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-6
993fda
- Address more comments/TODO's from #655601:
993fda
- Patch test suite generation to use Xalan.
993fda
- Include license texts in jing-javadoc.
993fda
- Make datatype-sample buildable out of the box, drop prebuilt jar.
993fda
993fda
* Mon Nov 29 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-5
993fda
- Simplify doc installation (#655601).
993fda
993fda
* Sun Nov 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 20091111-4
993fda
- First Fedora build, combining my earlier separate jing and trang packages.