Adapt to current guidelines

This commit is contained in:
Michal Srb 2013-09-23 15:57:55 +02:00
parent 702a607142
commit 9858303707

136
msv.spec
View File

@ -1,9 +1,8 @@
Name: msv Name: msv
Epoch: 1 Epoch: 1
Version: 2013.5.1 Version: 2013.5.1
Release: 6%{?dist} Release: 7%{?dist}
Summary: Multi-Schema Validator Summary: Multi-Schema Validator
Group: Development/Libraries
License: BSD and ASL 1.1 License: BSD and ASL 1.1
URL: http://msv.java.net/ URL: http://msv.java.net/
@ -57,75 +56,40 @@ conformance to RELAX NG/W3C XML standards and JAXP masquerading.
%package msv %package msv
Summary: Multi-Schema Validator Core Summary: Multi-Schema Validator Core
Group: Development/Libraries
# src/com/sun/msv/reader/xmlschema/DOMLSInputImpl.java is under ASL 2.0 # src/com/sun/msv/reader/xmlschema/DOMLSInputImpl.java is under ASL 2.0
# msv/src/com/sun/msv/writer/ContentHandlerAdaptor.java is partially under Public Domain # msv/src/com/sun/msv/writer/ContentHandlerAdaptor.java is partially under Public Domain
License: BSD and ASL 1.1 and ASL 2.0 and Public Domain License: BSD and ASL 1.1 and ASL 2.0 and Public Domain
Requires: jpackage-utils
Requires: java
Requires: isorelax
Requires: relaxngDatatype
Requires: xerces-j2
Requires: msv-xsdlib
%description msv %description msv
%{summary}. %{summary}.
%package rngconv %package rngconv
Summary: Multi-Schema Validator RNG Converter Summary: Multi-Schema Validator RNG Converter
Group: Development/Libraries
Requires: jpackage-utils
Requires: java
Requires: isorelax
Requires: relaxngDatatype
Requires: xerces-j2
Requires: msv-msv
Requires: msv-xsdlib
%description rngconv %description rngconv
%{summary}. %{summary}.
%package xmlgen %package xmlgen
Summary: Multi-Schema Validator Generator Summary: Multi-Schema Validator Generator
Group: Development/Libraries
Requires: jpackage-utils
Requires: java
Requires: isorelax
Requires: relaxngDatatype
Requires: xerces-j2
Requires: msv-msv
Requires: msv-xsdlib
%description xmlgen %description xmlgen
%{summary}. %{summary}.
%package xsdlib %package xsdlib
Summary: Multi-Schema Validator XML Schema Library Summary: Multi-Schema Validator XML Schema Library
Group: Development/Libraries
Requires: jpackage-utils
Requires: java
Requires: isorelax
Requires: relaxngDatatype
Requires: xerces-j2
%description xsdlib %description xsdlib
%{summary}. %{summary}.
%package javadoc %package javadoc
Summary: API documentation for Multi-Schema Validator Summary: API documentation for Multi-Schema Validator
Group: Documentation
License: BSD and ASL 1.1 and ASL 2.0 and Public Domain License: BSD and ASL 1.1 and ASL 2.0 and Public Domain
Requires: java-javadoc
Requires: jpackage-utils
Requires: isorelax-javadoc
Requires: relaxngDatatype-javadoc
%description javadoc %description javadoc
%{summary}. %{summary}.
%package manual %package manual
Summary: Manual for Multi-Schema Validator Summary: Manual for Multi-Schema Validator
Group: Documentation
License: BSD License: BSD
%description manual %description manual
@ -133,11 +97,9 @@ License: BSD
%package demo %package demo
Summary: Samples for Multi-Schema Validator Summary: Samples for Multi-Schema Validator
Group: Documentation
License: BSD License: BSD
Requires: msv-msv Requires: msv-msv
Requires: msv-xsdlib Requires: msv-xsdlib
Requires: jpackage-utils
%description demo %description demo
%{summary}. %{summary}.
@ -182,51 +144,25 @@ for m in $(find . -name copyright.txt) ; do
mv $m.utf8 $m mv $m.utf8 $m
done done
%mvn_file ":%{name}-core" %{name}-core %{name}-%{name}
%mvn_file ":%{name}-rngconverter" %{name}-rngconverter %{name}-rngconv
%mvn_file ":%{name}-generator" %{name}-generator %{name}-xmlgen
%mvn_file ":xsdlib" xsdlib %{name}-xsdlib
%mvn_alias ":xsdlib" "com.sun.msv.datatype.xsd:xsdlib"
%mvn_package ":*::{tests,javadoc,sources}:" __noinstall
%mvn_package ":%{name}{,-core,-testharness}::{}:" %{name}-msv
%build %build
mvn-rpmbuild install javadoc:aggregate %mvn_build -s
%install %install
# Jars %mvn_install
install -pD -T msv/target/%{name}-core-%{version}.jar \
%{buildroot}%{_javadir}/%{name}-core.jar
install -pD -T rngconverter/target/%{name}-rngconverter-%{version}.jar \
%{buildroot}%{_javadir}/%{name}-rngconverter.jar
install -pD -T generator/target/%{name}-generator-%{version}.jar \
%{buildroot}%{_javadir}/%{name}-generator.jar
install -pD -T xsdlib/target/xsdlib-%{version}.jar \
%{buildroot}%{_javadir}/xsdlib.jar
install -pD -T testharness/target/%{name}-testharness-%{version}.jar \
%{buildroot}%{_javadir}/%{name}-testharness.jar
# Alternate jar names # parent POM
ln -s %{name}-core.jar \
%{buildroot}%{_javadir}/%{name}-msv.jar
ln -s %{name}-rngconverter.jar \
%{buildroot}%{_javadir}/%{name}-rngconv.jar
ln -s %{name}-generator.jar \
%{buildroot}%{_javadir}/%{name}-xmlgen.jar
ln -s xsdlib.jar \
%{buildroot}%{_javadir}/%{name}-xsdlib.jar
# Poms
install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv.pom
install -pD -T -m 644 parent-pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-parent.pom install -pD -T -m 644 parent-pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-parent.pom
install -pD -T -m 644 msv/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-core.pom
install -pD -T -m 644 rngconverter/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-rngconverter.pom
install -pD -T -m 644 generator/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-generator.pom
install -pD -T -m 644 testharness/pom.xml %{buildroot}%{_mavenpomdir}/JPP-msv-testharness.pom
install -pD -T -m 644 xsdlib/pom.xml %{buildroot}%{_mavenpomdir}/JPP-xsdlib.pom
%add_maven_depmap JPP-%{name}.pom
%add_maven_depmap JPP-%{name}-parent.pom %add_maven_depmap JPP-%{name}-parent.pom
%add_maven_depmap JPP-%{name}-core.pom %{name}-core.jar -a "msv:msv"
%add_maven_depmap JPP-%{name}-rngconverter.pom %{name}-rngconverter.jar
%add_maven_depmap JPP-%{name}-generator.pom %{name}-generator.jar
%add_maven_depmap JPP-%{name}-testharness.pom %{name}-testharness.jar
%add_maven_depmap JPP-xsdlib.pom xsdlib.jar -a "com.sun.msv.datatype.xsd:xsdlib"
# Javadocs
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
# Manuals # Manuals
install -d -m 755 %{buildroot}%{_docdir}/%{name}/msv install -d -m 755 %{buildroot}%{_docdir}/%{name}/msv
@ -246,58 +182,39 @@ install -m 644 xsdlib/*.html %{buildroot}%{_docdir}/%{name}/xsdlib
install -m 644 xsdlib/README.txt %{buildroot}%{_docdir}/%{name}/xsdlib install -m 644 xsdlib/README.txt %{buildroot}%{_docdir}/%{name}/xsdlib
# Examples # Examples
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/msv install -d -m 755 %{buildroot}%{_datadir}/%{name}/msv
cp -pr msv/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/msv cp -pr msv/examples/* %{buildroot}%{_datadir}/%{name}/msv
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib install -d -m 755 %{buildroot}%{_datadir}/%{name}/xsdlib
cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}/xsdlib
# Scripts # Scripts
%jpackage_script com.sun.msv.driver.textui.Driver "" "" msv-msv:msv-xsdlib:relaxngDatatype:isorelax msv true %jpackage_script com.sun.msv.driver.textui.Driver "" "" msv-msv:msv-xsdlib:relaxngDatatype:isorelax msv true
%jpackage_script com.sun.msv.generator.Driver "" "" msv-xmlgen:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 xmlgen true %jpackage_script com.sun.msv.generator.Driver "" "" msv-xmlgen:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 xmlgen true
%jpackage_script com.sun.msv.writer.relaxng.Driver "" "" msv-rngconv:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 rngconv true %jpackage_script com.sun.msv.writer.relaxng.Driver "" "" msv-rngconv:msv-msv:msv-xsdlib:relaxngDatatype:isorelax:xerces-j2 rngconv true
%files msv %files msv -f .mfiles-msv-msv
%{_bindir}/msv %{_bindir}/msv
%{_mavenpomdir}/JPP-%{name}-core.pom
%{_mavenpomdir}/JPP-%{name}-testharness.pom
%{_javadir}/%{name}-core.jar
%{_javadir}/%{name}-msv.jar
%{_javadir}/%{name}-testharness*
%doc License.txt %doc License.txt
%doc msv/doc/Apache-LICENSE-1.1.txt %doc msv/doc/Apache-LICENSE-1.1.txt
%doc Apache-LICENSE-2.0.txt %doc Apache-LICENSE-2.0.txt
%files rngconv %files rngconv -f .mfiles-msv-rngconverter
%{_bindir}/rngconv %{_bindir}/rngconv
%{_mavenpomdir}/JPP-%{name}-rngconverter.pom
%{_javadir}/%{name}-rngconverter.jar
%{_javadir}/%{name}-rngconv.jar
%doc msv/doc/Apache-LICENSE-1.1.txt %doc msv/doc/Apache-LICENSE-1.1.txt
%doc License.txt %doc License.txt
%files xmlgen %files xmlgen -f .mfiles-msv-generator
%{_bindir}/xmlgen %{_bindir}/xmlgen
%{_mavenpomdir}/JPP-%{name}-generator.pom
%{_javadir}/%{name}-generator.jar
%{_javadir}/%{name}-xmlgen.jar
%doc msv/doc/Apache-LICENSE-1.1.txt %doc msv/doc/Apache-LICENSE-1.1.txt
%doc License.txt %doc License.txt
%files xsdlib %files xsdlib -f .mfiles-xsdlib
%{_mavenpomdir}/JPP-xsdlib.pom
%{_javadir}/xsdlib.jar
%{_javadir}/%{name}-xsdlib.jar
%doc msv/doc/Apache-LICENSE-1.1.txt %doc msv/doc/Apache-LICENSE-1.1.txt
%doc License.txt %doc License.txt
# This subpackage wins the parent poms and the depmap because all the other
# subpackages require this one
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavenpomdir}/JPP-%{name}-parent.pom %{_mavenpomdir}/JPP-%{name}-parent.pom
%{_mavendepmapfragdir}/* %{_mavendepmapfragdir}/msv
%files javadoc %files javadoc -f .mfiles-javadoc
%{_javadocdir}/%{name}
%doc License.txt %doc License.txt
%doc msv/doc/Apache-LICENSE-1.1.txt %doc msv/doc/Apache-LICENSE-1.1.txt
%doc Apache-LICENSE-2.0.txt %doc Apache-LICENSE-2.0.txt
@ -307,9 +224,12 @@ cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
%doc License.txt %doc License.txt
%files demo %files demo
%{_datadir}/%{name}-%{version} %{_datadir}/%{name}
%changelog %changelog
* Mon Sep 23 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-7
- Adapt to current guidelines
* Wed Aug 07 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-6 * Wed Aug 07 2013 Michal Srb <msrb@redhat.com> - 1:2013.5.1-6
- Unversioned doc dir (Resolves: #993980) - Unversioned doc dir (Resolves: #993980)
- See: http://fedoraproject.org/wiki/Changes/UnversionedDocdirs - See: http://fedoraproject.org/wiki/Changes/UnversionedDocdirs