File eclipse-launchbar.spec of Package eclipse-launchbar

#
# spec file for package eclipse-launchbar-bootstrap
#
# 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 git_tag fe09ae9bae9780adc8b43a8eb020c4f3fd4aab2e
Version:        2.2.3
Release:        0
Summary:        Eclipse Launchbar plug-in
License:        EPL-1.0
Group:          Documentation/HTML
URL:            https://wiki.eclipse.org/CDT/LaunchBar
Source0:        http://git.eclipse.org/c/cdt/org.eclipse.launchbar.git/snapshot/org.eclipse.launchbar-%{git_tag}.tar.xz
Source1:        https://www.eclipse.org/legal/epl-v10.html
Patch0:         eclipse-launchbar-inject.patch
BuildRequires:  eclipse-license
BuildRequires:  eclipse-pde
BuildRequires:  fdupes
BuildRequires:  tycho
BuildConflicts: java >= 12
BuildConflicts: java-devel >= 12
BuildConflicts: java-headless >= 12
Requires:       eclipse-platform
BuildArch:      noarch
# Upstream Eclipse no longer supports non-64bit arches
ExcludeArch:    s390 %{arm} %{ix86}
%if %{with bootstrap}
Name:           eclipse-launchbar-bootstrap
%else
Name:           eclipse-launchbar
BuildRequires:  eclipse-remote
BuildRequires:  eclipse-tm-terminal-bootstrap
#!BuildRequires: eclipse-cdt-bootstrap-native
%endif

%description
An alternative to the default launcher toolbar in Eclipse.

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

%description javadoc
%{summary}.

%prep
%setup -q -n org.eclipse.launchbar-%{git_tag}
cp %{SOURCE1} .

%patch -P 0 -p1

find -name *.jar -exec rm -rf {} \;
find -name *.class -exec rm -rf {} \;

# No need to create update site/p2 repo for RPM builds
%pom_disable_module repo

# Disable tests for now
%pom_disable_module tests/org.eclipse.launchbar.core.tests
%pom_disable_module tests/org.eclipse.launchbar.ui.tests

%if %{with bootstrap}
%pom_disable_module bundles/org.eclipse.launchbar.remote.core
%pom_disable_module bundles/org.eclipse.launchbar.remote.ui
%pom_disable_module features/org.eclipse.launchbar.remote
%endif

# No parent poms
%{mvn_package} "::pom::" __noinstall

%build
%{mvn_build} \
%if %{with bootstrap}
	-j \
%endif
    -f \
	-- -Dmaven.compiler.release=8

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

%files -f .mfiles
%license epl-v10.html

%if %{without bootstrap}
%files javadoc -f .mfiles-javadoc
%license epl-v10.html
%endif

%changelog
openSUSE Build Service is sponsored by