--- EclipsePlugins.orig.txt 2008-12-08 15:33:14.000000000 -0500 +++ EclipsePlugins.txt 2008-12-08 15:38:12.000000000 -0500 @@ -36,10 +36,10 @@ Eclipse plugins '''SHOULD''' be built with the Eclipse Plugin Development Environment (PDE; PDE Build specifically) because these builds are generally easier to maintain. ant builds are acceptable, but are generally more difficult to maintain. Following what upstream does is the best practice. === pdebuild === -As of Fedora 9, there is a script that makes invoking PDE Build easy: /usr/share/eclipse/buildscripts/pdebuild: +As of Fedora 9, there is a script that makes invoking PDE Build easy: /usr/lib{,64}/eclipse/buildscripts/pdebuild (in Fedora 9 the script is located at /usr/share/eclipse/buildscripts/pdebuild):
-usage: /usr/share/eclipse/buildscripts/pdebuild [] 
+usage: /usr/lib{,64}/eclipse/buildscripts/pdebuild [] 
 
 Use PDE Build to build Eclipse features
 
@@ -52,6 +52,7 @@
 -j      VM arguments (ex. -DJ2SE-1.5=%{_jvmdir}/java/jre/lib/rt.jar)
 -v      Be verbose
 -D      Debug platform itself (passes -consolelog -debug to Eclipse)
+-o      Orbit dependencies
 
{{Template:Warning}} Note: PDE Build must be called explicitly in Fedora 8 and earlier (including EPEL 5). The following snippet may be used to replace the pdebuild call in the template: @@ -80,7 +81,7 @@ ==== EPEL 5 ==== -The copy-platform script is in a different location on RHEL 5 than it is in Fedora. If calling copy-platform explicitly, the following snippet may be useful to facilitate Eclipse plugins for EPEL 5: +The copy-platform script is in a different location on RHEL 5 than it is in Fedora. If calling copy-platform explicitly, the following snippet may be useful to facilitate building Eclipse plugins for EPEL 5:
 %if 0%{?rhel} == 5
 /bin/sh -x %{_libdir}/eclipse/buildscripts/copy-platform SDK %{eclipse_base}
@@ -90,14 +91,25 @@
 
== File Locations == -All plugin jars should go into %{_datadir}/eclipse/plugins and features should go into %{_datadir}/eclipse/features. The only exception is for fragments which should go into %{_libdir}/eclipse/plugins (and features if applicable). +All platform-independent plugins/features should go into %{_datadir}/eclipse/dropins/. JARs should therefore go into %{_datadir}/eclipse/dropins//plugins and features should go into %{_datadir}/eclipse/dropins//features. Architecture-specific plugins/features should go into %{_libdir}/eclipse/dropins/. JARs should therefore go into %{_libdir}/eclipse/dropins//plugins and features should go into %{_datadir}/eclipse/dropins//features. Example: + +
+%install
+rm -rf %{buildroot}
+installDir=%{buildroot}%{_datadir}/eclipse/dropins/quickrex
+install -d -m 755 $installDir
+unzip -q -d $installDir \
+ build/rpmBuild/de.babe.eclipse.plugins.QuickREx.zip
+
+ +For Fedora 9, all plugin jars should go into %{_datadir}/eclipse/plugins and features should go into %{_datadir}/eclipse/features. The only exception is for fragments which should go into %{_libdir}/eclipse/plugins (and features if applicable). Note that this is not reflected in the template below. == Arch vs. noarch == While many Eclipse plugins will be architecture-independent, please follow the ["Packaging/GCJGuidelines"] with regards to gcj ahead-of-time compilation. As those guidelines specify, gcj-compiled packages are arch-dependent and are thus not noarch. == Things to avoid == === Pre-built binaries === -If Eclipse plugins depend upon third party libraries (and licensing permits it), developers often include these libraries directly in their source control system. In this case, the libraries must exist as other packages in Fedora and their contents (such as their jars) be symlinked from within the source and build trees of the Eclipse plugin being packaged. While it may make source archives smaller in size if they are cleansed of these pre-built files, it is not necessary to do so unless the libraries themselves are not redistributable. Binary RPMs '''MUST NOT''' include pre-built files. +If Eclipse plugins depend upon third party libraries (and licensing permits it), developers often include these libraries directly in their source control system. In this case, the libraries must exist as other packages in Fedora and their contents (such as their JARs) be symlinked from within the source and build trees of the Eclipse plugin being packaged. While it may make source archives smaller in size if they are cleansed of these pre-built files, it is not necessary to do so unless the libraries themselves are not redistributable. Binary RPMs '''MUST NOT''' include pre-built files. {{Template:Note}} A simple check which may be run at the end of %prep (courtesy David Walluck (I think that's who gave it to Ben Konrath)):
@@ -108,21 +120,21 @@
 fi
 done
 if [ ! -z "$JARS" ] ; then
-echo "These jars should be deleted and symlinked to system jars: $JARS"
+echo "These JARs should be deleted and symlinked to system JARs: $JARS"
 exit 1
 fi
 
=== Differing from upstream === Plugins that are jarred should remain jarred and those that are expanded should be expanded in their RPM. There are two cases (that we can think of as of this writing) that warrant diverging from upstream: -1. Symlinking to a binary jar from another package -1. Expanding a jar to allow for symlinking to a binary jar from another package +# Symlinking to a binary JAR from another package +# Expanding a JAR to allow for symlinking to a binary JAR from another package -See below for a tip on how to deal with the expanded jar case. +See below for a tip on how to deal with the expanded JAR case. == Specfile Template ==
-%define eclipse_base        %{_datadir}/eclipse
+%define eclipse_base        %{_libdir}/eclipse
 
 Name:           eclipse-plugin
 Version:        1.0
@@ -162,10 +174,10 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d -m 755 $RPM_BUILD_ROOT%{eclipse_base}
-unzip -q -d $RPM_BUILD_ROOT%{eclipse_base}/.. \
+install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/eclipse/dropins/plugin-a
+unzip -q -d $RPM_BUILD_ROOT%{_datadir}/eclipse/dropins/plugin-a \
 build/rpmBuild/org.eclipse.plugin_feature.zip
-unzip -q -d $RPM_BUILD_ROOT%{eclipse_base}/.. \
+unzip -q -d $RPM_BUILD_ROOT%{_datadir}/eclipse/dropins/plugin-b \
 build/rpmBuild/org.eclipse.plugin.b_feature.zip
 
 %clean
@@ -173,23 +185,16 @@
 
 %files
 %defattr(-,root,root,-)
-%{eclipse_base}/plugins/org.eclipse.plugin.a_*.jar
-%{eclipse_base}/plugins/org.eclipse.plugin.c_*.jar
-%dir %{eclipse_base}/features/org.eclipse.plugin_feature_*
-%doc %{eclipse_base}/features/org.eclipse.plugin_feature_*/license.html
-%doc %{eclipse_base}/features/org.eclipse.plugin_feature_*/about.html
-%doc %{eclipse_base}/features/org.eclipse.plugin_feature_*/epl-v10.html
-%{eclipse_base}/features/org.eclipse.plugin_feature_*/feature.xml
+%{_datadir}/eclipse/dropins/plugin-a
 
 %files b
 %defattr(-,root,root,-)
-%{eclipse_base}/plugins/org.eclipse.plugin.b_*.jar
-%dir %{eclipse_base}/features/org.eclipse.plugin.b_feature_*
-%doc %{eclipse_base}/features/org.eclipse.plugin.b_feature_*/license.html
-%doc %{eclipse_base}/features/org.eclipse.plugin.b_feature_*/epl-v10.html
-%{eclipse_base}/features/org.eclipse.plugin.b_feature_*/feature.xml
+%{_datadir}/eclipse/dropins/plugin-b
 
 %changelog
+* Fri Oct 17 2008 Andrew Overholt  1.0-2
+- Update for Eclipse 3.4.x
+
 * Fri Feb 29 2008 Andrew Overholt  1.0-1
 - Initial Fedora package
 
@@ -197,7 +202,7 @@ == Tips and Notes == === Common Defines === -%define eclipse_base %{_datadir}/eclipse and, if necessary %define eclipse_lib_base %{_libdir}/eclipse. +%define eclipse_base %{_libdir}/eclipse. === Requires === Until rpmstubby (see below) is released and/or more widespread, Requires on bits provided by the Eclipse SDK (RCP, SWT, Platform, JDT, PDE, CVS, etc.) should only be on the binary package providing the required functionality (ex. eclipse-cvs-client or eclipse-rcp). For IDE features, the most common requirement will be eclipse-platform. @@ -224,7 +229,7 @@ 98051 12-20-07 20:08 lib-xmlrpc/xmlrpc-common-3.0.jar -Note that we have embedded jars which we would like to turn into symlinks to existing jars (from other packages). If we simply unzip the plugin jar and symlink, one would think we would be okay: +Note that we have embedded JARs which we would like to turn into symlinks to existing JARs (from other packages). If we simply unzip the plugin JAR and symlink, one would think we would be okay:
 $ unzip -qq org.eclipse.mylyn.web.core_2.2.0.I20071220-1700.jar
@@ -234,7 +239,7 @@
 $ 
 
-However, we end up with the plugin classes themselves being expanded in the org directory. [https://bugzilla.redhat.com/273881 Bug #273881] causes build failures when building debuginfo packages in this case. The acceptable workaround is to modify the build.properties file in the plugin to jar the plugin code separately (ex. mylyn-webcore.jar) and include it within this expanded plugin directory. An example of this work-around can be seen in [http://cvs.fedoraproject.org/viewcvs/devel/eclipse-mylyn/ eclipse-mylyn] (specifically the patches related to org.eclipse.mylyn.webcore). +However, we end up with the plugin classes themselves being expanded in the org directory. [https://bugzilla.redhat.com/273881 Bug #273881] causes build failures when building debuginfo packages in this case. The acceptable workaround is to modify the build.properties file in the plugin to JAR the plugin code separately (ex. mylyn-webcore.jar) and include it within this expanded plugin directory. An example of this work-around can be seen in [http://cvs.fedoraproject.org/viewcvs/devel/eclipse-mylyn/ eclipse-mylyn] (specifically the patches related to org.eclipse.mylyn.webcore). === OSGi === OSGi bundles contain metadata just like RPMs do. This metadata can be used to automatically generate Provides and Requires similar to how it is done for mono packages. This functionality exists in Fedora's current rpm package but requires some investigation as at the time of this writing it does not appear to be functioning properly.