From 365f2e686b3f3cabe38c729a058d87a97600a6fa Mon Sep 17 00:00:00 2001 From: Ben Konrath Date: Nov 02 2006 01:59:53 +0000 Subject: - Move copy-platform to %%{_libdir}/eclipse - Move the platform.source, icu4j, icu4j.source, help.webapp and update.core.linux plugins to %%{_libdir}/eclipse/plugins because it has the laucher src zip which is arch specific. - Disable building the help indexes on all archs so that we have the same doc pluigns on all archs. - Remove org.apache.ant_1.6.5/bin/runant.py to avoid multilib conflicts. - Repack all the jars and the jars within those jars. This is needed to make this package multilib compatible. - Put SWT symlinkis in %%{_libdir}/eclipse instead of %%{_libdir}/eclipse/plugins. --- diff --git a/eclipse.spec b/eclipse.spec index 8e456d1..84dcaf4 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -654,10 +654,8 @@ sed --in-place "s:/usr/lib/:%{_libdir}/:g" build.sh sed --in-place "s:-L\$(AWT_LIB_PATH):-L%{_jvmdir}/java/jre/lib/%{_arch}:" make_linux.mak popd -# FIXME: figure out what's going on with build.index on ppc64, s390x and i386 -%ifarch ppc64 s390 s390x i386 ia64 - find plugins -type f -name \*.xml -exec sed --in-place "s/\(\)/<\!-- \1 -->/" "{}" \; -%endif +# FIXME: figure out what's going on with build.index +find plugins -type f -name \*.xml -exec sed --in-place "s/\(\)/<\!-- \1 -->/" "{}" \; # the swt version is set to HEAD on ia64 but shouldn't be # FIXME: file a bug about this @@ -956,7 +954,28 @@ echo "name=Eclipse Platform" > $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextensi echo "id=org.eclipse.platform" >> $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextension echo "version=%{eclipse_majmin}.%{eclipse_micro}" >> $RPM_BUILD_ROOT%{_libdir}/%{name}/.eclipseextension install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins + +# Install the platform specific fragments in an arch specific dir +install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/*%{eclipse_arch}* $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +# platform.source has the launcher src zip which is platform specific +PLATFORMSOURCEVERSION=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep platform.source_ | sed 's/org.eclipse.plaform.source_//') +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.platform.source_$PLATFORMSOURCEVERSION \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +# help.webapp generates web.xml with Apache Jakarta Tomcat JspC. This file is +# generated differently for different arches. FIXME investigate this. +HELPWEBAPPVERSION=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep help.webapp_ | sed 's/org.eclipse.help.webapp_//') +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.help.webapp_$WEBAPPVERSION \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +# update.core.linux is a fragment +# FIXME: make a patch for upstream to change to swt fragment notation +UPDATECORELINUXVERSION=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep update.core.linux_ | sed 's/org.eclipse.update.core.linux_//') +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.update.core.linux_$UPDATECORELINUXVERSION \ + $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +# FIXME: icu4j generates res_index.txt differently on different arches. +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.ibm.icu_3.4.5.jar $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.ibm.icu.source_3.4.5.jar $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins + mkdir -p home homedir=$(cd home && pwd) @@ -976,9 +995,12 @@ java -Dosgi.sharedConfiguration.area=$libdir_path/configuration \ -fileInitializer %{SOURCE19} popd +# Make propper links file +echo "path:/usr/lib" > $RPM_BUILD_ROOT%{_datadir}/%{name}/links/fragments.link +echo "path:/usr/lib64" > $RPM_BUILD_ROOT%{_datadir}/%{name}/links/fragments64.link + # Install config.ini to an arch dependent location and remove the unnecessary # configuration data - mv $RPM_BUILD_ROOT%{_datadir}/%{name}/configuration $RPM_BUILD_ROOT%{_libdir}/%{name} rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.update rm -r $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.core.runtime @@ -1018,15 +1040,15 @@ done popd # Install the SWT symlinks in libdir -install -d -m 755 $RPM_BUILD_ROOT%{_javadir} swtjarversion=$(grep v$SWT_VERSION plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}/build.xml | sed "s:.*<.*\"\(.*\)\"/>:\1:") -pushd $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins +pushd $RPM_BUILD_ROOT%{_libdir}/%{name} ln -s %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_$swtjarversion.jar swt-gtk-%{eclipse_majmin}.%{eclipse_micro}.jar ln -s swt-gtk-%{eclipse_majmin}.%{eclipse_micro}.jar swt-gtk-%{eclipse_majmin}.jar popd # Install the eclipse-ecj.jar symlink for java-1.4.2-gcj-compat's "javac" JDTCORESUFFIX=$(ls $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins | grep jdt.core_ | sed "s/org.eclipse.jdt.core_//") +install -d -m 755 $RPM_BUILD_ROOT%{_javadir} ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_$JDTCORESUFFIX $RPM_BUILD_ROOT%{_javadir}/eclipse-ecj.jar ln -s %{_javadir}/eclipse-ecj.jar $RPM_BUILD_ROOT%{_javadir}/jdtcore.jar @@ -1220,8 +1242,10 @@ build-jar-repository -s -p plugins/org.junit_* junit # Ensure that the zip files are the same across all builds. # This is needed to make these package multilib compatible. +# FIXME: this needs to be re-written as a separate program +# warning: big hack! mkdir -p ${RPM_BUILD_ROOT}/tmp -for zip in `find ${RPM_BUILD_ROOT}%{_datadir}/%{name} -type f -name \*.zip`; do +for zip in `find ${RPM_BUILD_ROOT}%{_datadir}/%{name} -type f -name \*.zip -o -type f -name \*.jar`; do # unpack every zip, set the date of the files and directories and repack the zip ZIPNAME=`basename $zip` TMPDIR=`mktemp -d -p ${RPM_BUILD_ROOT}/tmp $ZIPNAME.tmpdir.XXXXXXXXXX` @@ -1230,6 +1254,46 @@ for zip in `find ${RPM_BUILD_ROOT}%{_datadir}/%{name} -type f -name \*.zip`; do pushd $TMPDIR unzip -qq -o $zip rm -f $zip + + # check if there are jars or zips inside the zip or jar + zipsinside=`find $TMPDIR -type f -name \*.zip -o -name \*.jar` + if [ -n $zipsinside ]; then + for zip2 in $zipsinside; do + # unpack every zip, set the date of the files and directories and repack the zip + ZIPNAME2=`basename $zip2` + TMPDIR2=`mktemp -d -p ${RPM_BUILD_ROOT}/tmp $ZIPNAME2.tmpdir.XXXXXXXXXX` + ZIPDIR2=`mktemp -d -p ${RPM_BUILD_ROOT}/tmp $ZIPNAME2.zipdir.XXXXXXXXXX` + + pushd $TMPDIR2 + unzip -qq -o $zip2 + rm -f $zip2 + + # create the directories first + for d in `find -type d | LC_ALL=C sort`; do + mkdir -p $ZIPDIR2/$d + done + # move the contents over to the a new directory in order and set the times. + for f in `find -type f | LC_ALL=C sort`; do + cp $f $ZIPDIR2/$f + touch --date="1970-01-01 UTC" $ZIPDIR2/$f + done + popd + + # Set the times of the directories. + touch --date="1970-01-01 UTC" `find $ZIPDIR2 -type d` + + # make the new zip + pushd $ZIPDIR2 + find -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $zip2 -@ + popd + + # Cleanup. + rm -rf $TMPDIR2 + rm -rf $ZIPDIR2 + done + fi + + # now on to the original zip or jar. # create the directories first for d in `find -type d | LC_ALL=C sort`; do mkdir -p $ZIPDIR/$d @@ -1255,6 +1319,11 @@ for zip in `find ${RPM_BUILD_ROOT}%{_datadir}/%{name} -type f -name \*.zip`; do done rm -rf ${RPM_BUILD_ROOT}/tmp +# remove this python script so that it is not aot compiled, thus avoiding a +# multilib conflict +ANTPLUGINVERSION=$(ls plugins | grep org.apache.ant_ | sed 's/org.apache.ant_//') +rm $RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.apache.ant_$ANTPLUGINVERSION/bin/runant.py + %if %{gcj_support} # exclude org.eclipse.ui.ide to work around # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=175547 @@ -1373,7 +1442,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* # FIXME: do we need to build? #%{_libdir}/%{name}/libcairo-swt.so #%{_libdir}/libcairo-swt.so -%{_libdir}/%{name}/plugins/swt-gtk*.jar +%{_libdir}/%{name}/swt-gtk*.jar %if %{gcj_support} %dir %{_libdir}/gcj/%{name} %{_libdir}/gcj/%{name}/org.eclipse.swt.gtk.linux.%{eclipse_arch}_* @@ -1404,7 +1473,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.update.configurator_* %{_datadir}/%{name}/plugins/org.eclipse.osgi_* %{_datadir}/%{name}/plugins/org.eclipse.equinox.registry_* -%{_datadir}/%{name}/plugins/com.ibm.icu_* +%{_libdir}/%{name}/plugins/com.ibm.icu_* %{_datadir}/%{name}/plugins/org.eclipse.jface_* %{_datadir}/%{name}/plugins/org.eclipse.jface.databinding_* %{_datadir}/%{name}/plugins/org.eclipse.core.commands_* @@ -1445,7 +1514,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/features/org.eclipse.rcp.source_* %{_libdir}/%{name}/plugins/org.eclipse.rcp.source.linux.gtk.%{eclipse_arch}* %{_datadir}/%{name}/plugins/org.eclipse.rcp.source_* -%{_datadir}/%{name}/plugins/com.ibm.icu.source_* +%{_libdir}/%{name}/plugins/com.ibm.icu.source_* %files platform -f %{name}-platform.install %defattr(-,root,root) @@ -1475,7 +1544,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.ui.browser_* %{_datadir}/%{name}/plugins/org.eclipse.ui.presentations.r21_* %{_datadir}/%{name}/plugins/org.eclipse.team.ui_* -%{_datadir}/%{name}/plugins/org.eclipse.update.core.linux_* +%{_libdir}/%{name}/plugins/org.eclipse.update.core.linux_* %ifarch %{ix86} x86_64 %{_libdir}/%{name}/plugins/org.eclipse.core.filesystem.linux.%{eclipse_arch}_* %endif @@ -1489,7 +1558,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.ui.console_* %{_datadir}/%{name}/plugins/org.eclipse.platform_* %{_datadir}/%{name}/plugins/org.eclipse.update.ui_* -%{_datadir}/%{name}/plugins/org.eclipse.help.webapp_* +%{_libdir}/%{name}/plugins/org.eclipse.help.webapp_* %{_datadir}/%{name}/plugins/org.eclipse.core.runtime.compatibility_* %{_datadir}/%{name}/plugins/org.eclipse.ui.views_* %{_datadir}/%{name}/plugins/org.eclipse.update.core_* @@ -1577,7 +1646,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/features/org.eclipse.platform.source_* %{_libdir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.%{eclipse_arch}_* %{_datadir}/%{name}/plugins/org.eclipse.platform.doc.isv_* -%{_datadir}/%{name}/plugins/org.eclipse.platform.source_* +%{_libdir}/%{name}/plugins/org.eclipse.platform.source_* %if %{gcj_support} %{_libdir}/gcj/%{name}/org.eclipse.platform.doc.isv_* %endif @@ -1633,7 +1702,7 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.pde.core_* %{_datadir}/%{name}/plugins/org.eclipse.pde.junit.runtime_* %{_datadir}/%{name}/plugins/org.eclipse.pde.ui_* -%{_datadir}/%{name}/buildscripts +%{_libdir}/%{name}/buildscripts %if %{gcj_support} %{_libdir}/gcj/%{name}/org.eclipse.pde_* %{_libdir}/gcj/%{name}/org.eclipse.pde.core_* @@ -1661,6 +1730,19 @@ rm -f %{_datadir}/%{name}/configuration/org.eclipse.update/platform.xml* %{_datadir}/%{name}/plugins/org.eclipse.sdk_* %changelog +* Wed Nov 01 2006 Ben Konrath 3.2.1-12 +- Move copy-platform to %%{_libdir}/eclipse +- Move the platform.source, icu4j, icu4j.source, help.webapp and + update.core.linux plugins to %%{_libdir}/eclipse/plugins because it has + the laucher src zip which is arch specific. +- Disable building the help indexes on all archs so that we have the same doc + pluigns on all archs. +- Remove org.apache.ant_1.6.5/bin/runant.py to avoid multilib conflicts. +- Repack all the jars and the jars within those jars. This is needed + to make this package multilib compatible. +- Put SWT symlinkis in %%{_libdir}/eclipse instead of + %%{_libdir}/eclipse/plugins. + * Wed Nov 01 2006 Andrew Overholt 3.2.1-12 - Use equinox initializer instead of old patch to core.runtime. - Run initializer *after* splitting install into arch-specific and