Hi,
Someone on the FPC (Fedora Packaging Committee) voted -1 to the Eclipse
plugin packaging guidelines in the recent meeting due to the verbosity of
our PDE Build invocation. While I was annoyed with this at first, I took
the opportunity to write a bash script to wrap our copy-platform and PDE
build calls. I made it so that if there's only one feature in the source
directory, it finds it automatically.
I've attached it so that my horrible bash skills can be laughed at.
Suggestions greatly welcome. I'm going to put it into the eclipse-pde
RPM when it's ready.
I tried it locally with eclipse-quickrex and here's what the diff looks like:
-# See comments in the script to understand this.
-/bin/sh -x %{eclipse_base}/buildscripts/copy-platform SDK %{eclipse_base}
-mkdir home
-
%build
-SDK=$(cd SDK > /dev/null && pwd)
-
-# Eclipse may try to write to the home directory.
-homedir=$(cd home > /dev/null && pwd)
-
-java -cp $SDK/startup.jar \
- -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \
- org.eclipse.core.launcher.Main \
- -application org.eclipse.ant.core.antRunner \
- -Dtype=feature \
- -Did=de.babe.eclipse.plugins.QuickREx \
- -DbaseLocation=$SDK \
- -DsourceDirectory=$(pwd) \
- -DbuildDirectory=$(pwd)/build \
- -Dbuilder=%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build \
- -f %{eclipse_base}/plugins/org.eclipse.pde.build/scripts/build.xml \
- -vmargs -Duser.home=$homedir
+%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build/pdebuild
I've attached the diff for Mylyn (eclipse-mylyn). Both packages build
the same with and without the script (which I have on my path for
testing). A drawback is that we're calling copy-platform multiple times
for multiple-feature projects like Mylyn and the calls after the first
one all say "file exists" for the mkdir and ln -s calls.
The nice thing here is that if we get package-build or something like it
into pde.build upstream, we can just change the script.
I'd really appreciate some feedback.
Andrew
Show replies by thread