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
Epoch: 1
Version: 2013.5.1
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Multi-Schema Validator
Group: Development/Libraries
License: BSD and ASL 1.1
URL: http://msv.java.net/
@ -57,75 +56,40 @@ conformance to RELAX NG/W3C XML standards and JAXP masquerading.
%package msv
Summary: Multi-Schema Validator Core
Group: Development/Libraries
# 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
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
%{summary}.
%package rngconv
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
%{summary}.
%package xmlgen
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
%{summary}.
%package xsdlib
Summary: Multi-Schema Validator XML Schema Library
Group: Development/Libraries
Requires: jpackage-utils
Requires: java
Requires: isorelax
Requires: relaxngDatatype
Requires: xerces-j2
%description xsdlib
%{summary}.
%package javadoc
Summary: API documentation for Multi-Schema Validator
Group: Documentation
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
%{summary}.
%package manual
Summary: Manual for Multi-Schema Validator
Group: Documentation
License: BSD
%description manual
@ -133,11 +97,9 @@ License: BSD
%package demo
Summary: Samples for Multi-Schema Validator
Group: Documentation
License: BSD
Requires: msv-msv
Requires: msv-xsdlib
Requires: jpackage-utils
%description demo
%{summary}.
@ -182,51 +144,25 @@ for m in $(find . -name copyright.txt) ; do
mv $m.utf8 $m
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
mvn-rpmbuild install javadoc:aggregate
%mvn_build -s
%install
# Jars
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
%mvn_install
# Alternate jar names
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
# 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}-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
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
# Examples
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/msv
cp -pr msv/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/msv
install -d -m 755 %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
install -d -m 755 %{buildroot}%{_datadir}/%{name}/msv
cp -pr msv/examples/* %{buildroot}%{_datadir}/%{name}/msv
install -d -m 755 %{buildroot}%{_datadir}/%{name}/xsdlib
cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}/xsdlib
# Scripts
%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.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
%{_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 msv/doc/Apache-LICENSE-1.1.txt
%doc Apache-LICENSE-2.0.txt
%files rngconv
%files rngconv -f .mfiles-msv-rngconverter
%{_bindir}/rngconv
%{_mavenpomdir}/JPP-%{name}-rngconverter.pom
%{_javadir}/%{name}-rngconverter.jar
%{_javadir}/%{name}-rngconv.jar
%doc msv/doc/Apache-LICENSE-1.1.txt
%doc License.txt
%files xmlgen
%files xmlgen -f .mfiles-msv-generator
%{_bindir}/xmlgen
%{_mavenpomdir}/JPP-%{name}-generator.pom
%{_javadir}/%{name}-generator.jar
%{_javadir}/%{name}-xmlgen.jar
%doc msv/doc/Apache-LICENSE-1.1.txt
%doc License.txt
%files xsdlib
%{_mavenpomdir}/JPP-xsdlib.pom
%{_javadir}/xsdlib.jar
%{_javadir}/%{name}-xsdlib.jar
%files xsdlib -f .mfiles-xsdlib
%doc msv/doc/Apache-LICENSE-1.1.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
%{_mavendepmapfragdir}/*
%{_mavendepmapfragdir}/msv
%files javadoc
%{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%doc License.txt
%doc msv/doc/Apache-LICENSE-1.1.txt
%doc Apache-LICENSE-2.0.txt
@ -307,9 +224,12 @@ cp -pr xsdlib/examples/* %{buildroot}%{_datadir}/%{name}-%{version}/xsdlib
%doc License.txt
%files demo
%{_datadir}/%{name}-%{version}
%{_datadir}/%{name}
%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
- Unversioned doc dir (Resolves: #993980)
- See: http://fedoraproject.org/wiki/Changes/UnversionedDocdirs