Blame SPECS/jing-trang.spec

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