File eclipse.spec of Package eclipse-classic

#
# spec file for package eclipse
#
# Copyright (c) 2025 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/
#


Name:           eclipse
Version:        4.36
Release:        0
Summary:        Java IDE
License:        EPL-1.0
Group:          Development/Tools/IDE
URL:            http://www.%{name}.org/
ExclusiveArch:  aarch64 ppc64le x86_64
Source0:        %{name}-SDK-%{version}-linux-gtk-x86_64.tar.xz
Source1:        %{name}-SDK-%{version}-linux-gtk-aarch64.tar.xz
Source2:        %{name}-SDK-%{version}-linux-gtk-ppc64le.tar.xz
Source3:        %{name}-rpmlintrc
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       java-sdk >= 1.7.0

%define install_dir /opt/eclipse

%description
The Eclipse Platform, Java Development Tools, and Plug-in Development Environment, including user and programmer documentation.

%prep
%ifarch x86_64
%setup -q -n %{name} -T -b 0
%endif
%ifarch aarch64
%setup -q -n %{name} -T -b 1
%endif
%ifarch ppc64le
%setup -q -n %{name} -T -b 2
%endif

%build
%{__strip} %{name}
%{_bindir}/find . -name *.so -exec %{__strip} {} \;

%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
%{__mkdir_p} %{buildroot}%{install_dir}
%{__cp} -a -t %{buildroot}%{install_dir} %{_builddir}/%{name}
%{_bindir}/find %{buildroot}%{install_dir} -name .lock -exec %{__rm} {} \;
%{__ln_s} %{install_dir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name}
%{__chmod} a+x %{buildroot}%{install_dir}/%{name}/plugins/org.apache.ant_*/bin/ant
%{__chmod} a+x %{buildroot}%{install_dir}/%{name}/plugins/org.apache.ant_*/bin/antRun
%{__chmod} a+x %{buildroot}%{install_dir}/%{name}/plugins/org.apache.ant_*/bin/*.pl
%{__chmod} a+x %{buildroot}%{install_dir}/%{name}/plugins/org.apache.ant_*/bin/*.py
%{__chmod} a-x %{buildroot}%{install_dir}/%{name}/icon.xpm
%{__cp} -a %{_builddir}/%{name}/icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
%suse_update_desktop_file -c %{name} Eclipse "%{summary}" %{name} %{name} Development IDE
%fdupes %{buildroot}%{install_dir}

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%dir %{install_dir}
%{install_dir}/%{name}
%attr(644,root,root) %{_datadir}/pixmaps/%{name}.xpm
%attr(644,root,root) %{_datadir}/applications/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by