Clean up spec

This commit is contained in:
Didik Supriadi 2022-02-21 15:18:26 +07:00
parent ade7ce5d18
commit 47852e30c0

301
jaxb.spec
View File

@ -1,8 +1,6 @@
%global obs_vr 2.3.3-1
Name: jaxb Name: jaxb
Version: 2.3.5 Version: 2.3.5
Release: 4%{?dist} Release: 5%{?dist}
Summary: JAXB Reference Implementation Summary: JAXB Reference Implementation
# EDL-1.0 license is BSD-3-clause # EDL-1.0 license is BSD-3-clause
License: BSD License: BSD
@ -11,116 +9,57 @@ BuildArch: noarch
Source0: %{url}/archive/%{version}-RI/%{name}-%{version}.tar.gz Source0: %{url}/archive/%{version}-RI/%{name}-%{version}.tar.gz
BuildRequires: git
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.apache.ant:ant-junit)
BuildRequires: mvn(com.sun.activation:jakarta.activation) BuildRequires: mvn(com.sun.activation:jakarta.activation)
BuildRequires: mvn(com.sun.istack:istack-commons-runtime) BuildRequires: mvn(com.sun.istack:istack-commons-runtime)
BuildRequires: mvn(com.sun.istack:istack-commons-tools)
BuildRequires: mvn(com.sun.xml.dtd-parser:dtd-parser)
BuildRequires: mvn(com.sun.xml.fastinfoset:FastInfoset) BuildRequires: mvn(com.sun.xml.fastinfoset:FastInfoset)
BuildRequires: mvn(jakarta.activation:jakarta.activation-api) BuildRequires: mvn(jakarta.activation:jakarta.activation-api)
BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api) BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api)
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.ant:ant-junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildRequires: mvn(xmlunit:xmlunit)
BuildRequires: mvn(com.sun.xml.dtd-parser:dtd-parser)
BuildRequires: mvn(com.sun.istack:istack-commons-tools)
BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.codehaus.mojo:buildnumber-maven-plugin)
BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(xmlunit:xmlunit)
%description %description
GlassFish JAXB Reference Implementation. GlassFish JAXB Reference Implementation.
%package runtime %package runtime
Summary: JAXB Runtime Summary: JAXB Runtime
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb = %{version}-%{release}
Obsoletes: glassfish-jaxb < %{obs_vr}
Provides: glassfish-jaxb-runtime = %{version}-%{release}
Obsoletes: glassfish-jaxb-runtime < %{obs_vr}
# -core subpackage was merged into -runtime during F33
Provides: glassfish-jaxb-core = %{version}-%{release}
Obsoletes: glassfish-jaxb-core < %{obs_vr}
# Obsolete module gone away for good
Obsoletes: glassfish-jaxb1-impl < %{obs_vr}
# Unable to ship any longer due to missing dep: org.checkerframework:compiler
Obsoletes: glassfish-jaxb-jxc < %{obs_vr}
# Disable javadocs for now, due to https://github.com/fedora-java/xmvn/issues/58
Obsoletes: glassfish-jaxb-javadoc < %{obs_vr}
# No longer shipping parent pom packages
Obsoletes: glassfish-jaxb-codemodel-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-external-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-runtime-parent < %{obs_vr}
Obsoletes: glassfish-jaxb-txw-parent < %{obs_vr}
%description runtime %description runtime
JAXB (JSR 222) Reference Implementation JAXB (JSR 222) Reference Implementation
%package txw2 %package txw2
Summary: TXW2 Runtime Summary: TXW2 Runtime
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-txw2 = %{version}-%{release}
Obsoletes: glassfish-jaxb-txw2 < %{obs_vr}
%description txw2 %description txw2
TXW is a library that allows you to write XML documents. TXW is a library that allows you to write XML documents.
%package impl
Summary: Old JAXB Runtime
%description impl
Old JAXB Runtime module. Contains sources required for runtime processing.
Standalone bundle suitable for use in OSGi runtimes.
%package codemodel %package codemodel
Summary: Codemodel Core Summary: Codemodel Core
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-codemodel = %{version}-%{release}
Obsoletes: glassfish-jaxb-codemodel < %{obs_vr}
%description codemodel %description codemodel
The core functionality of the CodeModel java source code generation The core functionality of the CodeModel java source code generation
library. library.
%package codemodel-annotation-compiler %package codemodel-annotation-compiler
Summary: Codemodel Annotation Compiler Summary: Codemodel Annotation Compiler
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-codemodel-annotation-compiler = %{version}-%{release}
Obsoletes: glassfish-jaxb-codemodel-annotation-compiler < %{obs_vr}
%description codemodel-annotation-compiler %description codemodel-annotation-compiler
The annotation compiler ant task for the CodeModel java source code The annotation compiler ant task for the CodeModel java source code
generation library. generation library.
%package bom
Summary: JAXB BOM
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-bom = %{version}-%{release}
Obsoletes: glassfish-jaxb-bom < %{obs_vr}
%description bom
JAXB Bill of Materials (BOM)
%package bom-ext
Summary: JAXB BOM with all dependencies
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-bom-ext = %{version}-%{release}
Obsoletes: glassfish-jaxb-bom-ext < %{obs_vr}
%description bom-ext
JAXB Bill of Materials (BOM) with all dependencies.
%package xjc %package xjc
Summary: JAXB XJC Summary: JAXB XJC
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-xjc = %{version}-%{release}
Obsoletes: glassfish-jaxb-xjc < %{obs_vr}
%description xjc %description xjc
JAXB Binding Compiler. Contains source code needed for binding JAXB Binding Compiler. Contains source code needed for binding
customization files into java sources. In other words: the tool to customization files into java sources. In other words: the tool to
@ -128,31 +67,17 @@ generate java classes for the given xml representation.
%package rngom %package rngom
Summary: RELAX NG Object Model/Parser Summary: RELAX NG Object Model/Parser
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-rngom = %{version}-%{release}
Obsoletes: glassfish-jaxb-rngom < %{obs_vr}
%description rngom %description rngom
This package contains RELAX NG Object Model/Parser. This package contains RELAX NG Object Model/Parser.
%package txwc2 %package txwc2
Summary: TXW2 Compiler Summary: TXW2 Compiler
# Package renamed from glassfish-jaxb with version 2.3.3-1 in F33
Provides: glassfish-jaxb-txwc2 = %{version}-%{release}
Obsoletes: glassfish-jaxb-txwc2 < %{obs_vr}
%description txwc2 %description txwc2
JAXB schema generator. The tool to generate XML schema based on java JAXB schema generator. The tool to generate XML schema based on java
classes. classes.
%package xsom %package xsom
Summary: XML Schema Object Model Summary: XML Schema Object Model
# Xsom package was merged upstream into jaxb
Provides: xsom = %{version}-%{release}
Obsoletes: xsom < 20140514-7
Provides: xsom-javadoc = %{version}-%{release}
Obsoletes: xsom-javadoc < 20140514-7
%description xsom %description xsom
XML Schema Object Model (XSOM) is a Java library that allows applications to XML Schema Object Model (XSOM) is a Java library that allows applications to
easily parse XML Schema documents and inspect information in them. It is easily parse XML Schema documents and inspect information in them. It is
@ -161,192 +86,92 @@ input.
%package relaxng-datatype %package relaxng-datatype
Summary: RelaxNG Datatype Summary: RelaxNG Datatype
# RelaxNG was subsumed into jaxb upstream
Provides: relaxngDatatype = 1:%{version}-%{release}
Obsoletes: relaxngDatatype < 2011.1-16
Provides: relaxngDatatype-javadoc = 1:%{version}-%{release}
Obsoletes: relaxngDatatype-javadoc < 2011.1-16
%description relaxng-datatype %description relaxng-datatype
RelaxNG Datatype library. RelaxNG Datatype library.
%prep %prep
%autosetup -p1 -n jaxb-ri-%{version}-RI %autosetup -p1 -n jaxb-ri-%{version}-RI -S git
# Delete precompiled jar and class files
find -type f '(' -iname '*.jar' -o -iname '*.class' ')' -print -delete find -type f '(' -iname '*.jar' -o -iname '*.class' ')' -print -delete
pushd jaxb-ri cd jaxb-ri
# Remove unnecessary dep on ee4j parent pom (it adds nothing to our downstream builds) # Remove unnecessary dep on ee4j parent pom (it adds nothing to our downstream builds)
%pom_remove_parent boms/bom external xsom codemodel %pom_remove_parent boms/bom external xsom codemodel
# SCM from parent: org.eclipse.ee4j:project:1.0.7
# Plug-ins not useful for RPM builds %pom_xpath_inject 'pom:project' \
%pom_remove_plugin :maven-enforcer-plugin external xsom . codemodel '<scm>
%pom_remove_plugin :buildnumber-maven-plugin docs/www external xsom . codemodel <connection>scm:git:git@github.com:eclipse-ee4j/ee4j.git</connection>
<developerConnection>scm:git:git@github.com:eclipse-ee4j/ee4j.git</developerConnection>
<url>https://github.com/eclipse-ee4j/ee4j</url>
</scm>' external
# Fix dep on xml resolver # Fix dep on xml resolver
%pom_change_dep com.sun.org.apache.xml.internal:resolver xml-resolver:xml-resolver:1.2 xjc bundles/xjc %pom_change_dep com.sun.org.apache.xml.internal:resolver xml-resolver:xml-resolver:1.2 xjc jxc
sed -i -e 's/com\.sun\.org\.apache\.xml\.internal\.resolver/org.apache.xml.resolver/' xjc/src/main/java/com/sun/tools/xjc/CatalogUtil.java sed -i -e 's/com\.sun\.org\.apache\.xml\.internal\.resolver/org.apache.xml.resolver/' xjc/src/main/java/com/sun/tools/xjc/CatalogUtil.java
# Missing dep in Fedora: org.checkerframework:compiler # Missing dep in Fedora: org.checkerframework:compiler
%pom_disable_module jxc %pom_disable_module jxc
# Disable unneeded extra OSGi bundles # Disable unneeded extra OSGi bundles
%pom_disable_module jxc bundles
%pom_disable_module osgi bundles %pom_disable_module osgi bundles
%pom_disable_module ri bundles %pom_disable_module ri bundles
%pom_disable_module runtime bundles
%pom_disable_module xjc bundles %pom_disable_module xjc bundles
%pom_disable_module jxc bundles # Ignore osgi tests
%pom_add_plugin :maven-antrun-plugin bundles/runtime '
<executions>
<execution>
<id>unzip-jar</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<unzip src="%{_javadir}/jaxb-istack-commons/istack-commons-runtime.jar"
dest="${dep.sources}">
<patternset>
<exclude name="**/module-info.*"/>
<exclude name="**/META-INF/versions/**"/>
<exclude name="**/META-INF/MANIFEST.MF"/>
</patternset>
</unzip>
<unzip src="%{_javadir}/jaxb-istack-commons/istack-commons-runtime.jar"
dest="${dep.sources.mr}">
<patternset>
<include name="**/META-INF/versions/9/**"/>
</patternset>
</unzip>
</target>
</configuration>
</execution>
</executions>'
#pom_add_plugin :maven-antrun-plugin bundles/xjc '
# <executions>
# <execution>
# <id>unzip-jar</id>
# <phase>generate-sources</phase>
# <goals>
# <goal>run</goal>
# </goals>
# <configuration>
# <target>
#
# <unzip src="{_javadir}/jaxb-istack-commons/istack-commons-tools.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-istack-commons/istack-commons-tools.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/xml-resolver.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/xml-resolver.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-dtd-parser/dtd-parser.jar"
# dest="${dep.sources}">
# <patternset>
# <exclude name="**/module-info.*"/>
# <exclude name="**/META-INF/versions/**"/>
# <exclude name="**/META-INF/MANIFEST.MF"/>
# </patternset>
# </unzip>
#
# <unzip src="{_javadir}/jaxb-dtd-parser/dtd-parser.jar"
# dest="${dep.sources.mr}">
# <patternset>
# <include name="**/META-INF/versions/9/**"/>
# </patternset>
# </unzip>
#
# </target>
# </configuration>
# </execution>
# </executions>'
%pom_disable_module docs
%pom_disable_module tools/osgi_tests %pom_disable_module tools/osgi_tests
# lack of dependency when building documentation
%pom_disable_module release-documentation docs
# Compatibility # Compatibility
%mvn_alias org.glassfish.jaxb:jaxb-xjc com.sun.xml.bind:jaxb-xjc
%mvn_alias org.glassfish.jaxb:jaxb-runtime org.glassfish.jaxb:jaxb-core
%mvn_alias org.glassfish.jaxb:xsom com.sun.xsom:xsom
%mvn_alias com.sun.xml.bind.external:relaxng-datatype com.github.relaxng:relaxngDatatype relaxngDatatype:relaxngDatatype %mvn_alias com.sun.xml.bind.external:relaxng-datatype com.github.relaxng:relaxngDatatype relaxngDatatype:relaxngDatatype
%mvn_alias org.glassfish.jaxb:jaxb-runtime org.glassfish.jaxb:jaxb-core
%mvn_alias org.glassfish.jaxb:jaxb-xjc com.sun.xml.bind:jaxb-xjc
%mvn_alias org.glassfish.jaxb:xsom com.sun.xsom:xsom
# Don't install aggregator and parent poms # Don't install aggregator and parent poms
%mvn_package com.sun.xml.bind.mvn: __noinstall %mvn_package :jaxb-bom __noinstall
%mvn_package :jaxb-bom-ext __noinstall
popd %mvn_package :jaxb-bundles __noinstall
%mvn_package :jaxb-codemodel-parent __noinstall
%mvn_package :jaxb-docs-parent __noinstall
%mvn_package :jaxb-external-parent __noinstall
%mvn_package :jaxb-parent __noinstall
%mvn_package :jaxb-runtime-parent __noinstall
%mvn_package :jaxb-samples __noinstall
%mvn_package :jaxb-txw-parent __noinstall
%mvn_package :jaxb-www __noinstall
cd -
%build %build
pushd jaxb-ri cd jaxb-ri
%mvn_build -s -j -f -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %mvn_build -s -f -j -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
popd cd -
%install %install
pushd jaxb-ri cd jaxb-ri
%mvn_install %mvn_install
popd cd -
%files runtime -f jaxb-ri/.mfiles-jaxb-runtime
%license LICENSE.md NOTICE.md
%files txw2 -f jaxb-ri/.mfiles-txw2
%license LICENSE.md NOTICE.md
%files impl -f jaxb-ri/.mfiles-jaxb-impl
%license LICENSE.md NOTICE.md
%files codemodel -f jaxb-ri/.mfiles-codemodel %files codemodel -f jaxb-ri/.mfiles-codemodel
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files codemodel-annotation-compiler -f jaxb-ri/.mfiles-codemodel-annotation-compiler %files codemodel-annotation-compiler -f jaxb-ri/.mfiles-codemodel-annotation-compiler
%files bom -f jaxb-ri/.mfiles-jaxb-bom
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype
%files bom-ext -f jaxb-ri/.mfiles-jaxb-bom-ext %license LICENSE.md NOTICE.md
%files xjc -f jaxb-ri/.mfiles-jaxb-xjc
%files rngom -f jaxb-ri/.mfiles-rngom %files rngom -f jaxb-ri/.mfiles-rngom
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files runtime -f jaxb-ri/.mfiles-jaxb-runtime
%license LICENSE.md NOTICE.md
%files txw2 -f jaxb-ri/.mfiles-txw2
%license LICENSE.md NOTICE.md
%files txwc2 -f jaxb-ri/.mfiles-txwc2 %files txwc2 -f jaxb-ri/.mfiles-txwc2
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files xjc -f jaxb-ri/.mfiles-jaxb-xjc
%license LICENSE.md NOTICE.md
%files xsom -f jaxb-ri/.mfiles-xsom %files xsom -f jaxb-ri/.mfiles-xsom
%license LICENSE.md NOTICE.md
%files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype
%changelog %changelog
* Mon Feb 21 2022 Didik Supriadi <didiksupriadi41@fedoraproject.org> - 2.3.5-5
- Remove subpackage that provides BOM/POM only
- Clean up spec (provides, obsoletes, etc.)
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.3.5-4 * Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.3.5-4
- Rebuilt for java-17-openjdk as system jdk - Rebuilt for java-17-openjdk as system jdk