File eclipse.spec of Package eclipse-4.7

#
# spec file for package eclipse
#

Name:           eclipse
Version:        0
Release:        0
Summary:        Java IDE
License:        EPL-1.0
Group:          Development/Tools/IDE
Url:            http://www.%{name}.org/
ExclusiveArch:  i586 x86_64
%ifarch i586
Source0:        %{name}-SDK-%{version}-linux-gtk.tar.gz
%endif
%ifarch x86_64
Source0:        %{name}-SDK-%{version}-linux-gtk-x86_64.tar.gz
%endif
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       java-sdk >= 1.7.0

%define ant_subfolder org.apache.ant_1.10.1.v20170504-0840

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

%prep
%setup -q -n %{name}

%build

%install
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{_libdir}
%{__mkdir_p} %{buildroot}%{_datadir}/pixmaps
%{__mkdir_p} %{buildroot}%{_defaultdocdir}/%{name}
%{__cp} -a -t %{buildroot}%{_libdir} %{_builddir}/%{name}
%{__ln_s} -t %{buildroot}%{_bindir} ../$(/usr/bin/basename %{_libdir})/%{name}/%{name}
%{__rm} -f %{buildroot}%{_libdir}/%{name}/libcairo-swt.so
%{__mv} %{buildroot}%{_libdir}/%{name}/icon.xpm %{buildroot}%{_datadir}/pixmaps/%{name}.xpm
%{__mv} -t %{buildroot}%{_defaultdocdir}/%{name} %{buildroot}%{_libdir}/%{name}/readme/*
rmdir %{buildroot}%{_libdir}/%{name}/readme
%{__chmod} a+x %{buildroot}%{_libdir}/%{name}/plugins/%{ant_subfolder}/bin/ant
%{__chmod} a+x %{buildroot}%{_libdir}/%{name}/plugins/%{ant_subfolder}/bin/antRun
%{__chmod} a+x %{buildroot}%{_libdir}/%{name}/plugins/%{ant_subfolder}/bin/*.pl
%{__chmod} a+x %{buildroot}%{_libdir}/%{name}/plugins/%{ant_subfolder}/bin/*.py
%suse_update_desktop_file -c %{name} Eclipse "%{summary}" %{name} %{name} Development IDE
%fdupes %{buildroot}/%{_libdir}/%{name}

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

%changelog