packages eclipse.spec
      Pages: < 1 >  DOWNLOAD      
%define        __jar_repack      0
#%define        swtver            %{version}.v3557
# All arches line up between Eclipse and Linux kernel names except i386 -> x86
%ifarch %{ix86}
%define        eclipse_arch      x86
%else
%define        eclipse_arch      %{_target_cpu}
%endif

%define        majver %(echo %version | cut -d. -f1-2)
%define        minver %(echo %version | cut -d. -f3)

%define        icu4j_bundle_version 4.2.1.v20100412

%define        initialize        1
%if "%{stage1}" != "1"
%define        bootstrap         0
%define        with_system_icu4j 1
%else
# for bootstrapping x86_64 version I installed x86 version to provide required java-icu4j4
%define        bootstrap         1
%define        with_system_icu4j 0
%endif

%define        javahome          %{_jvmdir}/jdk
%define        java_bin          %{javahome}/bin/java

Name:          eclipse
Version:       3.6.2
Release:       2mamba
Summary:       An open, extensible IDE
Group:         Graphical Desktop/Applications/Development
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://www.eclipse.org/
Source0:       http://archive.eclipse.org/technology/linuxtools/eclipse-build/%{majver}.x_Helios/eclipse-build-074773feb001e726bbf254a61b68e47c5a8b5c05.tar.xz
Source1:       http://archive.eclipse.org/technology/linuxtools/eclipse-build/%{majver}.x_Helios/eclipse-%{version}-src.tar.bz2 
Source2:       eclipse.sh.in
Source16:      eclipse-copy-platform.sh
Source17:      eclipse-efj.sh.in
Source19:      eclipse-filenamepatterns.txt
Source20:      eclipse-mv-3.6.0-2-Platform.sh
Patch1:        eclipse-3.6.0-xpcom_h.patch
Patch2:        eclipse-3.6.0-prepare-build-dir_sh.patch
Patch3:        eclipse-3.5.2-ini-install.patch
# http://bugs.gentoo.org/attachment.cgi?id=210776
#Patch3:        eclipse-3.5.1-build_xml.patch
#Patch4:        eclipse-3.5.1-plugins-equinox_security-build_xml.patch
#Patch4:        eclipse-3.5.1-equinox_security-build_xml.patch
# TODO
Patch5:        eclipse-3.5.2-build-properties.patch
Patch6:        eclipse-3.6.0-pdebuild-properties.patch
Patch7:        eclipse-3.6.0-build_sh.patch
Patch8:        eclipse-3.6.0-eclipse-build-config-build-properties.patch
Patch9:        eclipse-3.5.2-buildLibraries-rhel3.patch
Patch10:       eclipse-3.5.2-buildLibraries-rhel4.patch
# http://bugs.gentoo.org/attachment.cgi?id=242353
# see http://dev.eclipse.org/mhonarc/lists/linuxtools-dev/msg00584.html
Patch11:       eclipse-3.6.0-iterators.patch
# http://bugs.gentoo.org/attachment.cgi?id=242349
Patch12:       eclipse-3.6.2-gtk_makefile.patch
#Patch20:       eclipse-3.5.1-swtbug291128.patch
Patch13:       eclipse-3.6.2-glib-2.32.patch
Patch14:       eclipse-3.6.2-glib-2.38.patch
License:       Eclipse Public License
## AUTOBUILDREQ-BEGIN
BuildRequires: bash
BuildRequires: GConf-devel
BuildRequires: glibc-devel
BuildRequires: jpackage-utils
BuildRequires: libatk-devel
BuildRequires: libcairo-devel
BuildRequires: libgcc
BuildRequires: libGL-devel
BuildRequires: libglib-devel
BuildRequires: libGLU-devel
BuildRequires: libgnome-devel
BuildRequires: libgnomeui-devel
BuildRequires: libgnome-vfs-devel
BuildRequires: libgtk-devel
BuildRequires: libnspr-devel
BuildRequires: libstdc++6-devel
BuildRequires: libwebkit-gtk-devel
BuildRequires: libXtst-devel
BuildRequires: ORBit2-devel
BuildRequires: java-openjdk
BuildRequires: java-openjdk-javadoc
BuildRequires: xulrunner-devel
## AUTOBUILDREQ-END
BuildRequires: apache-ant => 1.7.1
BuildRequires: apache-ant-nodeps
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libsoup-devel
BuildRequires: libXt-devel
BuildRequires: libXtst-devel
BuildRequires: make
BuildRequires: unzip
%if !%{bootstrap}
BuildRequires: apache-tomcat5-jasper5-eclipse
BuildRequires: java-icu4j4-eclipse
%endif
BuildRequires: apache-ant-antlr
BuildRequires: apache-ant-bcel
BuildRequires: apache-ant-bsf
BuildRequires: apache-ant-commons-logging
BuildRequires: apache-ant-commons-net
BuildRequires: apache-ant-javamail
BuildRequires: apache-ant-jdepend
BuildRequires: apache-ant-jsch
BuildRequires: apache-ant-junit
BuildRequires: apache-ant-log4j
BuildRequires: apache-ant-oro
BuildRequires: apache-ant-regexp
BuildRequires: apache-ant-resolver
BuildRequires: apache-ant-swing
BuildRequires: apache-ant-trax
BuildRequires: apache-tomcat-jsp-2.1-api
BuildRequires: apache-tomcat-servlet-2.5-api
BuildRequires: jakarta-commons-codec
BuildRequires: jakarta-commons-el
BuildRequires: jakarta-commons-httpclient
BuildRequires: jakarta-commons-logging104
BuildRequires: java-hamcrest
BuildRequires: java-junit3
BuildRequires: java-junit48
BuildRequires: java-lucene
BuildRequires: java-lucene-contrib
BuildRequires: java-sat4j
BuildRequires: java-sch41
BuildRequires: objectweb-asm = 3.2
BuildRequires: java-jetty6-core
#%endif
BuildRequires: xulrunner-devel
BuildRequires: rsync
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Eclipse platform is designed for building integrated development environments (IDEs), server-side applications, desktop applications, and everything in between.

%package        swt
Summary:        SWT Library for GTK+-2.0
Group:          Development/Languages
Requires:       jpackage-utils
Requires:       libgtk
Requires:       libwebkit-gtk
Requires:       xulrunner
Provides:       libswt3-gtk2 = %{version}-%{release}

%description swt
SWT Library for GTK+-2.0.

%package        rcp
Summary:        Eclipse Rich Client Platform
Group:          Development/Languages
Requires:       %{name}-swt = %{version}-%{release}
%if ! %{bootstrap}
Requires:       java-icu4j4-eclipse
%endif
Requires:       java-openjdk

%description    rcp
Eclipse Rich Client Platform

%package        platform
Summary:        Eclipse platform common files
Group:          Graphical Desktop/Applications/Development
Requires:       %{name}-rcp = %{version}-%{release}
%if ! %{bootstrap}
Requires:       apache-ant-antlr
Requires:       apache-ant-bcel
Requires:       apache-ant-bsf
Requires:       apache-ant-commons-logging
Requires:       apache-ant-commons-net
Requires:       apache-ant-javamail
Requires:       apache-ant-jdepend
Requires:       apache-ant-junit
Requires:       apache-ant-jsch
Requires:       apache-ant-log4j
Requires:       apache-ant-nodeps
Requires:       apache-ant-oro
Requires:       apache-ant-regexp
Requires:       apache-ant-resolver
Requires:       apache-ant-swing
Requires:       apache-ant-trax
Requires:       apache-tomcat5-jasper5-eclipse
Requires:       apache-tomcat-jsp-2.1-api
Requires:       apache-tomcat-servlet-2.5-api
Requires:       jakarta-commons-el
Requires:       jakarta-commons-logging104
Requires:       java-jetty6-core
Requires:       java-lucene
Requires:       java-lucene-contrib
Requires:       java-sch41
Requires:       java-sat4j
%endif
Provides:       eclipse-cvs-client = %{version}-%{release}

%description    platform
The Eclipse Platform is the base of all IDE plugins.  This does not include the Java Development Tools or the Plugin Development Environment.

%package        jdt
Summary:        Eclipse Java Development Tools
Group:          Applications/Development
Requires:       %{name}-platform = %{version}-%{release}
Requires:       %{name}-cvs-client = %{version}-%{release}
Requires:       java-junit3
Requires:       java-junit48
%if ! %{bootstrap}
Requires:       jakarta-commons-httpclient
%endif
Requires:       java-openjdk
Requires:       java-openjdk-javadoc

%description    jdt
Eclipse Java Development Tools.  This package is required to use Eclipse for developing software written in the Java programming language.

%package        pde
Summary:        Eclipse Plugin Development Environment
Group:          Applications/Development
Provides:       eclipse
Provides:       eclipse-sdk
Requires:       %{name}-platform = %{version}-%{release}
Requires:       %{name}-jdt = %{version}-%{release}
Requires:       java-junit48
%if ! %{bootstrap}
Requires:       objectweb-asm = 3.2
Requires:       java-hamcrest
%endif
Requires:       bash

%description    pde
Eclipse Plugin Development Environment.  This package is required for developing Eclipse plugins.

%prep
%setup  -q -n eclipse-build-master
# -D -T
#:<< ____EOF
cp %{SOURCE1} .

export JAVA_HOME=%{javahome}
ant applyPatches
# -DbuildArch=%{eclipse_arch}

pushd build/eclipse-%{version}-src
# TODO ant 1.8.x % patch0
pushd plugins/org.eclipse.swt
pushd Eclipse\ SWT\ PI/gtk/library
# \`pkg-config --libs webkit-1.0\`
   sed -i -e "s|-lwebkit-1.0|-lwebkitgtk-1.0|g" make_linux.mak
popd
#% patch0 -p0
pushd Eclipse\ SWT\ Mozilla/common/library
%patch1
popd
popd
#%patch2

sed -i -e "s|http://java.sun.com/j2se/1.4.2/docs/api|%{_datadir}/javadoc/java|" \
   -e "/osgi\.org/d" \
   -e "s|-breakiterator|;../org.eclipse.equinox.util/@dot\n;../org.eclipse.ecf.filetransfer_3.0.0.v20090302-0803.jar\n;../org.eclipse.ecf_3.0.0.v20090302-0803.jar\n-breakiterator|" \
    plugins/org.eclipse.platform.doc.isv/platformOptions.txt
sed -i -e "s|http://java.sun.com/j2se/1.5/docs/api|%{_datadir}/javadoc/java|" \
   -e "s/win32.win32.x86/gtk.linux.%{eclipse_arch}/" \
   plugins/org.eclipse.jdt.doc.isv/jdtaptOptions.txt \
   plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
sed -i -e "s|http://java.sun.com/j2se/1.4/docs/api|%{_datadir}/javadoc/java|" \
   -e "s/motif.linux.x86/gtk.linux.%{eclipse_arch}/" \
   plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
   plugins/org.eclipse.pde.doc.user/pdeOptions.txt

# Remove signatures for JARs
#find -iname \*.sf | xargs rm
#find -iname \*.rsa | xargs rm

# FIXME:  do this as part of Linux distros project
#
# the swt version is set to HEAD on s390x but shouldn't be
# get swt version
SWT_MAJ_VER=$(grep maj_ver plugins/org.eclipse.swt/Eclipse\ SWT/common/library/make_common.mak | cut -f 2 -d =)
SWT_MIN_VER=$(grep min_ver plugins/org.eclipse.swt/Eclipse\ SWT/common/library/make_common.mak | cut -f 2 -d =)
SWT_VERSION=$SWT_MAJ_VER$SWT_MIN_VER
swt_frag_ver=$(grep v$SWT_VERSION plugins/org.eclipse.swt.gtk.linux.x86/build.xml | sed "s:.*<.*\"\(.*\)\" />:\1:")
swt_frag_ver_s390x=$(grep "version\.suffix\" value=" plugins/org.eclipse.swt.gtk.linux.s390x/build.xml | sed "s:.*<.*\"\(.*\)\" />:\1:")
#sed --in-place "s|$swt_frag_ver_s390x|$swt_frag_ver|g" plugins/org.eclipse.swt.gtk.linux.s390x/build.xml \
#                                                      plugins/org.eclipse.swt.gtk.linux.s390x/META-INF/MANIFEST.MF

%if ! %{bootstrap}
# make sure there are no jars left
JARS=""
for j in $(find -name \*.jar); do
  if [ ! -L $j ]; then
    JARS="$JARS `echo $j`"
  fi
done
if [ ! -z "$JARS" ]; then
    echo "These jars should be deleted and symlinked to system jars: $JARS"
   #FIXME: enable  exit 1
fi
%endif

# see http://dev.eclipse.org/mhonarc/lists/linuxtools-dev/msg00584.html type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds T,java.lang.Object
#    [javac]             nextObject = noElement();
%patch11
%patch12
popd

#sed -i "s|junit4.jar|%{_javadir}/junit48.jar|" build.xml

#patch -l -p0 < %{PATCH5}
#patch -l -p0 < %{PATCH6}
#patch -l -p0 < %{PATCH7}
#patch -l -p0 < %{PATCH8}

#patch -l -p0 < %{PATCH9}
#patch -l -p0 < %{PATCH10}
%patch13 -p0
%patch14 -p1

%build
#:<< ___EOF
#sed -i "s|/usr/lib/xulrunner-sdk-1.9.1/sdk|/usr/include/xulrunner-sdk-1.9.2/sdk|" \
#	build/eclipse-%{version}-src/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel4.csh
#sed -i "s|/include/config.h|/include/mozilla-config.h|" \
#	build/eclipse-%{version}-src/plugins/org.eclipse.swt.gtk.linux.x86/buildLibraries_rhel4.csh

rm -rf dependencies.properties
cat > dependencies.properties << ___GIL
%if ! %{bootstrap}
com.ibm.icu_%icu4j_bundle_version.jar=%{_libdir}/eclipse/plugins/com.ibm.icu_%icu4j_bundle_version.jar:%{_javadir}/icu4j/icu4j.jar
%else
# on x86_64 bootstrap using 32bit package
com.ibm.icu_%icu4j_bundle_version.jar=%{_libdir}/eclipse/plugins/com.ibm.icu_%icu4j_bundle_version.jar:%{_prefix}/lib/eclipse/plugins/com.ibm.icu_%icu4j_bundle_version.jar:%{_javadir}/icu4j/icu4j.jar
%endif
com.jcraft.jsch_0.1.41.v200903070017.jar=%{_javadir}/jsch.jar
javax.servlet_2.5.0.v200910301333.jar=%{_javadir}/tomcat6-servlet-2.5-api.jar
javax.servlet.jsp_2.0.0.v200806031607.jar=%{_javadir}/tomcat6-jsp-2.1-api.jar
org.apache.commons.codec_1.3.0.v20080530-1600.jar=%{_javadir}/commons-codec.jar
org.apache.commons.el_1.0.0.v200806031608.jar=%{_javadir}/commons-el.jar:%{_javadir}/jakarta-commons-el.jar
org.apache.commons.httpclient_3.1.0.v201005080502.jar=%{_javadir}/commons-httpclient.jar
org.apache.commons.logging_1.0.4.v201005080501.jar=%{_javadir}/jakarta-commons-logging104.jar:%{_javadir}/commons-logging104.jar
org.apache.jasper_5.5.17.v200903231320.jar=%{_datadir}/eclipse/plugins/org.apache.jasper_5.5.17.v200706111724.jar
org.apache.lucene_1.9.1.v20100518-1140.jar=%{_javadir}/lucene-core.jar
org.apache.lucene.analysis_1.9.1.v20100518-1140.jar=%{_javadir}/lucene-contrib/lucene-analyzers.jar
org.mortbay.jetty.util_6.1.23.v201004211559.jar=%{_javadir}/jetty6/jetty-util.jar
org.mortbay.jetty.server_6.1.23.v201004211559.jar=%{_javadir}/jetty6/jetty.jar
org.objectweb.asm_3.2.0.v200909071300.jar=%{_javadir}/objectweb-asm/asm-all.jar
org.sat4j.core_2.2.0.v20100429.jar=%{_javadir}/org.sat4j.core.jar
org.sat4j.pb_2.2.0.v20100429.jar=%{_javadir}/org.sat4j.pb.jar
___GIL

ANTVERSION=$(ls build/eclipse-%{version}-src/plugins | grep org.apache.ant_ | \
  sed 's/org.apache.ant_//')

rm -rf nonosgidependencies.properties
cat > nonosgidependencies.properties << ___GIL
org.apache.ant_$ANTVERSION/lib/ant-antlr.jar=%{_javadir}/ant/ant-antlr.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-bcel.jar=%{_javadir}/ant/ant-apache-bcel.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-bsf.jar=%{_javadir}/ant/ant-apache-bsf.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-log4j.jar=%{_javadir}/ant/ant-apache-log4j.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-oro.jar=%{_javadir}/ant/ant-apache-oro.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-regexp.jar=%{_javadir}/ant/ant-apache-regexp.jar
org.apache.ant_$ANTVERSION/lib/ant-apache-resolver.jar=%{_javadir}/ant/ant-apache-resolver.jar
org.apache.ant_$ANTVERSION/lib/ant-commons-logging.jar=%{_javadir}/ant/ant-commons-logging.jar
org.apache.ant_$ANTVERSION/lib/ant-commons-net.jar=%{_javadir}/ant/ant-commons-net.jar
org.apache.ant_$ANTVERSION/lib/ant.jar=%{_javadir}/ant.jar
org.apache.ant_$ANTVERSION/lib/ant-javamail.jar=%{_javadir}/ant/ant-javamail.jar
org.apache.ant_$ANTVERSION/lib/ant-jdepend.jar=%{_javadir}/ant/ant-jdepend.jar
org.apache.ant_$ANTVERSION/lib/ant-jsch.jar=%{_javadir}/ant/ant-jsch.jar
org.apache.ant_$ANTVERSION/lib/ant-junit.jar=%{_javadir}/ant/ant-junit.jar
org.apache.ant_$ANTVERSION/lib/ant-launcher.jar=%{_javadir}/ant-launcher.jar
org.apache.ant_$ANTVERSION/lib/ant-swing.jar=%{_javadir}/ant/ant-swing.jar
___GIL

rm -rf jdtdependencies.properties
cat > jdtdependencies.properties << ___GIL
org.hamcrest.core_1.1.0.v20090501071000.jar=%{_javadir}/hamcrest/core.jar
___GIL

JUNIT3VERSION=$(ls build/eclipse-%{version}-src/plugins | grep org.junit_3 | \
  sed 's/org.junit_//')
JUNIT4VERSION=$(ls build/eclipse-%{version}-src/plugins | grep org.junit_4 | \
  sed 's/org.junit_//')

rm -rf jdtnonosgidependencies.properties
cat > jdtnonosgidependencies.properties << ___GIL
org.junit_$JUNIT3VERSION/junit.jar=%{_javadir}/junit-3.8.2.jar
org.junit4/junit.jar=%{_javadir}/junit48.jar
org.junit_$JUNIT4VERSION/junit.jar=%{_javadir}/junit48.jar
___GIL

rm -rf sdkdependencies.properties
cat > sdkdependencies.properties << ___GIL
org.objectweb.asm_3.2.0.v200909071300.jar=%{_javadir}/objectweb-asm/asm-all.jar
___GIL

#___EOF
export JAVA_HOME=%{javahome} ANT_OPTS="-Xmx512M"
ant -DbuildArch=%{eclipse_arch}
# provision.cvs

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

# Get swt version
SWT_MAJ_VER=$(grep maj_ver build/eclipse-%{version}-src/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/make_common.mak | cut -f 2 -d =)
SWT_MIN_VER=$(grep min_ver build/eclipse-%{version}-src/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/make_common.mak | cut -f 2 -d =)
SWT_VERSION=$SWT_MAJ_VER$SWT_MIN_VER

ant -DdestDir=%{buildroot} -Dprefix=/usr -DbuildArch=%{eclipse_arch} -Dmultilib=true install

pushd %{buildroot}%{_libdir}/%{name}
	rm -f eclipse.ini
	ln -s %{buildroot}%{_sysconfdir}/eclipse.ini
popd

# Set GDK_NATIVE_WINDOWS=true
# https://bugzilla.redhat.com/531675 (https://bugs.eclipse.org/290395)
rm -rf %{buildroot}%{_bindir}/%{name}
mkdir -p %{buildroot}%{_bindir}
install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/%{name}
sed --in-place "s:/usr/lib:%{_libdir}:g" %{buildroot}%{_bindir}/%{name}

cp %{buildroot}%{_sysconfdir}/eclipse.ini eclipse.ini-real

sdkDir=%{buildroot}%{_libdir}/%{name}

mkdir -p %{buildroot}%{_libdir}/java

mkdir -p %{buildroot}%{_datadir}/%{name}/features
mkdir -p %{buildroot}%{_datadir}/%{name}/plugins

rm -fr %{buildroot}%{_libdir}/eclipse/p2

LAUNCHERVERSION=$(ls $sdkDir/plugins | grep equinox.launcher_ | sed 's/org.eclipse.equinox.launcher_//')

installDir=$sdkDir-Platform
metadataDir=$installDir/metadata-Platform
provisionDir=$installDir-provisioned
profileId=PlatformProfile

# Copy just the platform
mkdir $installDir
pushd $installDir
	sh %{SOURCE20} $sdkDir
	mv plugins/*.source* $sdkDir/plugins
popd

# Generate metadata for the platform
%{java_bin} \
	-cp $installDir/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
	org.eclipse.core.launcher.Main \
	-application \
	org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
	-metadataRepository file:$metadataDir \
	-artifactRepository file:$metadataDir \
	-source $installDir \
	-root "Eclipse Platform" \
	-rootVersion %{version} \
	-flavor tooling \
	-publishArtifacts \
	-append \
	-artifactRepositoryName "Eclipse Platform" \
	-metadataRepositoryName "Eclipse Platform" \
	-debug -consolelog

# JDT
jdtDir=$sdkDir-JDT
jdtMetadata=$jdtDir/metadata-JDT

mkdir $jdtDir
pushd $jdtDir
mkdir features plugins
mv $sdkDir/features/org.eclipse.jdt_* features
	for plugin in org.eclipse.jdt \
		org.eclipse.ant.ui \
		org.eclipse.jdt.apt.core \
		org.eclipse.jdt.apt.ui \
		org.eclipse.jdt.apt.pluggable.core \
		org.eclipse.jdt.compiler.apt \
		org.eclipse.jdt.compiler.tool \
		org.eclipse.jdt.core \
		org.eclipse.jdt.core.manipulation \
		org.eclipse.jdt.debug.ui \
		org.eclipse.jdt.debug \
		org.eclipse.jdt.junit \
		org.eclipse.jdt.junit.core \
		org.eclipse.jdt.junit.runtime \
		org.eclipse.jdt.junit4.runtime \
		org.eclipse.jdt.launching \
		org.eclipse.jdt.ui \
		org.eclipse.jdt.doc.user \
		org.junit \
		org.junit4 ; do
		mv $sdkDir/plugins/${plugin}_* plugins
	done
popd
#  
# Debugging?  Add -debug and -consolelog
# Provision with director
%{java_bin} \
	-Declipse.p2.data.area=file:$provisionDir/p2 \
	-Declipse.p2.MD5Check=false \
	-cp $installDir/plugins/org.eclipse.equinox.launcher_$LAUNCHERVERSION \
	org.eclipse.core.launcher.Main \
	-application \
	org.eclipse.equinox.p2.director \
	-debug -consolelog \
	-flavor tooling \
	-installIU "Eclipse Platform" \
	-p2.os linux \
	-p2.ws gtk \
	-p2.arch %{eclipse_arch} \
	-roaming \
	-profile $profileId \
	-profileProperties org.eclipse.update.install.features=true \
	-metadataRepository file:$metadataDir \
	-artifactRepository file:$metadataDir \
	-destination $provisionDir \
	-bundlepool $provisionDir

# Stuff in JDT, PDE, SDK
for f in about.html about_files \.eclipseproduct epl-v10.html notice.html readme; do
	if [ -e $installDir/$f ]; then
		mv $installDir/$f $provisionDir
	fi
done

dropins=$provisionDir/dropins
mkdir -p $dropins/jdt $dropins/sdk
mv $jdtDir/features $dropins/jdt
mv $jdtDir/plugins $dropins/jdt

mv $sdkDir/features $dropins/sdk
mv $sdkDir/plugins $dropins/sdk
rm -rf $metadataDir $jdtDir $sdkDir $installDir

mv $provisionDir $sdkDir

# Fix paths in p2 data
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.core/cache
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.director/rollback/content.xml
sed -i "s|file\:$provisionDir/\ -\ bundle\ pool|Eclipse Platform|g" $sdkDir/artifacts.xml
profileDir=$sdkDir/p2/org.eclipse.equinox.p2.engine/profileRegistry
pushd $profileDir
	sed -i "s|$provisionDir|%{_libdir}/%{name}|g" PlatformProfile.profile/*
	sed -i "s|%{buildroot}||g" PlatformProfile.profile/*
	sed -i "s|eclipse-Platform|eclipse|g" PlatformProfile.profile/*
popd


sed --in-place "s|SDKProfile|PlatformProfile|" %{buildroot}%{_libdir}/%{name}/configuration/config.ini

# Add a compatibility symlink to startup.jar
pushd $sdkDir
	LAUNCHERNAME=$(ls plugins | grep equinox.launcher_)
	ln -s plugins/$LAUNCHERNAME startup.jar
popd

# Remove the unnecessary configuration data
rm -r $sdkDir/configuration/org.eclipse.update

%if %{initialize}
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=90535
pushd %{buildroot}
	mv %{buildroot}%{_libdir}/eclipse/dropins  %{buildroot}/dropins
	mkdir %{buildroot}%{_libdir}/eclipse/dropins
	libdir_path=$(echo %{_libdir}/%{name} | sed -e 's/^\///')
	%{java_bin} -Dosgi.sharedConfiguration.area=%{buildroot}$libdir_path/configuration \
		-cp $libdir_path/startup.jar \
		org.eclipse.core.launcher.Main \
		-debug -consolelog \
		-metadataRepository file:$metadataDir \
		-artifactRepository file:$metadataDir \
		-application org.eclipse.equinox.initializer.configInitializer \
		-fileInitializer %{SOURCE19}
popd

rm -fr %{buildroot}%{_libdir}/eclipse/dropins
mv %{buildroot}/dropins %{buildroot}%{_libdir}/eclipse/dropins

# Do this again after we've run the file initializer
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.core/cache
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.director/rollback/content.xml
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
rm -rf $sdkDir/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/.data/.settings
pushd $profileDir
  	sed -i "s|%{buildroot}||g" *.profile/*
popd

# Remove the unnecessary configuration data
rm -r $sdkDir/configuration/org.eclipse.core.runtime
rm -r $sdkDir/configuration/org.eclipse.equinox.app
rm -rf $sdkDir/configuration/*.log
dataDirs=$(find $sdkDir/configuration -type d -name data)
for dataDir in $dataDirs; do
    	rm -rf `dirname $dataDir`
done

#pushd $sdkDir
## Create file listings for the extracted shared libraries
#	echo -n "" > %{_builddir}/%{buildsubdir}/eclipse-platform.install;
#	for id in `ls configuration/org.eclipse.osgi/bundles`; do
#		if [ "Xconfiguration" = $(echo X`find configuration/org.eclipse.osgi/bundles/$id -name libswt\*.so` | sed "s:/.*::") ]; then
#			echo "%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" > %{_builddir}/%{buildsubdir}/%{name}-swt.install;
#		else
#			echo "%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" >> %{_builddir}/%{buildsubdir}/%{name}-platform.install;
#		fi
#	done
#popd

# Install libswt*.so
cp -a build/eclipse-%{version}-src/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}/library/libswt-*.so %{buildroot}%{_libdir}/%{name}

# Install symlinks to the SWT JNI shared libraries in %%{_libdir}/eclipse
pushd %{buildroot}%{_libdir}/%{name}
	for lib in $(find configuration -name libswt\*.so); do
		ln -s $lib `basename $lib`
	done
popd

# Ensure the shared libraries have the correct permissions
pushd %{buildroot}%{_libdir}/%{name}
	for lib in `find configuration -name \*.so`; do
		chmod 755 $lib
	done
popd
%endif

cp -p eclipse.ini-real %{buildroot}%{_sysconfdir}/eclipse.ini

sed -i "s|%{buildroot}||g" %{buildroot}%{_sysconfdir}/eclipse.ini

# Temporary fix until https://bugs.eclipse.org/294877 is resolved
sed -i "s|-Xms40m|-Xms128m|g" %{buildroot}%{_sysconfdir}/eclipse.ini
sed -i "s|-Xmx256m|-Xmx512m|g" %{buildroot}%{_sysconfdir}/eclipse.ini
echo "" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/python/pydev/editor/codecompletion/revisited/PythonPathHelper,isValidSourceFile" >> %{buildroot}%{_sysconfdir}/eclipse.ini
echo "-XX:CompileCommand=exclude,org/python/pydev/ui/filetypes/FileTypesPreferencesPage,getDottedValidSourceFiles" >> %{buildroot}%{_sysconfdir}/eclipse.ini

mkdir -p %{buildroot}%{_libdir}/%{name}/links
# FIXME:  We can probably get rid of the links file when we ensure all
# plugins are installing into dropins (either in libdir or datadir).
# Set up an extension location and a link file for the arch-independent dir
echo "path:%{_datadir}" > $sdkDir/links/datadir.link

# Ensure the launcher binary has the correct permissions
chmod 755 %{buildroot}%{_libdir}/%{name}/%{name}

# Install the SWT jar symlinks in libdir
SWTJARVERSION=$(grep %{version} build/eclipse-%{version}-src/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}/build.xml | sed "s:.*<.*\"\(.*\)\" />:\1:")
pushd %{buildroot}%{_libdir}/%{name}
	ln -s plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_$SWTJARVERSION.jar swt-gtk-%{majver}.%{minver}.jar
	ln -s swt-gtk-%{majver}.%{minver}.jar swt-gtk-%{majver}.jar
	ln -s swt-gtk-%{majver}.%{minver}.jar swt.jar
	ln -s ../%{name}/swt-gtk-%{majver}.%{minver}.jar ../java/swt.jar
popd

# Install the efj wrapper script
install -pm 755 %{SOURCE17} %{buildroot}%{_bindir}/efj
sed --in-place "s:startup.jar:%{_libdir}/%{name}/startup.jar:" %{buildroot}%{_bindir}/efj

rm -rf $installDir

# A sanity check.
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

# Create a script that can be used to make a symlink tree of the
# eclipse platform.
cp -p pdebuild/eclipse-copy-platform.sh copy-platform
(
  cd %{buildroot}%{_libdir}/%{name}
  ls -d * | egrep -v '^(plugins|features|about_files|dropins)$'
  ls -d plugins/* features/*
) |
sed -e's,^\(.*\),[ ! -e \1 ] \&\& ln -s $eclipse/\1 \1,' >> copy-platform
mkdir -p %{buildroot}%{_libdir}/%{name}/buildscripts
mv copy-platform %{buildroot}%{_libdir}/%{name}/buildscripts
copyPlatform=%{buildroot}%{_libdir}/%{name}/buildscripts/copy-platform
pushd %{buildroot}%{_libdir}/%{name}
	for p in $(ls -d dropins/jdt/plugins/*); do
		plugin=$(basename $p)
		echo $p | sed -e"s,^\(.*\),[ ! -e plugins/$plugin ] \&\& ln -s \$eclipse/\1 plugins/$plugin," >> $copyPlatform
	done
	for p in $(ls -d dropins/sdk/plugins/*); do
		plugin=$(basename $p)
		echo $p | sed -e"s,^\(.*\),[ ! -e plugins/$plugin ] \&\& ln -s \$eclipse/\1 plugins/$plugin," >> $copyPlatform
	done
popd

sed --in-place "s|%{buildroot}%{_libdir}/eclipse-Platform/p2/|%{_libdir}/eclipse/p2/|" %{buildroot}%{_libdir}/%{name}/configuration/config.ini
sed --in-place "s|file\\\:%{_libdir}/eclipse/p2/|@.../../p2/|" %{buildroot}%{_libdir}/%{name}/configuration/config.ini

# Install the PDE Build wrapper script.
install -p -D -m0755 pdebuild/eclipse-pdebuild.sh %{buildroot}%{_libdir}/%{name}/buildscripts/pdebuild
PDEBUILDVERSION=$(ls %{buildroot}%{_libdir}/%{name}/dropins/sdk/plugins | grep org.eclipse.pde.build_ | sed 's/org.eclipse.pde.build_//')
sed -i "s/@PDEBUILDVERSION@/$PDEBUILDVERSION/g" %{buildroot}%{_libdir}/%{name}/buildscripts/pdebuild

%if %with_system_icu4j
# This symlink is actually provided by the java-icu4j4-eclipse package
rm -rf %{buildroot}%{_libdir}/%{name}/plugins/com.ibm.icu_%icu4j_bundle_version.jar
%endif

%if ! %{bootstrap}
pushd %{buildroot}%{_libdir}/%{name}

#	pushd dropins/jdt
# linked during the build
#		JUNIT3VERSION=$(ls plugins | grep org.junit_3 | sed 's/org.junit_//')
#		rm plugins/org.junit_$JUNIT3VERSION/junit.jar
#		ln -s %{_javadir}/junit-3.8.2.jar plugins/org.junit_$JUNIT3VERSION/junit.jar

#		rm plugins/org.junit4/junit.jar
#		ln -s %{_javadir}/junit48.jar plugins/org.junit4/junit.jar
#		JUNIT4VERSION=$(ls plugins | grep org.junit_4 | sed 's/org.junit_//')
#		rm plugins/org.junit_$JUNIT4VERSION/junit.jar
#		ln -s %{_javadir}/junit48.jar plugins/org.junit_$JUNIT4VERSION/junit.jar

#	popd
#	pushd dropins/sdk
#               rm plugins/junit4.jar
#	       ln -s %{_javadir}/junit4.jar %{_javadir}/junit48.jar
#               rm plugins/org.junit4/junit.jar
#	       ln -s %{_javadir}/junit48.jar plugins/org.junit4/junit.jar
#	       HAMCRESTVERSION=$(ls plugins | grep org.hamcrest.core_ | sed 's/org.hamcrest.core_//')
#               rm plugins/org.hamcrest.core_$HAMCRESTVERSION.jar
#               ln -s %{_javadir}/hamcrest/core.jar plugins/org.hamcrest.core_$HAMCRESTVERSION.jar
#	       ASMVERSION=$(ls plugins | grep org.hamcrest.core_ | sed 's/org.hamcrest.core_//')
#               plugins/org.objectweb.asm_$ASMVERSION.jar
#               ln -s %{_javadir}/objectweb-asm/asm-all.jar plugins/org.objectweb.asm_$ASMVERSION.jar
#	popd

	ANTVERSION=$(ls plugins | grep org.apache.ant_ | sed 's/org.apache.ant_//')
	rm plugins/org.apache.ant_$ANTVERSION/lib/ant*.jar
        ln -s %{_javadir}/ant/ant-antlr.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-antlr.jar
        ln -s %{_javadir}/ant/ant-apache-bcel.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-bcel.jar
        ln -s %{_javadir}/ant/ant-apache-bsf.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-bsf.jar
        ln -s %{_javadir}/ant/ant-apache-log4j.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-log4j.jar
        ln -s %{_javadir}/ant/ant-apache-oro.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-oro.jar
        ln -s %{_javadir}/ant/ant-apache-regexp.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-regexp.jar
        ln -s %{_javadir}/ant/ant-apache-resolver.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-apache-resolver.jar
        ln -s %{_javadir}/ant/ant-commons-logging.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-commons-logging.jar
        ln -s %{_javadir}/ant/ant-commons-net.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-commons-net.jar
        ln -s %{_javadir}/ant.jar plugins/org.apache.ant_$ANTVERSION/lib/ant.jar
        ln -s %{_javadir}/ant/ant-javamail.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-javamail.jar
        ln -s %{_javadir}/ant/ant-jdepend.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-jdepend.jar
        ln -s %{_javadir}/ant/ant-jsch.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-jsch.jar
        ln -s %{_javadir}/ant/ant-junit.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-junit.jar
        ln -s %{_javadir}/ant-launcher.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-launcher.jar
        ln -s %{_javadir}/ant/ant-nodeps.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-nodeps.jar
        ln -s %{_javadir}/ant/ant-swing.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-swing.jar
        ln -s %{_javadir}/ant/ant-trax.jar plugins/org.apache.ant_$ANTVERSION/lib/ant-trax.jar

	JSCHVERSION=$(ls plugins | grep com.jcraft.jsch_ | sed 's/com.jcraft.jsch_//')
	rm plugins/com.jcraft.jsch_$JSCHVERSION
        ln -s %{_javadir}/jsch.jar plugins/com.jcraft.jsch_$JSCHVERSION

	SERVLETVERSION=$(ls plugins | grep javax.servlet_ | sed 's/javax.servlet_//')
        rm plugins/javax.servlet_$SERVLETVERSION
        ln -s %{_javadir}/tomcat6-servlet-2.5-api.jar plugins/javax.servlet_$SERVLETVERSION

	JSPVERSION=$(ls plugins | grep javax.servlet.jsp_ | sed 's/javax.servlet.jsp_//')
	rm plugins/javax.servlet.jsp_$JSPVERSION
        ln -s %{_javadir}/tomcat6-jsp-2.1-api.jar plugins/javax.servlet.jsp_$JSPVERSION

	CODECVERSION=$(ls plugins | grep org.apache.commons.codec_ | sed 's/org.apache.commons.codec_//')
	rm plugins/org.apache.commons.codec_$CODECVERSION
        ln -s %{_javadir}/commons-codec.jar plugins/org.apache.commons.codec_$CODECVERSION

	ELVERSION=$(ls plugins | grep org.apache.commons.el_ | sed 's/org.apache.commons.el_//')
	rm plugins/org.apache.commons.el_$ELVERSION
        ln -s %{_javadir}/commons-el.jar plugins/org.apache.commons.el_$ELVERSION

	HTTPCLIENTVERSION=$(ls plugins | grep org.apache.commons.httpclient_ | sed 's/org.apache.commons.httpclient_//')
	rm plugins/org.apache.commons.httpclient_$HTTPCLIENTVERSION
        ln -s %{_javadir}/commons-httpclient.jar plugins/org.apache.commons.httpclient_$HTTPCLIENTVERSION
	
        LOGGINGVERSION=$(ls plugins | grep org.apache.commons.logging_ | sed 's/org.apache.commons.logging_//')
	rm plugins/org.apache.commons.logging_$LOGGINGVERSION
        ln -s %{_javadir}/commons-logging104.jar plugins/org.apache.commons.logging_$LOGGINGVERSION

	JASPERVERSION=$(ls plugins | grep org.apache.jasper_ | sed 's/org.apache.jasper_//')
	rm plugins/org.apache.jasper_$JASPERVERSION
        ln -s %{_datadir}/eclipse/plugins/org.apache.jasper_5.5.17.v200706111724.jar plugins/org.apache.jasper_$JASPERVERSION

        LUCENEVERSION=$(ls plugins | grep org.apache.lucene_ | sed 's/org.apache.lucene_//')
	rm plugins/org.apache.lucene*_$LUCENEVERSION
        ln -s %{_javadir}/lucene-core.jar plugins/org.apache.lucene_$LUCENEVERSION
        ln -s %{_javadir}/lucene-contrib/lucene-analyzers.jar plugins/org.apache.lucene.analysis_$LUCENEVERSION

        JETTYVERSION=$(ls plugins | grep org.mortbay.jetty.util_ | sed 's/org.mortbay.jetty.util_//')
	rm plugins/org.mortbay.jetty.*_$JETTYVERSION
        ln -s %{_javadir}/jetty6/jetty-util.jar plugins/org.mortbay.jetty.util_$JETTYVERSION
        ln -s %{_javadir}/jetty6/jetty.jar plugins/org.mortbay.jetty.server_$JETTYVERSION

        SAT4JVERSION=$(ls plugins | grep org.sat4j.core_ | sed 's/org.sat4j.core_//')
	rm plugins/org.sat4j.*_$SAT4JVERSION
        ln -s %{_javadir}/org.sat4j.core.jar plugins/org.sat4j.core_$SAT4JVERSION
        ln -s %{_javadir}/org.sat4j.pb.jar plugins/org.sat4j.pb_$SAT4JVERSION

popd
%endif

# Be sure that we have a symlink to /etc/eclipse.ini
pushd %{buildroot}%{_libdir}/%{name}
	rm -f eclipse.ini
	ln -s %{_sysconfdir}/eclipse.ini
popd


%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post platform
touch %{_datadir}/icons/hicolor >&/dev/null || :

%postun platform
if [ $1 -eq 0 ]; then
	touch --no-create %{_datadir}/icons/hicolor >&/dev/null || :
  	%{_bindir}/gtk-update-icon-cache -q %{_datadir}/icons/hicolor >&/dev/null || :
fi

%files swt
%defattr(-,root,root)
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/plugins
%if %{initialize}
%dir %{_libdir}/%{name}/libswt-*.so
%dir %{_libdir}/%{name}/configuration
%dir %{_libdir}/%{name}/configuration/org.eclipse.osgi
%dir %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles
%{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/*
%endif
%{_libdir}/%{name}/plugins/org.eclipse.swt_*
%{_libdir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_*
%{_libdir}/%{name}/swt-gtk*.jar
%{_libdir}/%{name}/swt.jar
%{_libdir}/java/swt.jar

%files rcp
%defattr(-,root,root)
%dir %{_libdir}/%{name}/features
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/features
%dir %{_datadir}/%{name}/plugins
%if %{initialize}
%dir %{_libdir}/%{name}/configuration/org.eclipse.osgi
%{_libdir}/%{name}/configuration/org.eclipse.osgi/.bundledata*
%{_libdir}/%{name}/configuration/org.eclipse.osgi/.lazy*
%{_libdir}/%{name}/configuration/org.eclipse.osgi/.manager
%{_libdir}/%{name}/configuration/org.eclipse.osgi/.state*
%endif
%if ! %with_system_icu4j
%{_libdir}/%{name}/plugins/com.ibm.icu_*
%endif
%dir %config %{_libdir}/%{name}/configuration
%config %{_libdir}/%{name}/configuration/config.ini
%config %{_libdir}/%{name}/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
%dir %{_libdir}/%{name}/configuration/org.eclipse.equinox.simpleconfigurator
%{_libdir}/%{name}/about.html
%{_libdir}/%{name}/notice.html
%{_libdir}/%{name}/epl-v10.html
%{_libdir}/%{name}/links
%{_libdir}/%{name}/readme
%{_libdir}/%{name}/startup.jar
%{_libdir}/%{name}/features/org.eclipse.rcp_*
%{_libdir}/%{name}/plugins/org.eclipse.core.commands_*
%{_libdir}/%{name}/plugins/org.eclipse.core.contenttype_*
%{_libdir}/%{name}/plugins/org.eclipse.core.databinding_*
%{_libdir}/%{name}/plugins/org.eclipse.core.databinding.beans_*
%{_libdir}/%{name}/plugins/org.eclipse.core.databinding.observable_*
%{_libdir}/%{name}/plugins/org.eclipse.core.databinding.property_*
%{_libdir}/%{name}/plugins/org.eclipse.core.expressions_*
%{_libdir}/%{name}/plugins/org.eclipse.core.jobs_*
%{_libdir}/%{name}/plugins/org.eclipse.core.runtime_*
%{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility.auth_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.app_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.common_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.ds_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.launcher_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.launcher.gtk.linux.%{eclipse_arch}_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.preferences_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.registry_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.util_*
%{_libdir}/%{name}/plugins/org.eclipse.help_*
%{_libdir}/%{name}/plugins/org.eclipse.jface_*
%{_libdir}/%{name}/plugins/org.eclipse.jface.databinding_*
%{_libdir}/%{name}/plugins/org.eclipse.osgi_*
%{_libdir}/%{name}/plugins/org.eclipse.rcp_*
%{_libdir}/%{name}/plugins/org.eclipse.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.workbench_*
%{_libdir}/%{name}/plugins/org.eclipse.update.configurator_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.simpleconfigurator_*

%files platform
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/%{name}
%config %{_libdir}/%{name}/eclipse.ini
%config %{_sysconfdir}/eclipse.ini
%{_libdir}/%{name}/about_files
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_datadir}/icons/*/*/apps/*
%{_libdir}/%{name}/eclipse
%dir %{_libdir}/%{name}/dropins
%dir %{_datadir}/%{name}/dropins
%{_libdir}/%{name}/features/org.eclipse.platform_*
%{_libdir}/%{name}/plugins/com.jcraft.jsch_*
%{_libdir}/%{name}/plugins/javax.servlet_*
%{_libdir}/%{name}/plugins/javax.servlet.jsp_*
%{_libdir}/%{name}/plugins/org.apache.ant_*
%{_libdir}/%{name}/plugins/org.apache.commons.el_*
%{_libdir}/%{name}/plugins/org.apache.commons.logging_*
%{_libdir}/%{name}/plugins/org.apache.lucene_*
%{_libdir}/%{name}/plugins/org.apache.lucene.analysis_*
%{_libdir}/%{name}/plugins/org.eclipse.ant.core_*
%{_libdir}/%{name}/plugins/org.eclipse.compare_*
%{_libdir}/%{name}/plugins/org.eclipse.compare.core_*
%{_libdir}/%{name}/plugins/org.eclipse.core.boot_*
%{_libdir}/%{name}/plugins/org.eclipse.core.externaltools_*
%{_libdir}/%{name}/plugins/org.eclipse.core.filebuffers_*
%{_libdir}/%{name}/plugins/org.eclipse.core.filesystem_*
%{_libdir}/%{name}/plugins/org.eclipse.core.filesystem.linux.%{eclipse_arch}_*
%{_libdir}/%{name}/plugins/org.eclipse.core.net_*
%{_libdir}/%{name}/plugins/org.eclipse.core.net.linux.x86_*
%if ! %{bootstrap}
%{_libdir}/%{name}/plugins/org.eclipse.update.core.linux_*
%endif
%{_libdir}/%{name}/plugins/org.eclipse.core.resources_*
#%{_libdir}/%{name}/plugins/org.eclipse.core.resources.compatibility_*
%{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility_*
%{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility.registry_*
%{_libdir}/%{name}/plugins/org.eclipse.core.variables_*
%{_libdir}/%{name}/plugins/org.eclipse.debug.core_*
%{_libdir}/%{name}/plugins/org.eclipse.debug.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.http.jetty_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.http.registry_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.http.servlet_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.jsp.jasper_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.jsp.jasper.registry_*
%{_libdir}/%{name}/plugins/org.eclipse.help.appserver_*
%{_libdir}/%{name}/plugins/org.eclipse.help.base_*
%{_libdir}/%{name}/plugins/org.eclipse.help.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.help.webapp_*
%{_libdir}/%{name}/plugins/org.eclipse.jface.text_*
%{_libdir}/%{name}/plugins/org.eclipse.jsch.core_*
%{_libdir}/%{name}/plugins/org.eclipse.jsch.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.ltk.core.refactoring_*
%{_libdir}/%{name}/plugins/org.eclipse.ltk.ui.refactoring_*
%{_libdir}/%{name}/plugins/org.eclipse.osgi.services_*
%{_libdir}/%{name}/plugins/org.eclipse.osgi.util_*
%{_libdir}/%{name}/plugins/org.eclipse.platform_*
%{_libdir}/%{name}/plugins/org.eclipse.platform.doc.user_*
%{_libdir}/%{name}/plugins/org.eclipse.search_*
%{_libdir}/%{name}/plugins/org.eclipse.team.core_*
%{_libdir}/%{name}/plugins/org.eclipse.team.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.text_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.browser_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.cheatsheets_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.console_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.editors_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.externaltools_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.forms_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.ide_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.ide.application_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.intro_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.intro.universal_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.navigator_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.navigator.resources_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.net_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.presentations.r21_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.views_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.views.properties.tabbed_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.workbench.compatibility_*
%{_libdir}/%{name}/plugins/org.eclipse.ui.workbench.texteditor_*
%{_libdir}/%{name}/plugins/org.eclipse.update.core_*
%{_libdir}/%{name}/plugins/org.eclipse.update.scheduler_*
%{_libdir}/%{name}/plugins/org.eclipse.update.ui_*
%{_libdir}/%{name}/plugins/org.mortbay.jetty.util_*
%{_libdir}/%{name}/plugins/org.mortbay.jetty.server_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.initializer_*
%{_libdir}/%{name}/plugins/org.eclipse.team.cvs.core_*
%{_libdir}/%{name}/plugins/org.eclipse.cvs_*
%{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ssh2_*
#%{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ssh_*
%{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ui_*
%{_libdir}/%{name}/features/org.eclipse.cvs_*
%{_libdir}/%{name}/features/org.eclipse.help_*
%{_libdir}/%{name}/plugins/org.apache.jasper_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.event_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.frameworkadmin_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.frameworkadmin.equinox_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.simpleconfigurator.manipulator_*
%{_libdir}/%{name}/features/org.eclipse.equinox.p2.user.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.director_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.core_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.engine_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.jarprocessor_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.metadata_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.metadata.repository_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.artifact.repository_*
#%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.exemplarysetup_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.touchpoint.eclipse_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.touchpoint.natives_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.console_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.ui.sdk_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.updatechecker_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.garbagecollector_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.directorywatcher_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.operations_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.publisher_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.ql_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.repository_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.repository.tools_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.reconciler.dropins_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.metadata.generator_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.updatesite_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.security_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.security.ui_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.extensionlocation_*
%{_libdir}/%{name}/plugins/org.eclipse.equinox.p2.director.app_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.provider.filetransfer_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.provider.filetransfer.httpclient_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.provider.filetransfer.httpclient.ssl_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.provider.filetransfer.ssl_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.ssl_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.filetransfer_*
%{_libdir}/%{name}/plugins/org.eclipse.ecf.identity_*
%{_libdir}/%{name}/plugins/org.apache.commons.codec_*
%{_libdir}/%{name}/plugins/org.apache.commons.httpclient_*
%{_libdir}/%{name}/plugins/org.sat4j.core_*
%{_libdir}/%{name}/plugins/org.sat4j.pb_*
%{_libdir}/%{name}/artifacts.xml
#%{_libdir}/%{name}/metadata
%{_libdir}/%{name}/p2

%files jdt
%defattr(-,root,root)
%{_bindir}/efj
%{_libdir}/%{name}/dropins/jdt

%files pde
%defattr(-,root,root)
%{_libdir}/%{name}/buildscripts
%{_libdir}/%{name}/dropins/sdk
#%{_libdir}/%{name}/configuration/org.eclipse.equinox.source

%changelog
* Sun Apr 27 2014 Silvan Calarco <silvan.calarco@...> 3.6.2-2mamba
- replace requirement for sun-java-javadoc with java-openjdk-javadoc
- added a patch to fix crash when disposing a combo since glib 2.38

* Fri Aug 24 2012 Silvan Calarco <silvan.calarco@...> 3.6.2-1mamba
- update to 3.6.2

* Mon Mar 28 2011 gil <puntogil@...> 3.6.0-9mamba
- NOTE: SRPM recreated after data integrity loss from 3.6.0-7mamba specfile
- The following changes in specfile have been lost: rebuilt with java-openjdk support

* Wed Dec 22 2010 gil <puntogil@...> 3.6.0-8mamba
- fix wrong requires (need jakarta-commons-logging104)

* Wed Dec 01 2010 gil <puntogil@...> 3.6.0-7mamba
- rebuilt after bootstrap

* Mon Oct 11 2010 gil <puntogil@...> 3.6.0-6mamba
- rebuilt with new xulrunner (2.0); libwebkit-gtk (1.3.6)

* Mon Oct 04 2010 gil <puntogil@...> 3.6.0-5mamba
- rebuilt with new xulrunner

* Wed Sep 29 2010 gil <puntogil@...> 3.6.0-4mamba
- edit %%post %postun scripts

* Thu Sep 23 2010 gil <puntogil@...> 3.6.0-3mamba
- rebuilt with eclipse-build 0.6.1

* Sat Aug 21 2010 gil <puntogil@...> 3.6.0-2mamba
- rebuilt with eclipse-build 0.6.1RC2

* Wed Aug 11 2010 gil <puntogil@...> 3.6.0-1mamba
- update to 3.6.0 (Helios branch)
- bootstrap

* Sat Jul 24 2010 gil <puntogil@...> 3.5.2-4mamba
- rebuilt with new xulrunner

* Sun Apr 04 2010 gil <puntogil@...> 3.5.2-3mamba
- rebuilt with eclipse-build 0.5.0

* Thu Mar 18 2010 gil <puntogil@...> 3.5.2-2mamba
- cleaned up spec file

* Wed Mar 17 2010 gil <puntogil@...> 3.5.2-1mamba
- update to 3.5.2
- bootstrap

* Wed Dec 30 2009 gil <puntogil@...> 3.5.1-1mamba
- first build (Galileo branch)