%define javahome %{_jvmdir}/jdk Name: java-msv Version: 1.2 Release: 4mamba Summary: Sun Multi-Schema Validator Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://msv.dev.java.net # cvs -d :pserver:guest@cvs.dev.java.net:/cvs export -r msv-20050722 msv-%{version}-20090226.svn # tar zcf msv-%{version}-20090226.svn.tar.gz msv-%{version}-20090226.svn Source0: msv-%{version}-20090226.svn.tar.gz # cvs -d :pserver:guest@cvs.dev.java.net:/cvs co -r msv-20060821 msv/xsdlib/src/com/sun/msv/datatype/xsd/DateType.java # mv DateType.java msv-%{version}-20090226.svn.DateType.java Source1: msv-%{version}-20090226.svn.DateType.java Patch0: java-msv-1.2-build_xmls.patch Patch1: java-msv-1.2-disable-crimson.patch Patch2: java-msv-1.2-noclasspathsinmanifests.patch Patch3: java-msv-1.2-jdk15.patch License: BSD BuildRequires: apache-ant BuildRequires: apache-ant-junit %if "%{stage1}" != "1" BuildRequires: apache-ant-regexp BuildRequires: apache-ant-trax BuildRequires: apache-tomcat5-servletapi5 BuildRequires: java-dom BuildRequires: java-saxon6 %endif BuildRequires: java-isorelax BuildRequires: java-isorelax-javadoc BuildRequires: java-relaxngDatatype BuildRequires: java-relaxngDatatype-javadoc BuildRequires: java-junit3 BuildRequires: jpackage-utils BuildRequires: xalan-j2 BuildRequires: xerces-j2 BuildRequires: xerces-j2-javadoc-impl BuildRequires: xerces-j2-javadoc-xni BuildRequires: xerces-j2-javadoc-apis BuildRequires: xml-commons-apis BuildRequires: xml-commons-resolver Requires: jpackage-utils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description The Sun Multi-Schema XML Validator (MSV) is a Java technology tool to validate XML documents against several kinds of XML schemata. It supports RELAX NG, RELAX Namespace, RELAX Core, TREX, XML DTDs, and a subset of XML Schema Part 1. This latest (version 1.2) release includes several bug fixes and adds better conformance to RELAX NG/W3C XML standards and JAXP masquerading. This tool is: * A command line tool that can read XML documents and validate them against a schema (DTD/RELAX/TREX/W3C). If an error is found, error messages are provided. * A library that can be incorporated into Java applications as a validator. See the included commandline.html file for details on how to use MSV from the command line. See the included developer.html file for details on how to use it as a library. %package msv Summary: MSV proper Group: Development/Libraries/Java %if "%{stage1}" != "1" Requires: apache-tomcat5-servletapi5 %endif Requires: java-isorelax Requires: java-relaxngDatatype Requires: xerces-j2 Requires: xml-commons-apis Requires: xml-commons-resolver Requires: java-msv-xsdlib Requires: jpackage-utils %description msv Sun Multi-Schema Validator %package msv-javadoc Summary: Javadoc for MSV proper Group: Documentation Requires: jpackage-utils %description msv-javadoc Sun Multi-Schema Validator %package demo Summary: Samples for msv Group: Documentation Requires: java-msv-msv Requires: java-msv-xsdlib Requires: jpackage-utils %description demo Sun Multi-Schema Validator %package relames Summary: Relames Group: Development/Libraries/Java Requires: java-isorelax Requires: java-relaxngDatatype Requires: xalan-j2 Requires: xerces-j2 Requires: xml-commons-apis Requires: xml-commons-resolver Requires: java-msv-msv Requires: java-msv-xsdlib Requires: jpackage-utils %description relames Sun Multi-Schema Validator %package relames-javadoc Summary: Javadoc for relames Group: Documentation Requires: jpackage-utils %description relames-javadoc Sun Multi-Schema Validator %package rngconv Summary: Rngconv Group: Development/Libraries/Java Requires: java-isorelax Requires: java-relaxngDatatype Requires: xerces-j2 Requires: xml-commons-apis Requires: java-msv-msv Requires: java-msv-xsdlib Requires: jpackage-utils %description rngconv Sun Multi-Schema Validator %package xmlgen Summary: XmlGen Group: Development/Libraries/Java Requires: java-isorelax Requires: java-relaxngDatatype Requires: xml-commons-apis Requires: xerces-j2 Requires: java-msv-msv Requires: java-msv-xsdlib Requires: jpackage-utils %description xmlgen Sun Multi-Schema Validator %package xmlgen-javadoc Summary: Javadoc for xmlgen Group: Documentation Requires: jpackage-utils %description xmlgen-javadoc Sun Multi-Schema Validator %package xsdlib Summary: Xsdlib Group: Development/Libraries/Java Requires: java-relaxngDatatype Requires: jpackage-utils %description xsdlib Sun Multi-Schema Validator %package xsdlib-javadoc Summary: Javadoc for xsdlib Group: Documentation Requires: jpackage-utils %description xsdlib-javadoc Sun Multi-Schema Validator %package manual Summary: Documents for msv Group: Documentation Requires: jpackage-utils %description manual Sun Multi-Schema Validator %prep %setup -q -n msv-%{version}-20090226.svn cp %{S:1} xsdlib/src/com/sun/msv/datatype/xsd/DateType.java for j in $(find . -name "*.jar"); do mv $j $j.no done for m in $(find . -name MANIFEST.MF); do sed -e '/^Class-path:/d' $m > tempf cp tempf $m done rm tempf # fix encoding iconv msv/doc/copyright.txt -f iso-8859-1 -t utf-8 -o msv/doc/copyright.txt.utf8 mv msv/doc/copyright.txt.utf8 msv/doc/copyright.txt iconv relames/doc/copyright.txt -f iso-8859-1 -t utf-8 -o relames/doc/copyright.txt.utf8 mv relames/doc/copyright.txt.utf8 relames/doc/copyright.txt iconv rngconverter/doc/copyright.txt -f iso-8859-1 -t utf-8 -o rngconverter/doc/copyright.txt.utf8 mv rngconverter/doc/copyright.txt.utf8 rngconverter/doc/copyright.txt iconv generator/doc/copyright.txt -f iso-8859-1 -t utf-8 -o generator/doc/copyright.txt.utf8 mv generator/doc/copyright.txt.utf8 generator/doc/copyright.txt iconv xsdlib/doc/copyright.txt -f iso-8859-1 -t utf-8 -o xsdlib/doc/copyright.txt.utf8 mv xsdlib/doc/copyright.txt.utf8 xsdlib/doc/copyright.txt %patch0 -p0 -b .sav %patch1 -p0 -b .sav2 %patch2 %patch3 -p0 -b .sav %build pushd shared/lib ln -sf $(build-classpath ant-1.7.1) ant.jar ln -sf $(build-classpath relaxngDatatype) relaxngDatatype.jar ln -sf $(build-classpath isorelax) isorelax.jar %if "%{stage1}" != "1" ln -sf $(build-classpath ant/ant-trax) ant-trax.jar # ln -sf $(build-classpath crimson) crimson.jar # ln -sf $(build-classpath dom4j) dom4j.jar ln -sf $(build-classpath jdom-1.1) jdom.jar ln -sf $(build-classpath saxon) saxon.jar ln -sf $(build-classpath servletapi5) servlet.jar %endif ln -sf $(build-classpath junit-3.8.2) junit.jar ln -sf $(build-classpath xml-commons-resolver) resolver.jar ln -sf $(build-classpath xercesImpl) xercesImpl.jar # ln -sf $(build-classpath javacc) javacc.jar ln -sf $(build-classpath xalan-j2) xalan.jar ln -sf $(build-classpath xml-commons-apis) xmlParserAPIs.jar popd export JAVA_HOME=%javahome %if "%{stage1}" != "1" export CLASSPATH=$(build-classpath xalan-j2 xercesImpl ant/ant-apache-regexp ant/ant-junit ant/ant-trax xml-commons-resolver) %else mv shared/lib/servlet.jar.no shared/lib/servlet.jar export CLASSPATH=$(build-classpath xalan-j2 xercesImpl ant/ant-junit xml-commons-resolver) %endif ant release # cleans classes served for prebuild pushd msv/dist/examples find . -name "*.class" -exec rm -f {} \; popd pushd xsdlib/dist/examples find . -name "*.class" -exec rm -f {} \; popd %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} install -m 644 package/msv.jar \ %{buildroot}%{_javadir}/msv-msv-%{version}.jar install -m 644 package/relames.jar \ %{buildroot}%{_javadir}/msv-relames-%{version}.jar install -m 644 package/rngconv.jar \ %{buildroot}%{_javadir}/msv-rngconv-%{version}.jar install -m 644 package/xmlgen.jar \ %{buildroot}%{_javadir}/msv-xmlgen-%{version}.jar install -m 644 package/xsdlib.jar \ %{buildroot}%{_javadir}/msv-xsdlib-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) ( cd %{buildroot}%{_javadir} ln -sf msv-msv.jar msv-strict.jar ln -sf msv-xsdlib.jar xsdlib.jar ) mkdir -p %{buildroot}%{_javadocdir}/msv mkdir -p %{buildroot}%{_javadocdir}/msv/msv cp -pr msv/dist/javadoc/* \ %{buildroot}%{_javadocdir}/msv/msv mkdir -p %{buildroot}%{_javadocdir}/msv/relames cp -pr relames/dist/javadoc/* \ %{buildroot}%{_javadocdir}/msv/relames mkdir -p %{buildroot}%{_javadocdir}/msv/xmlgen cp -pr generator/dist/javadoc/* \ %{buildroot}%{_javadocdir}/msv/xmlgen mkdir -p %{buildroot}%{_javadocdir}/msv/xsdlib cp -pr xsdlib/dist/javadoc/* \ %{buildroot}%{_javadocdir}/msv/xsdlib mkdir -p %{buildroot}%{_docdir}/msv mkdir -p %{buildroot}%{_docdir}/msv/msv install -m 644 msv/doc/* \ %{buildroot}%{_docdir}/msv/msv rm %{buildroot}%{_docdir}/msv/msv/Apache-LICENSE-1.1.txt mkdir -p %{buildroot}%{_docdir}/msv/relames install -m 644 relames/doc/* \ %{buildroot}%{_docdir}/msv/relames rm %{buildroot}%{_docdir}/msv/relames/Apache-LICENSE-1.1.txt mkdir -p %{buildroot}%{_docdir}/msv/rngconv install -m 644 rngconverter/doc/* \ %{buildroot}%{_docdir}/msv/rngconv rm %{buildroot}%{_docdir}/msv/rngconv/Apache-LICENSE-1.1.txt mkdir -p %{buildroot}%{_docdir}/msv/xmlgen install -m 644 generator/doc/* \ %{buildroot}%{_docdir}/msv/xmlgen rm %{buildroot}%{_docdir}/msv/xmlgen/Apache-LICENSE-1.1.txt mkdir -p %{buildroot}%{_docdir}/msv/xsdlib install -m 644 xsdlib/doc/* \ %{buildroot}%{_docdir}/msv/xsdlib rm %{buildroot}%{_docdir}/msv/xsdlib/Apache-LICENSE-1.1.txt mkdir -p %{buildroot}%{_datadir}/msv-%{version}/msv cp -pr msv/dist/examples/* %{buildroot}%{_datadir}/msv-%{version}/msv mkdir -p %{buildroot}%{_datadir}/msv-%{version}/xsdlib cp -pr xsdlib/dist/examples/* %{buildroot}%{_datadir}/msv-%{version}/xsdlib #export CLASSPATH=$(build-classpath gnu-crypto) #%{_bindir}/aot-compile-rpm %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files msv %defattr(-,root,root) %{_javadir}/msv-msv-%{version}.jar %{_javadir}/msv-msv.jar %{_javadir}/msv-strict.jar %dir %{_docdir}/msv/msv %doc %{_docdir}/msv/msv/license.txt %doc %{_docdir}/msv/msv/copyright.txt %files msv-javadoc %defattr(-,root,root) %dir %{_javadocdir}/msv %doc %{_javadocdir}/msv/msv %files demo %defattr(-,root,root) %dir %{_datadir}/msv-%{version} %{_datadir}/msv-%{version}/msv %{_datadir}/msv-%{version}/xsdlib %files relames %defattr(-,root,root) %{_javadir}/msv-relames-%{version}.jar %{_javadir}/msv-relames.jar %doc %{_docdir}/msv/relames/copyright.txt %files relames-javadoc %defattr(-,root,root) %doc %{_javadocdir}/msv/relames %files rngconv %defattr(-,root,root) %{_javadir}/msv-rngconv-%{version}.jar %{_javadir}/msv-rngconv.jar %doc %{_docdir}/msv/rngconv/license.txt %doc %{_docdir}/msv/rngconv/copyright.txt %files xmlgen %defattr(-,root,root) %{_javadir}/msv-xmlgen-%{version}.jar %{_javadir}/msv-xmlgen.jar %doc %{_docdir}/msv/xmlgen/license.txt %doc %{_docdir}/msv/xmlgen/copyright.txt %files xmlgen-javadoc %defattr(-,root,root) %doc %{_javadocdir}/msv/xmlgen %files xsdlib %defattr(-,root,root) %{_javadir}/msv-xsdlib-%{version}.jar %{_javadir}/msv-xsdlib.jar %{_javadir}/xsdlib.jar %doc %{_docdir}/msv/xsdlib/license.txt %doc %{_docdir}/msv/xsdlib/copyright.txt %files xsdlib-javadoc %defattr(-,root,root) %doc %{_javadocdir}/msv/xsdlib %files manual %defattr(-,root,root) %dir %{_docdir}/msv/msv %doc %{_docdir}/msv/msv/ChangeLog.txt %doc %{_docdir}/msv/msv/*.html %doc %{_docdir}/msv/msv/*.gif %doc %{_docdir}/msv/msv/README.txt %dir %{_docdir}/msv/relames %doc %{_docdir}/msv/relames/README.txt %dir %{_docdir}/msv/rngconv %doc %{_docdir}/msv/rngconv/README.txt %dir %{_docdir}/msv/xmlgen %doc %{_docdir}/msv/xmlgen/*.html %doc %{_docdir}/msv/xmlgen/README.txt %dir %{_docdir}/msv/xsdlib %doc %{_docdir}/msv/xsdlib/*.html %doc %{_docdir}/msv/xsdlib/README.txt %changelog * Fri Mar 25 2011 gil 1.2-4mamba - rebuilt with java-gcj-compat support * Thu Dec 02 2010 gil 1.2-3mamba - rebuilt devel * Mon Mar 09 2009 gil 1.2-2mamba - rebuilt * Thu Feb 26 2009 gil 1.2-1mamba - package created by autospec