diff --git a/eclipse.desktop b/eclipse.desktop new file mode 100644 index 0000000..2fcbf87 --- /dev/null +++ b/eclipse.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Eclipse +Comment=Eclipse Integrated Development Environment +Icon=eclipse +Exec=eclipse +Terminal=false +Categories=Development;IDE;Java; \ No newline at end of file diff --git a/eclipse.spec b/eclipse.spec index cf5c582..3b6b1fd 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -9,7 +9,7 @@ Epoch: 1 #%global eb_sha1 8b7060063e10f73e00056a9766d33fc43f043f4b %global build_id I20120608-1400 %global eclipse_version %{eclipse_majmin}.%{eclipse_micro} -#%global emf_version 2.8.0 +%global installation_loc %{_libdir}/%{name} # FIXME: update java packaging guidelines for this. See # fedora-devel-java-list discussion in September 2008. @@ -26,6 +26,8 @@ Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ Source0: eclipse-source.tar.bz2 Source1: eclipse-jdtpdeupdatesite.tar.bz2 +Source2: eclipse.desktop +Source3: efj.sh #Source4: macros.%{name} #Source5: http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi/3.6.0.v20100517/org.eclipse.osgi-3.6.0.v20100517.pom # Fetched from http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi.services/3.2.100.v20100503/org.eclipse.osgi.services-3.2.100.v20100503.pom @@ -33,6 +35,13 @@ Source1: eclipse-jdtpdeupdatesite.tar.bz2 #Source6: org.eclipse.osgi.services-3.2.100.v20100503.pom #Source7: http://repo1.maven.org/maven2/org/eclipse/equinox/http/servlet/1.0.0-v20070606/servlet-1.0.0-v20070606.pom #Source8: org.eclipse.jdt.core-3.8.0.v_C03.pom + + +Source20: rt.incubator.pom.xml +Source21: initializer.pom.xml + +Source30: extract_patterns.txt + #Patch0: lucene-3.6-compile.patch @@ -357,6 +366,13 @@ sed -i -e "s/\"org.eclipse.sdk.ide\"/\"org.eclipse.platform.ide\"/" TMP/org.ecli sed -i -e "s/TMP\/org.eclipse.sdk.epp<\/module>/TMP\/org.eclipse.sdk.epp<\/module>TMP\/jdtpde<\/module>/" pom.xml + + +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=386670 +cp %{SOURCE20} rt.equinox.incubator/pom.xml +cp %{SOURCE21} rt.equinox.incubator/framework/bundles/org.eclipse.equinox.initializer/pom.xml +sed -i -e "s/rt.equinox.p2<\/module>/rt.equinox.p2<\/module>rt.equinox.incubator<\/module>/" pom.xml + %build mvn-local -f eclipse-parent/pom.xml \ install \ @@ -382,6 +398,13 @@ pushd TMP/org.eclipse.sdk.epp/target/products/org.fedoraproject.eclipse.platform ###################### # Extract jdt and pde to dropins ###################### +# do the initializer magic +cp ../../../../../../../../rt.equinox.incubator/framework/bundles/org.eclipse.equinox.initializer/target/org.eclipse.equinox.initializer-1.0.0-SNAPSHOT.jar eclipse/dropins +pushd eclipse + ./eclipse -application org.eclipse.equinox.initializer.configInitializer -justThisArchOSWS -fileInitializer %{SOURCE30} + rm dropins/org.eclipse.equinox.initializer-1.0.0-SNAPSHOT.jar +popd + #make a backup cp -rf eclipse eclipse-backup-with-jdt # go into backup @@ -434,32 +457,87 @@ done cp -r jdt pde eclipse/dropins +cd eclipse +rm -rf configuration/org.eclipse.core.runtime +rm -rf configuration/org.eclipse.equinox.app +rm -rf configuration/org.eclipse.update/* + +find configuration -type d -name "data" -exec rm -rf `pwd`{} \; +find configuration -type f -name "*.log" -exec rm `pwd`{} \; + +cd configuration/org.eclipse.osgi +rm -rf .bundledata* .lazy* .manager .state* + popd %install - # We don't need icon.xpm # https://bugs.eclipse.org/292472 rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/icon.xpm +#install icons +install -D eclipse.platform/platform/org.eclipse.platform/eclipse32.png \ + $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/apps/eclipse.png +install -D eclipse.platform/platform/org.eclipse.platform/eclipse48.png \ + $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/eclipse.png +install -D eclipse.platform/platform/org.eclipse.platform/eclipse256.png \ + $RPM_BUILD_ROOT/usr/share/icons/hicolor/256x256/apps/eclipse.png +mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ +ln -s $RPM_BUILD_ROOT/usr/share/icons/hicolor/256x256/apps/eclipse.png \ + $RPM_BUILD_ROOT/usr/share/pixmaps/eclipse.png + # Some directories we need install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/java install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name} +install -d -m 755 $RPM_BUILD_ROOT/usr/share/eclipse/dropins install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} -pushd $RPM_BUILD_ROOT%{_libdir}/%{name} -# Create file listings for the extracted shared libraries -echo -n "" > %{_builddir}/%{buildsubdir}/%{name}-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 "%verify(not mtime) %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" > %{_builddir}/%{buildsubdir}/%{name}-swt.install; - else - echo "%verify(not mtime) %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" >> %{_builddir}/%{buildsubdir}/%{name}-platform.install; - fi -done +################################# +### Extraced from old build.xml # +################################# + +#installation itself - copy it into right location +rsync -vrpl TMP/org.eclipse.sdk.epp/target/products/org.fedoraproject.eclipse.platform/linux/gtk/x86_64/eclipse \ + $RPM_BUILD_ROOT%{_libdir} + +#desktop file +install -D %{SOURCE2} $RPM_BUILD_ROOT/usr/share/applications/eclipse.desktop + +#eclipse compiler +chmod ugo+rx %{SOURCE3} +install -D %{SOURCE3} $RPM_BUILD_ROOT/bin/efj +TARGET_LAUNCHER=%{installation_loc}\/plugins/`ls TMP/org.eclipse.sdk.epp/target/products/org.fedoraproject.eclipse.platform/linux/gtk/x86_64/eclipse/plugins | grep launcher_[0-9]*` +sed -i -e "s,@LAUNCHER@,${TARGET_LAUNCHER}," $RPM_BUILD_ROOT/bin/efj + +#eclipse binary +ln -s $RPM_BUILD_ROOT/%{_libdir}/%{name}/eclipse $RPM_BUILD_ROOT/bin/eclipse + +pushd $RPM_BUILD_ROOT/%{_libdir}/%{name} + ln -s $RPM_BUILD_ROOT/%{_libdir}/%{name}plugins/org.eclipse.swt.gtk.linux_* swt.jar + ln -s $RPM_BUILD_ROOT/%{_libdir}/%{name}plugins/org.eclipse.swt.gtk.linux_* swt-gtk.jar popd +#config ini +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/ +ln -s $RPM_BUILD_ROOT/%{_libdir}/%{name}/configuration/config.ini $RPM_BUILD_ROOT/%{_sysconfdir}/eclipse.ini +################################# +### End of extraction # +################################# + + +#pushd $RPM_BUILD_ROOT%{_libdir}/%{name} +# Create file listings for the extracted shared libraries +#echo -n "" > %{_builddir}/%{buildsubdir}/%{name}-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 "%verify(not mtime) %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" > %{_builddir}/%{buildsubdir}/%{name}-swt.install; +# else +# echo "%verify(not mtime) %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/$id" >> %{_builddir}/%{buildsubdir}/%{name}-platform.install; +# fi +#done +#popd + # Remove state files pushd $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.osgi/ rm -rf .bundledata* .lazy* .manager .state* @@ -488,6 +566,8 @@ echo "-XX:CompileCommand=exclude,org/python/pydev/ui/filetypes/FileTypesPreferen # Prevent running master Eclipse in a shared configuration echo "-preventMasterEclipseLaunch" | cat - $RPM_BUILD_ROOT/%{_sysconfdir}/eclipse.ini > /tmp/out && mv -f /tmp/out $RPM_BUILD_ROOT/%{_sysconfdir}/eclipse.ini +echo "-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins" >> $RPM_BUILD_ROOT/%{_sysconfdir}/eclipse.ini + # Deploy installation debug config echo -e "org.eclipse.equinox.p2.core/debug=true" > $RPM_BUILD_ROOT%{_libdir}/%{name}/.options echo -e "org.eclipse.equinox.p2.core/reconciler=true" >> $RPM_BUILD_ROOT%{_libdir}/%{name}/.options diff --git a/efj.sh b/efj.sh new file mode 100755 index 0000000..9e68076 --- /dev/null +++ b/efj.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +java -cp @LAUNCHER@ org.eclipse.core.launcher.Main \ + -application org.eclipse.jdt.core.JavaCodeFormatter \ + ${1+"$@"} diff --git a/extract_patterns.txt b/extract_patterns.txt new file mode 100644 index 0000000..8e0dff8 --- /dev/null +++ b/extract_patterns.txt @@ -0,0 +1 @@ +.* = *.so \ No newline at end of file diff --git a/initializer.pom.xml b/initializer.pom.xml new file mode 100644 index 0000000..68c53f3 --- /dev/null +++ b/initializer.pom.xml @@ -0,0 +1,36 @@ + + + 4.0.0 + + rt.equinox.incubator + org.eclipse.equinox.framework + 3.8.0-SNAPSHOT + ../../.. + + org.eclipse.equinox.framework + org.eclipse.equinox.initializer + 1.0.0-SNAPSHOT + eclipse-plugin + + + + + + org.eclipse.tycho + target-platform-configuration + + + + + eclipse-plugin + org.eclipse.core.runtime + [2,5) + + + + + + + + diff --git a/rt.incubator.pom.xml b/rt.incubator.pom.xml new file mode 100644 index 0000000..11665a2 --- /dev/null +++ b/rt.incubator.pom.xml @@ -0,0 +1,34 @@ + + + + + 4.0.0 + + + org.eclipse + eclipse-parent + 1.0.0-SNAPSHOT + ../eclipse-parent + + + org.eclipse.equinox.framework + rt.equinox.incubator + 3.8.0-SNAPSHOT + pom + + + framework/bundles/org.eclipse.equinox.initializer + + +