File glassfish-corba.spec of Package glassfish-corba

#
# spec file for package glassfish-corba
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
%global base_name glassfish-corba
Version:        4.2.4
Release:        0
License:        EPL-2.0 OR BSD-3-Clause OR GPL-2.0 WITH Classpath-exception-2.0
URL:            https://github.com/eclipse-ee4j/orb
Source0:        %{base_name}-%{version}.tar.xz
Patch0:         reproducible-timestamps.patch
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(org.eclipse.ee4j:project:pom:)
BuildArch:      noarch
%if %{with bootstrap}
Name:           %{base_name}-idlj
Summary:        Glassfish CORBA IDL compiler
%else
Name:           %{base_name}
Summary:        Glassfish CORBA
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.codehaus.mojo:idlj-maven-plugin)
BuildRequires:  mvn(org.glassfish.corba:idlj)
BuildRequires:  mvn(org.glassfish.gmbal:gmbal)
BuildRequires:  mvn(org.glassfish.pfl:pfl-basic)
BuildRequires:  mvn(org.glassfish.pfl:pfl-dynamic)
BuildRequires:  mvn(org.glassfish.pfl:pfl-tf)
BuildRequires:  mvn(org.osgi:osgi.core)
BuildRequires:  mvn(org.ow2.asm:asm)
%endif

%description
%if %{with bootstrap}
A CORBA ORB for Glassfish IDL compiler
%else
A CORBA ORB for Glassfish

%package exception-annotation-processor
Summary:        Exception Annotation Processor

%description exception-annotation-processor
A CORBA ORB for Glassfish
Exception Annotation Processor

%package csiv2-idl
Summary:        Generated CSIv2 APIs

%description csiv2-idl
A CORBA ORB for Glassfish
Generated CSIv2 APIs

%package internal-api
Summary:        Exposed Internal APIs

%description internal-api
A CORBA ORB for Glassfish
Exposed Internal APIs

%package omgapi
Summary:        Generated OMG APIs

%description omgapi
A CORBA ORB for Glassfish
Generated OMG APIs

%package orb
Summary:        GlassFish Corba ORB

%description orb
A CORBA ORB for Glassfish
GlassFish Corba ORB

%package rmic
Summary:        RMIC compiler

%description rmic
A CORBA ORB for Glassfish
RMIC compiler
%endif

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML

%description javadoc
API documentation for %{name}.

%prep
%setup -q -n %{base_name}-%{version}
%patch -P 0 -p1
%pom_xpath_remove pom:project/pom:build/pom:extensions
%pom_remove_plugin -r :copy-rename-maven-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
%pom_remove_plugin -f :maven-site-plugin
%pom_remove_plugin -f :maven-scm-publish-plugin
%pom_remove_plugin -f :glassfish-copyright-maven-plugin

%pom_xpath_remove pom:project/pom:profiles

%pom_xpath_remove -r \
	"pom:plugin[pom:artifactId ='maven-bundle-plugin']/pom:executions/pom:execution/pom:goals/pom:goal[text() = 'install']"
%pom_xpath_remove -r \
	"pom:plugin[pom:artifactId ='maven-bundle-plugin']/pom:executions/pom:execution/pom:goals/pom:goal[text() = 'deploy']"

%pom_change_dep -r ':org.osgi.core' ':osgi.core'


%if %{with bootstrap}
%pom_disable_module rmic
%pom_disable_module omgapi
%pom_disable_module csiv2-idl
%pom_disable_module exception-annotation-processor
%pom_disable_module orbmain
%pom_disable_module internal-api
%{mvn_package} :glassfish-corba __noinstall
%{mvn_file} :{*} %{base_name}/@1
%else
%pom_disable_module idlj
%endif

%build
%{mvn_build} -f \
%if %{without bootstrap}
	-s \
%endif
	-- \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
    -Dmaven.compiler.release=8 \
%endif
    -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
    -Dsource=8

%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}

%if %{with bootstrap}
%files -f .mfiles
%license LICENSE.md NOTICE.md
%else
%files -f .mfiles-glassfish-corba
%license LICENSE.md NOTICE.md

%files exception-annotation-processor -f .mfiles-exception-annotation-processor

%files csiv2-idl -f .mfiles-glassfish-corba-csiv2-idl

%files internal-api -f .mfiles-glassfish-corba-internal-api

%files omgapi -f .mfiles-glassfish-corba-omgapi

%files orb -f .mfiles-glassfish-corba-orb

%files rmic -f .mfiles-rmic
%endif

%files javadoc -f .mfiles-javadoc
%license LICENSE.md NOTICE.md

%changelog
openSUSE Build Service is sponsored by