6f4f13
%global __requires_exclude ^mvn\\(org\\.apache\\.ant:ant\\)$
6f4f13
6f4f13
Name:          msv
6f4f13
Epoch:         1
6f4f13
Version:       2013.5.1
6f4f13
Release:       7%{?dist}
6f4f13
Summary:       Multi-Schema Validator
6f4f13
Group:         Development/Libraries
6f4f13
License:       BSD and ASL 1.1
6f4f13
URL:           http://msv.java.net/
6f4f13
6f4f13
# To generate tarball from upstream source control:
6f4f13
# $ ./create-tarball
6f4f13
Source0:       %{name}-%{version}-clean.tar.gz
6f4f13
6f4f13
# Parent POM is no longer in svn, get it from Maven central repository
6f4f13
Source1:       http://repo1.maven.org/maven2/net/java/dev/%{name}/%{name}-parent/2009.1/%{name}-parent-2009.1.pom
6f4f13
6f4f13
Source2:       http://www.apache.org/licenses/LICENSE-2.0.txt
6f4f13
Source3:       create-tarball.sh
6f4f13
6f4f13
# Use CatalogResolver from xml-commons-resolver package
6f4f13
Patch1:        %{name}-Use-CatalogResolver-class-from-xml-commons-resolver.patch
6f4f13
6f4f13
BuildRequires: java-devel
6f4f13
BuildRequires: java-javadoc
6f4f13
BuildRequires: jpackage-utils
6f4f13
BuildRequires: maven-local
6f4f13
BuildRequires: maven-compiler-plugin
6f4f13
BuildRequires: maven-install-plugin
6f4f13
BuildRequires: maven-jar-plugin
6f4f13
BuildRequires: maven-javadoc-plugin
6f4f13
BuildRequires: maven-resources-plugin
6f4f13
BuildRequires: maven-site-plugin
6f4f13
BuildRequires: maven-surefire-plugin
6f4f13
BuildRequires: maven-surefire-provider-junit4
6f4f13
BuildRequires: maven-plugin-build-helper
6f4f13
BuildRequires: isorelax
6f4f13
BuildRequires: isorelax-javadoc
6f4f13
BuildRequires: relaxngDatatype
6f4f13
BuildRequires: relaxngDatatype-javadoc
6f4f13
BuildRequires: xalan-j2
6f4f13
BuildRequires: xerces-j2
6f4f13
BuildRequires: junit
6f4f13
BuildRequires: jvnet-parent
6f4f13
BuildRequires: xml-commons-resolver
6f4f13
BuildRequires: isorelax
6f4f13
6f4f13
BuildArch:     noarch
6f4f13
6f4f13
Obsoletes:     %{name}-relames < %{version}-%{release}
6f4f13
6f4f13
%description
6f4f13
The Sun Multi-Schema XML Validator (MSV) is a Java technology tool to validate
6f4f13
XML documents against several kinds of XML schemata. It supports RELAX NG,
6f4f13
RELAX Namespace, RELAX Core, TREX, XML DTDs, and a subset of XML Schema Part 1.
6f4f13
This latest (version 1.2) release includes several bug fixes and adds better
6f4f13
conformance to RELAX NG/W3C XML standards and JAXP masquerading.
6f4f13
6f4f13
%package       msv
6f4f13
Summary:       Multi-Schema Validator Core
6f4f13
Group:         Development/Libraries
6f4f13
# src/com/sun/msv/reader/xmlschema/DOMLSInputImpl.java is under ASL 2.0
6f4f13
# msv/src/com/sun/msv/writer/ContentHandlerAdaptor.java is partially under Public Domain
6f4f13
License:       BSD and ASL 1.1 and ASL 2.0 and Public Domain
6f4f13
6f4f13
%description   msv
6f4f13
%{summary}.
6f4f13
6f4f13
%package       rngconv
6f4f13
Summary:       Multi-Schema Validator RNG Converter
6f4f13
Group:         Development/Libraries
6f4f13
6f4f13
%description   rngconv
6f4f13
%{summary}.
6f4f13
6f4f13
%package       xmlgen
6f4f13
Summary:       Multi-Schema Validator Generator
6f4f13
Group:         Development/Libraries
6f4f13
6f4f13
%description    xmlgen
6f4f13
%{summary}.
6f4f13
6f4f13
%package       xsdlib
6f4f13
Summary:       Multi-Schema Validator XML Schema Library
6f4f13
Group:         Development/Libraries
6f4f13
6f4f13
%description   xsdlib
6f4f13
%{summary}.
6f4f13
6f4f13
%package       javadoc
6f4f13
Summary:       API documentation for Multi-Schema Validator
6f4f13
Group:         Documentation
6f4f13
License:       BSD and ASL 1.1 and ASL 2.0 and Public Domain
6f4f13
6f4f13
%description   javadoc
6f4f13
%{summary}.
6f4f13
6f4f13
%package       manual
6f4f13
Summary:       Manual for Multi-Schema Validator
6f4f13
Group:         Documentation
6f4f13
License:       BSD
6f4f13
6f4f13
%description   manual
6f4f13
%{summary}.
6f4f13
6f4f13
%package       demo
6f4f13
Summary:       Samples for Multi-Schema Validator
6f4f13
Group:         Documentation
6f4f13
License:       BSD
6f4f13
Requires:      msv-msv
6f4f13
Requires:      msv-xsdlib
6f4f13
6f4f13
%description   demo
6f4f13
%{summary}.
6f4f13
6f4f13
%prep
6f4f13
%setup -q
6f4f13
6f4f13
# We don't have this plugin
6f4f13
%pom_remove_plugin :buildnumber-maven-plugin
6f4f13
6f4f13
# Needed becuase of patch3
6f4f13
%pom_add_dep xml-resolver:xml-resolver
6f4f13
6f4f13
cp %{SOURCE1} parent-pom.xml
6f4f13
6f4f13
# ASL 2.0 license text
6f4f13
cp %{SOURCE2} Apache-LICENSE-2.0.txt
6f4f13
6f4f13
# Delete anything pre-compiled
6f4f13
find -name '*.class' -exec rm -f '{}' \;
6f4f13
find -name '*.jar' -exec rm -f '{}' \;
6f4f13
find -name '*.zip' -exec rm -f '{}' \;
6f4f13
6f4f13
# Delete class-path entries from manifests
6f4f13
for m in $(find . -name MANIFEST.MF) ; do
6f4f13
  sed --in-place -e '/^[Cc]lass-[Pp]ath:/d' $m
6f4f13
done
6f4f13
6f4f13
# Apply patches
6f4f13
%patch1 -p1
6f4f13
6f4f13
# Fix isorelax groupId
6f4f13
%pom_xpath_replace "pom:dependency[pom:groupId[text()='com.sun.xml.bind.jaxb']]/pom:groupId" "<groupId>isorelax</groupId>"
6f4f13
%pom_xpath_replace "pom:dependency[pom:groupId[text()='com.sun.xml.bind.jaxb']]/pom:groupId" "<groupId>isorelax</groupId>" generator
6f4f13
%pom_xpath_replace "pom:dependency[pom:groupId[text()='com.sun.xml.bind.jaxb']]/pom:groupId" "<groupId>isorelax</groupId>" msv
6f4f13
%pom_xpath_replace "pom:dependency[pom:groupId[text()='com.sun.xml.bind.jaxb']]/pom:groupId" "<groupId>isorelax</groupId>" rngconverter
6f4f13
%pom_xpath_replace "pom:dependency[pom:groupId[text()='com.sun.xml.bind.jaxb']]/pom:groupId" "<groupId>isorelax</groupId>" xsdlib
6f4f13
6f4f13
# Change encoding of non utf-8 files
6f4f13
for m in $(find . -name copyright.txt) ; do
6f4f13
  iconv -f iso-8859-1 -t utf-8 < $m > $m.utf8
6f4f13
  mv $m.utf8 $m
6f4f13
done
6f4f13
6f4f13
%mvn_file ":%{name}-core" %{name}-core %{name}-%{name}
6f4f13
%mvn_file ":%{name}-rngconverter" %{name}-rngconverter %{name}-rngconv
6f4f13
%mvn_file ":%{name}-generator" %{name}-generator %{name}-xmlgen
6f4f13
%mvn_file ":xsdlib" xsdlib %{name}-xsdlib
6f4f13
6f4f13
%mvn_alias ":xsdlib" "com.sun.msv.datatype.xsd:xsdlib"
6f4f13
6f4f13
%mvn_package ":%{name}" %{name}-msv
6f4f13
%mvn_package ":%{name}-core" %{name}-msv
6f4f13
%mvn_package ":%{name}-testharness" %{name}-msv
6f4f13
%mvn_package ":%{name}-rngconverter" %{name}-rngconv
6f4f13
%mvn_package ":%{name}-generator" %{name}-xmlgen
6f4f13
%mvn_package ":xsdlib" %{name}-xsdlib
6f4f13
6f4f13
%build
6f4f13
%mvn_build -s
6f4f13
6f4f13
%install
6f4f13
%mvn_install
6f4f13
6f4f13
# parent POM
6f4f13
install -pD -T -m 644 parent-pom.xml       %{buildroot}%{_mavenpomdir}/JPP-msv-parent.pom
6f4f13
%add_maven_depmap JPP-%{name}-parent.pom
6f4f13
6f4f13
# Manuals
6f4f13
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}/msv
6f4f13
install -m 644 msv/doc/*.html     %{buildroot}%{_docdir}/%{name}-%{version}/msv
6f4f13
install -m 644 msv/doc/*.gif      %{buildroot}%{_docdir}/%{name}-%{version}/msv
6f4f13
install -m 644 msv/doc/README.txt %{buildroot}%{_docdir}/%{name}-%{version}/msv
6f4f13
6f4f13
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}/rngconverter
6f4f13
install -m 644 rngconverter/README.txt %{buildroot}%{_docdir}/%{name}-%{version}/rngconverter
6f4f13
6f4f13
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}/generator
6f4f13
install -m 644 generator/*.html     %{buildroot}%{_docdir}/%{name}-%{version}/generator
6f4f13
install -m 644 generator/README.txt %{buildroot}%{_docdir}/%{name}-%{version}/generator
6f4f13
6f4f13
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}/xsdlib
6f4f13
install -m 644 xsdlib/*.html     %{buildroot}%{_docdir}/%{name}-%{version}/xsdlib
6f4f13
install -m 644 xsdlib/README.txt %{buildroot}%{_docdir}/%{name}-%{version}/xsdlib
6f4f13
6f4f13
# Examples
6f4f13
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/msv
6f4f13
cp -pr msv/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/msv
6f4f13
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
6f4f13
cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
6f4f13
6f4f13
# Scripts
6f4f13
%jpackage_script com.sun.msv.driver.textui.Driver "" "" msv-msv:msv-xsdlib:relaxngDatatype:isorelax msv true
6f4f13
%jpackage_script com.sun.msv.generator.Driver "" "" msv-xmlgen:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 xmlgen true
6f4f13
%jpackage_script com.sun.msv.writer.relaxng.Driver "" "" msv-rngconv:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 rngconv true
6f4f13
6f4f13
%files msv -f .mfiles-msv-msv
6f4f13
%{_bindir}/msv
6f4f13
%doc License.txt
6f4f13
%doc msv/doc/Apache-LICENSE-1.1.txt
6f4f13
%doc Apache-LICENSE-2.0.txt
6f4f13
6f4f13
%files rngconv -f .mfiles-msv-rngconv
6f4f13
%{_bindir}/rngconv
6f4f13
%doc msv/doc/Apache-LICENSE-1.1.txt
6f4f13
%doc License.txt
6f4f13
6f4f13
%files xmlgen -f .mfiles-msv-xmlgen
6f4f13
%{_bindir}/xmlgen
6f4f13
%doc msv/doc/Apache-LICENSE-1.1.txt
6f4f13
%doc License.txt
6f4f13
6f4f13
%files xsdlib -f .mfiles-msv-xsdlib
6f4f13
%doc msv/doc/Apache-LICENSE-1.1.txt
6f4f13
%doc License.txt
6f4f13
%{_mavenpomdir}/JPP-%{name}-parent.pom
6f4f13
%{_mavendepmapfragdir}/msv
6f4f13
6f4f13
%files javadoc -f .mfiles-javadoc
6f4f13
%doc License.txt
6f4f13
%doc msv/doc/Apache-LICENSE-1.1.txt
6f4f13
%doc Apache-LICENSE-2.0.txt
6f4f13
6f4f13
%files manual
6f4f13
%doc %{_docdir}/%{name}-%{version}
6f4f13
%doc License.txt
6f4f13
6f4f13
%files demo
6f4f13
%{_datadir}/%{name}-%{version}
6f4f13
6f4f13
%changelog
6f4f13
* Tue Mar 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2013.5.1-7
6f4f13
- Remove requires on ant
6f4f13
- Resolves: rhbz#1284579
6f4f13
6f4f13
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:2013.5.1-6
6f4f13
- Mass rebuild 2013-12-27
6f4f13
6f4f13
* Tue Aug 27 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-5
6f4f13
- Migrate away from mvn-rpmbuild (Resolves: #997443)
6f4f13
6f4f13
* Thu Aug 01 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-4
6f4f13
- Fix license tag (+Public Domain)
6f4f13
- Add create-tarball.sh to SRPM
6f4f13
6f4f13
* Wed Jul 31 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-3
6f4f13
- Do not build module with unclear licensing (relames)
6f4f13
- Replace %%add_to_maven_depmap with %%add_maven_depmap
6f4f13
6f4f13
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2013.5.1-2
6f4f13
- Rebuild to regenerate API documentation
6f4f13
- Resolves: CVE-2013-1571
6f4f13
6f4f13
* Fri Jun 07 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-1
6f4f13
- Update to latest upstream version 2013.5.1
6f4f13
- Clean up tarball
6f4f13
- Fix BR/R
6f4f13
6f4f13
* Fri Apr 12 2013 Michal Srb <msrb@redhat.com> - 1:2013.2.3-3
6f4f13
- Fix license tags in javadoc, manual, demo subpackages
6f4f13
6f4f13
* Fri Apr 12 2013 Michal Srb <msrb@redhat.com> - 1:2013.2.3-2
6f4f13
- Fix license tag for msv subpackage
6f4f13
- Remove unneeded patches
6f4f13
6f4f13
* Thu Apr 11 2013 Michal Srb <msrb@redhat.com> - 1:2013.2.3-1
6f4f13
- Update to upstream version 2013.2.3
6f4f13
- Resolves: rhbz#876845
6f4f13
- Fix URL and license tag
6f4f13
6f4f13
* Mon Feb 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:2009.1-14
6f4f13
- Add missing BR: maven-local
6f4f13
6f4f13
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2009.1-13
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6f4f13
6f4f13
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2009.1-12
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6f4f13
6f4f13
* Fri Apr 6 2012 Alexander Kurtakov <akurtako@redhat.com> 1:2009.1-11
6f4f13
- Drop unneeded BR/R.
6f4f13
6f4f13
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2009.1-10
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6f4f13
6f4f13
* Tue Nov 29 2011 Alexander Kurtakov <akurtako@redhat.com> 1:2009.1-9
6f4f13
- Build with maven 3.
6f4f13
- Adapt to current guidelines.
6f4f13
6f4f13
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2009.1-8
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6f4f13
6f4f13
* Tue Nov  2 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:2009.1-7
6f4f13
- Add msv, relames, xmlgen, and rngconv command line scripts.
6f4f13
6f4f13
* Thu Oct 28 2010 Alexander Kurtakov <akurtako@redhat.com> 1:2009.1-6
6f4f13
- BR junit4.
6f4f13
6f4f13
* Thu Oct 28 2010 Alexander Kurtakov <akurtako@redhat.com> 1:2009.1-5
6f4f13
- Fix depmaps and install jars required by msv.pom.
6f4f13
6f4f13
* Fri Sep 24 2010 Mat Booth <fedora@matbooth.co.uk> - 1:2009.1-4
6f4f13
- Really require a version of xml-commons-resolver that provides the necessary
6f4f13
  maven pom and depmap.
6f4f13
6f4f13
* Sun Sep 19 2010 Mat Booth <fedora@matbooth.co.uk> - 1:2009.1-3
6f4f13
- Require a version of xml-commons-resolver that provides the necessary maven
6f4f13
  pom and depmap.
6f4f13
6f4f13
* Sun Sep 19 2010 Mat Booth <fedora@matbooth.co.uk> - 1:2009.1-2
6f4f13
- Re-patch build to link to local javadocs.
6f4f13
- Install maven poms/depmap.
6f4f13
6f4f13
* Thu Sep 16 2010 Mat Booth <fedora@matbooth.co.uk> - 1:2009.1-1
6f4f13
- Update to latest tagged release.
6f4f13
- Drop support for GCJ ahead of time compilation.
6f4f13
- Fix RHBZ #627688, RHBZ #631076
6f4f13
- This project now builds with maven instead of ant.
6f4f13
- The new build in this release aggregates javadocs, so now we have one javadoc
6f4f13
  package that obsoletes the many javadoc packages we had before.
6f4f13
- Use new jar names that upstream use, provide the old names.
6f4f13
- Misc other changes for guideline compliance.
6f4f13
6f4f13
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2-0.4.20050722.3.4.1
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6f4f13
6f4f13
* Fri May 08 2009 Karsten Hopp <karsten@redhat.com> 1.2-0.3.20050722.3.4.1
6f4f13
- Specify source and target as 1.4 to make it build
6f4f13
6f4f13
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.2-0.3.20050722.3.4
6f4f13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6f4f13
6f4f13
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1:1.2-0.2.20050722.3.4
6f4f13
- drop repotag
6f4f13
6f4f13
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:1.2-0.2.20050722.3jpp.3
6f4f13
- Autorebuild for GCC 4.3
6f4f13
6f4f13
* Wed Sep 12 2007 Matt Wringe <mwringe@redhat.com> 0:1,2-0.1.20050722.3jpp.3
6f4f13
- Make package build with new gcj. Remove .class files from demo package and
6f4f13
  remove demo exclude from aot-compile-rpm 
6f4f13
6f4f13
* Tue Sep 11 2007 Matt Wringe <mwringe@redhat.com> 0:1.2-0.1.20050722.3jpp.2
6f4f13
- Fix unowned directories
6f4f13
- Change copyright files to utf-8 format
6f4f13
- Change license field to BSD (from BSD-Style)
6f4f13
6f4f13
* Fri Feb 16 2007 Andrew Overholt <overholt@redhat.com> 0:1.2-0.1.20050722.3jpp.1
6f4f13
- Remove postun Requires on jpackage-utils
6f4f13
- Set gcj_support to 1
6f4f13
- Fix groups to shut up rpmlint
6f4f13
- Add versions to the Provides and Obsoletes
6f4f13
- Add patch to take out Class-Path in MANIFEST.MF
6f4f13
6f4f13
* Thu Feb 15 2007 Matt Wringe <mwringe at redhat.com> - 0:1.2-0.1.20050722.3jpp.1.fc7
6f4f13
- Extract sources from a fresh CVS export of the given tag and add extra source
6f4f13
  required to build the package not present in the 20050722 tag anymore
6f4f13
- Add a patch to remove compile time dependency on crimson
6f4f13
- Add a patch to enable compression of jar files
6f4f13
- Add jpackage-utils as a requires for the packages/subpackages
6f4f13
6f4f13
* Mon Feb 12 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2-0.20050722.3jpp
6f4f13
- Add bootstrap option to build without saxon nor jdom
6f4f13
- Add gcj_support option
6f4f13
6f4f13
* Mon Feb 17 2006 Fernando Nasser <fnasser@redhat.com> - 0:1.2-0.20050722.2jpp
6f4f13
- First JPP 1.7 build
6f4f13
6f4f13
* Wed Aug 17 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.2-0.20050722.1jpp
6f4f13
- First JPP from this code base