%define fedora 1 %define redhat 0 %if %{fedora} %define gcj_support 1 %else %define gcj_support 0 %endif %define eclipse_name eclipse %define major 3 %define minor 2 %define majmin %{major}.%{minor} %define micro 1 %define eclipse_base %{_datadir}/%{eclipse_name} %define eclipse_lib_base %{_libdir}/%{eclipse_name} Summary: Graphical Editor Framework (GEF) plugin for Eclipse Name: %{eclipse_name}-gef Version: %{majmin}.%{micro} Release: 4%{?dist} License: Eclipse Public License Group: System Environment/Libraries URL: http://www.eclipse.org/gef/ Requires: eclipse-platform # # Here's how to generate the source drop for GEF 3.2.1: # # # mkdir -p temp/home && cd temp # touch home/.cvspass # cvs -d :pserver:anonymous@dev.eclipse.org:/home/tools co \ # -r R32_Maintenance org.eclipse.releng.gefbuilder # pushd org.eclipse.releng.gefbuilder # patch -p0 << _EOF_ # --- build.xml 14 Aug 2003 15:26:21 -0000 1.1 # +++ build.xml 29 Mar 2006 04:29:15 -0000 # @@ -21,4 +21,15 @@ # # # # + # + # + # + # + # + # + # + # + # # _EOF_ # # # Fetch GEF and Draw2D themselves # # java -cp /usr/share/eclipse/startup.jar \ # -Duser.home=../../home \ # org.eclipse.core.launcher.Main \ # -application org.eclipse.ant.core.antRunner \ # -buildfile build.xml \ # -DbaseLocation=/usr/share/eclipse \ # -Dpde.build.scripts=/usr/share/eclipse/plugins/org.eclipse.pde.build/scripts \ # -Dcomponent=sdk \ # -DbaseExists=true \ # -DfetchTag=R32_Maintenance \ # fetch # # # Fetch examples # # java -cp /usr/share/eclipse/startup.jar \ # -Duser.home=../../home \ # org.eclipse.core.launcher.Main \ # -application org.eclipse.ant.core.antRunner \ # -buildfile build.xml \ # -DbaseLocation=/usr/share/eclipse \ # -Dpde.build.scripts=/usr/share/eclipse/plugins/org.eclipse.pde.build/scripts \ # -Dcomponent=examples \ # -DbaseExists=true \ # -DfetchTag=R32_Maintenance \ # fetch # # popd # # tar jcf eclipse-gef-fetched-src-3.2.1.tar.bz2 org.eclipse.releng.gefbuilder Source0: %{name}-fetched-src-%{version}.tar.bz2 Patch0: %{name}-dont-set-bootclasspath.patch BuildRequires: eclipse-pde %if %{gcj_support} BuildRequires: gcc-java >= 4.0.2 BuildRequires: java-gcj-compat-devel >= 1.0.33 Requires(post): java-gcj-compat >= 1.0.33 Requires(postun): java-gcj-compat >= 1.0.33 %else BuildRequires: java-devel >= 1.4.2 %endif %if %{gcj_support} ExclusiveArch: %{ix86} x86_64 ppc ia64 %else BuildArch: noarch %endif Requires: eclipse-platform >= 1:3.2.1 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %package sdk Summary: Eclipse GEF SDK Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %package examples Summary: Eclipse GEF examples Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: %{name}-sdk = %{version}-%{release} %description The eclipse-gef package contains Eclipse features and plugins that comprise the Graphical Editor Framework for Eclipse. %description sdk Source and documentation for Eclipse GEF for use within Eclipse. %description examples Example source code that demonstrates how to use Eclipse GEF. %prep %setup -q -c # https://bugs.eclipse.org/bugs/show_bug.cgi?id=134567 pushd org.eclipse.releng.gefbuilder %patch0 -p0 popd %build # See comments in the script to understand this. /bin/sh -x %{eclipse_base}/buildscripts/copy-platform SDK %{eclipse_base} SDK=$(cd SDK > /dev/null && pwd) mkdir home homedir=$(cd home > /dev/null && pwd) cd org.eclipse.releng.gefbuilder # some notes about what we're doing here: # # -Duser.home=$homedir: override java.home in the vm so that eclipse only adds files in the buildroot # -Dcomponent=sdk: the component of GEF we want to build # -DjavacFailOnError=true: fail if there is an error # -DdontUnzip=true: don't unzip the result, we will do it manually # -DbaseLocation=$SDK: $SDK is a mirror of the system SDK dir that is writable by the process # running the build. This let's the build "see" the jars and have a place to # put the plugins that have just been built # -DskipFetch=true: don't fetch the sources # -DbaseExists=true: don't download the SDK, we want to use the one in $SDK eclipse \ -application org.eclipse.ant.core.antRunner \ -Dcomponent=sdk \ -DjavacFailOnError=true \ -DdontUnzip=true \ -DbaseLocation=$SDK \ -Dpde.build.scripts=$SDK/plugins/org.eclipse.pde.build/scripts \ -DskipFetch=true \ -DbaseExists=true # build the examples eclipse \ -application org.eclipse.ant.core.antRunner \ -Dcomponent=examples \ -DjavacFailOnError=true \ -DdontUnzip=true \ -DbaseLocation=$SDK \ -Dpde.build.scripts=$SDK/plugins/org.eclipse.pde.build/scripts \ -DskipFetch=true \ -DbaseExists=true %install rm -rf ${RPM_BUILD_ROOT} install -d -m755 ${RPM_BUILD_ROOT}/%{eclipse_base} for file in $(pwd)/org.eclipse.releng.gefbuilder/src/eclipse/I*/*.zip; do case $file in *eclipse*) # The ".." is needed since the zip files contain "eclipse/foo". (cd $RPM_BUILD_ROOT/%{eclipse_base}/.. && unzip -qq -o $file) ;; esac done # These are already included in the Eclipse SDK but the packaging guidelines # would like them in a directory owned by this package mv $RPM_BUILD_ROOT/%{eclipse_base}/epl-v10.html \ $RPM_BUILD_ROOT/%{eclipse_base}/features/org.eclipse.gef_* mv $RPM_BUILD_ROOT/%{eclipse_base}/notice.html \ $RPM_BUILD_ROOT/%{eclipse_base}/features/org.eclipse.gef_* %if %{gcj_support} aot-compile-rpm %endif %clean rm -rf ${RPM_BUILD_ROOT} %if %{gcj_support} %post -p %{_bindir}/rebuild-gcj-db %postun -p %{_bindir}/rebuild-gcj-db %endif %files %defattr(-,root,root) %{eclipse_base}/features/org.eclipse.gef_* %{eclipse_base}/plugins/org.eclipse.draw2d_* %{eclipse_base}/plugins/org.eclipse.gef_* %if %{gcj_support} %{_libdir}/gcj/%{name}/org.eclipse.draw2d_* %{_libdir}/gcj/%{name}/org.eclipse.gef_* %endif %doc %{eclipse_base}/readme/* %doc %{eclipse_base}/features/org.eclipse.gef_*/notice.html %doc %{eclipse_base}/features/org.eclipse.gef_*/epl-v10.html %files sdk %defattr(-,root,root) %{eclipse_base}/features/org.eclipse.gef.sdk_* %{eclipse_base}/features/org.eclipse.gef.source_* %{eclipse_base}/plugins/org.eclipse.draw2d.doc.isv_* %{eclipse_base}/plugins/org.eclipse.gef.doc.isv_* %{eclipse_base}/plugins/org.eclipse.gef.source_* %files examples %defattr(-,root,root) %{eclipse_base}/features/org.eclipse.gef.examples_* %{eclipse_base}/plugins/org.eclipse.gef.examples.source_* %{eclipse_base}/plugins/org.eclipse.gef.examples.text_* %{eclipse_base}/plugins/org.eclipse.gef.examples.logic_* %{eclipse_base}/plugins/org.eclipse.gef.examples.flow_* %{eclipse_base}/plugins/org.eclipse.gef.examples.shapes_* %if %{gcj_support} %{_libdir}/gcj/%{name}/org.eclipse.gef.examples.text_* %{_libdir}/gcj/%{name}/org.eclipse.gef.examples.logic_* %{_libdir}/gcj/%{name}/org.eclipse.gef.examples.flow_* %{_libdir}/gcj/%{name}/org.eclipse.gef.examples.shapes_* %endif %changelog * Tue Jan 30 2007 Andrew Overholt 3.2.1-4 - Use copy-platform in %%{eclipse_base}. * Mon Nov 06 2006 Andrew Overholt 3.2.1-3 - Use copy-platform in %%{_libdir}. - Use binary launcher rather than startup.jar to guard against future osgi.sharedConfiguration.area changes. * Thu Oct 19 2006 Andrew Overholt 3.2.1-2 - Fix buildroot (don't know how the wrong one slipped in). * Thu Oct 19 2006 Andrew Overholt 3.2.1-1 - 3.2.1. * Tue Aug 29 2006 Andrew Overholt 3.2.0-2 - First release for Fedora. * Tue Aug 22 2006 Andrew Overholt 3.2.0-1jpp_2rh - -devel -> -sdk to match upstream.. * Tue Jul 25 2006 Andrew Overholt 3.2.0-1jpp_1rh - 3.2.0. * Tue May 02 2006 Ben Konrath 3.1.1-1jpp_2rh - Remove -debug from compile line. - Add expamples package. * Mon Apr 3 2006 Ben Konrath 3.1.1-1jpp_1rh - Add devel package. - Update sources to 3.1.1. - Some general spec file cleanup. - Add patch to stop the gefbuilder plugin from setting bootclasspath. - Change copyright to license. - Add instructions for generating source drop. * Tue Sep 6 2005 Aaron Luchko 3.1.0-1 - change to match eclipse-changelog.spec and fixed typos * Thu Aug 4 2005 Aaron Luchko - Updated to 3.1.0 - added createTarball.sh, gefSource.sh, and build.xml.patch - added native build - changes to use eclipsebuilder - fixes from Matthias Saou * Mon Jun 27 2005 Aaron Luchko 3.0.1-8 - Added x86_64 * Mon May 2 2005 Ben Konrath 3.0.1-7 - Build against Eclipse 3.0.2. * Thu Mar 31 2005 Phil Muldoon 3.0.1-6 - Migrate RHEL-3 sources to RHEL-4 * Mon Nov 1 2004 Phil Muldoon 3.0.1-5 - Stopped ant trying to replace about.mappings * Mon Nov 1 2004 Phil Muldoon 3.0.1-4 - Changed tar name to new tar * Mon Nov 1 2004 Phil Muldoon 3.0.1-3 - Touch build scripts to point to 3.0.1 * Mon Nov 1 2004 Phil Muldoon 3.0.1-2 - Explicitly set -DJAVADOC14_HOME=%%{java_home}/bin to build javadocs * Sun Oct 31 2004 Phil Muldoon 3.0.1-1 - Initial Import