Add bootstrap macro

This commit is contained in:
Marian Koncek 2022-10-27 16:37:36 +02:00
parent 5ab69f3432
commit d476c4ea2f

152
jaxb.spec
View File

@ -1,6 +1,8 @@
%bcond_with bootstrap
Name: jaxb Name: jaxb
Version: 2.3.5 Version: 2.3.5
Release: 7%{?dist} Release: 8%{?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,6 +13,13 @@ ExclusiveArch: %{java_arches} noarch
Source0: %{url}/archive/%{version}-RI/%{name}-%{version}.tar.gz Source0: %{url}/archive/%{version}-RI/%{name}-%{version}.tar.gz
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: mvn(org.apache.ant:ant)
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
%if %{without bootstrap}
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.istack:istack-commons-tools)
@ -18,112 +27,113 @@ 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(org.apache.ant:ant)
BuildRequires: mvn(org.apache.ant:ant-junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-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.jvnet.staxex:stax-ex) BuildRequires: mvn(org.jvnet.staxex:stax-ex)
BuildRequires: mvn(xml-resolver:xml-resolver) BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(xmlunit:xmlunit) %endif
%description %description
GlassFish JAXB Reference Implementation. GlassFish JAXB Reference Implementation.
%package runtime
Summary: JAXB Runtime
%description runtime
JAXB (JSR 222) Reference Implementation
%package txw2
Summary: TXW2 Runtime
%description txw2
TXW is a library that allows you to write XML documents.
%package codemodel %package codemodel
Summary: Codemodel Core Summary: Codemodel Core
%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
%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 xjc %package relaxng-datatype
Summary: JAXB XJC Summary: RelaxNG Datatype
%description xjc
JAXB Binding Compiler. Contains source code needed for binding
customization files into java sources. In other words: the tool to
generate java classes for the given xml representation.
%package rngom %description relaxng-datatype
Summary: RELAX NG Object Model/Parser RelaxNG Datatype library.
%description rngom
This package contains RELAX NG Object Model/Parser.
%package txwc2
Summary: TXW2 Compiler
%description txwc2
JAXB schema generator. The tool to generate XML schema based on java
classes.
%package xsom %package xsom
Summary: XML Schema Object Model Summary: XML Schema Object Model
%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
expected to be useful for applications that need to take XML Schema as an expected to be useful for applications that need to take XML Schema as an
input. input.
%package relaxng-datatype %if %{without bootstrap}
Summary: RelaxNG Datatype %package rngom
%description relaxng-datatype Summary: RELAX NG Object Model/Parser
RelaxNG Datatype library.
%description rngom
This package contains RELAX NG Object Model/Parser.
%package runtime
Summary: JAXB Runtime
%description runtime
JAXB (JSR 222) Reference Implementation
%package txw2
Summary: TXW2 Runtime
%description txw2
TXW is a library that allows you to write XML documents.
%package xjc
Summary: JAXB XJC
%description xjc
JAXB Binding Compiler. Contains source code needed for binding
customization files into java sources. In other words: the tool to
generate java classes for the given xml representation.
%package txwc2
Summary: TXW2 Compiler
%description txwc2
JAXB schema generator. The tool to generate XML schema based on java
classes.
%endif
%prep %prep
%autosetup -p1 -n jaxb-ri-%{version}-RI %setup -q -n jaxb-ri-%{version}-RI
pushd jaxb-ri pushd jaxb-ri
# Remove unnecessary dep on ee4j parent pom (it adds nothing to our downstream builds) # Remove ee4j parent
%pom_remove_parent boms/bom external xsom codemodel %pom_remove_parent boms/bom codemodel external xsom
%pom_remove_plugin -r :buildnumber-maven-plugin %pom_remove_plugin -r :buildnumber-maven-plugin
%pom_remove_plugin -r :maven-enforcer-plugin
# Skip docs generation because of missing dependencies
%pom_xpath_remove "pom:profiles/pom:profile[pom:id='default-profile']/pom:modules" %pom_xpath_remove "pom:profiles/pom:profile[pom:id='default-profile']/pom:modules"
# SCM from parent: org.eclipse.ee4j:project:1.0.7 %if %{with bootstrap}
%pom_xpath_inject 'pom:project' \ %pom_xpath_set 'pom:modules' '
'<scm> <module>codemodel</module>
<connection>scm:git:git@github.com:eclipse-ee4j/ee4j.git</connection> <module>external</module>
<developerConnection>scm:git:git@github.com:eclipse-ee4j/ee4j.git</developerConnection> <module>xsom</module>
<url>https://github.com/eclipse-ee4j/ee4j</url> '
</scm>' external %pom_xpath_set 'pom:modules' '
<module>relaxng-datatype</module>
' external
%else
# Disable unneeded extra OSGi bundles
%pom_disable_module bundles
# Fix dep on xml resolver # Missing dependency on org.checkerframework:compiler
%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
# Missing dep in Fedora: org.checkerframework:compiler
%pom_disable_module jxc %pom_disable_module jxc
# Disable unneeded extra OSGi bundles # Fix dep on xml resolver
%pom_disable_module jxc bundles %pom_change_dep com.sun.org.apache.xml.internal:resolver xml-resolver:xml-resolver:1.2 xjc
%pom_disable_module osgi bundles 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
%pom_disable_module ri bundles
%pom_disable_module runtime bundles
%pom_disable_module xjc bundles
# lack of dependency when building documentation %pom_remove_dep -r com.sun.org.apache.xml.internal:resolver
%pom_disable_module release-documentation docs %endif
# Compatibility # Compatibility
%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
@ -147,7 +157,7 @@ popd
%build %build
pushd jaxb-ri pushd jaxb-ri
%mvn_build -s -f -j -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %mvn_build -s -f -j
popd popd
%install %install
@ -161,6 +171,9 @@ popd
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype %files relaxng-datatype -f jaxb-ri/.mfiles-relaxng-datatype
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files xsom -f jaxb-ri/.mfiles-xsom
%license LICENSE.md NOTICE.md
%if %{without bootstrap}
%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 %files runtime -f jaxb-ri/.mfiles-jaxb-runtime
@ -171,10 +184,12 @@ popd
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files xjc -f jaxb-ri/.mfiles-jaxb-xjc %files xjc -f jaxb-ri/.mfiles-jaxb-xjc
%license LICENSE.md NOTICE.md %license LICENSE.md NOTICE.md
%files xsom -f jaxb-ri/.mfiles-xsom %endif
%license LICENSE.md NOTICE.md
%changelog %changelog
* Thu Oct 27 2022 Marian Koncek <mkoncek@redhat.com> - 2.3.5-8
- Add bootstrap option
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.5-7 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
@ -224,4 +239,3 @@ popd
- Upstream moved to eclipse-ee4j and implementation license changed to BSD (EDL) - Upstream moved to eclipse-ee4j and implementation license changed to BSD (EDL)
- Enable tests, don't unnecessarily ship parent poms - Enable tests, don't unnecessarily ship parent poms
- Rename package from glassfish-jaxb - Rename package from glassfish-jaxb