# -*- RPM-SPEC -*- # Uncomment for the IBM 1.3.1 JDK. # %%define java_home /opt/IBMJava2-131 # Uncomment for the Sun JDK. # %%define java_home /usr/java/j2sdk1.4.0_01 # # The next three are appropriate for use with either # external JDK. When using free tools, comment these out. # %%define java_jre %{java_home}/jre # %%define java_runtime %{java_jre}/lib/rt.jar # %%define java_bin %{java_home}/bin # # Uncomment the next 3 for gcj. We define java_home oddly to # avoid problems with Makefiles that pass it and subdirs via -I. %define java_home /nosuchdir %define java_jre /usr %define java_runtime %{java_jre}/share/java/libgcj-3.5-tree-ssa.jar %define java_bin /usr/bin # # Define as true to compile to native. %define gcj_build true # Define as true to build .class files with ecj. %define ecj_build true # # Eclipse specs # Summary: Eclipse - an open extensible IDE Name: eclipse Version: 2.1.2 Release: 3 Copyright: Common Public License Version 0.5 Group: Development/Tools Source: eclipse-src.tar.gz URL: http://www.eclipse.org Requires: libgcj-ssa gtk2 ctags gdb make oprofile >= 0.5 binutils rpm-build gnome-utils Provides: eclipse-SDK-2.0 eclipse-SDK BuildRequires: pango gtk2-devel glib2-devel gnome-vfs2-devel desktop-file-utils ant gcc-java-ssa gcc-c++-ssa libgcj-ssa libgcj-ssa-devel oprofile-devel >= 0.5 binutils Prefix: /usr/lib/eclipse BuildRoot: %{_tmppath}/%{name}-buildroot ExclusiveArch: i386 ppc x86_64 ia64 %ifarch ia64 # FIXME: on ia64 gcc-ssa can't build eclipse Requires: IBMJava2-JRE IBMJava2-SDK %endif Patch0: eclipse-swt-64-patch Patch1: eclipse-webapp-prebuilt.tar.gz Patch2: eclipse-webapp-build-patch %description The Eclipse Platform is designed for building integrated development environments (IDEs) that can be used to create applications as diverse as web sites, embedded Java (TM) programs, C++ programs, and Enterprise JavaBeans (TM). %package lomboz Summary: Lomboz plugin for Eclipse Group: Development/Tools Requires: eclipse IBMJava2-JRE IBMJava2-SDK Copyright: GNU Lesser General Public License %description lomboz The eclipse-lomboz package contains the Lomboz Eclipse plugin, a toolkit for J2EE (TM) development. %prep %setup -q -c # Apply the 64-bit patch for 64-bit platforms only. %ifarch alpha ia64 ppc64 sparc64 x86_64 ./utilities/apply-patch $RPM_SOURCE_DIR/eclipse-swt-64-patch %endif # An ugly hack required for PPC for the time being. # FIXME. %ifarch ppc tar zxvvf $RPM_SOURCE_DIR/eclipse-webapp-prebuilt.tar.gz patch -p0 < $RPM_SOURCE_DIR/eclipse-webapp-build-patch %endif %build export JAVA_HOME=%{java_home} export PATH=%{java_bin}:/usr/bin:$PATH target=buildAll build_options="-os linux -ws gtk -bc %{java_runtime}" if %{gcj_build}; then : ${JAVACMD=%{java_bin}/gij-ssa} : ${GCJ_BOOTSTRAP=gcj-ssa} : ${GCJ=gcj-ssa} : ${CC=gcc-ssa} export JAVACMD export GCJ_BOOTSTRAP export GCJ export CC target=gcjBuild fi %ifarch ia64 # FIXME no gcj build on ia64 target=buildAll %endif if %{ecj_build}; then build_options="$build_options -ecj" fi ./build -target $target $build_options ./build -target buildAllSources $build_options # A sanity check. desktop-file-validate eclipse.desktop %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}/%{prefix} export JAVA_HOME=%{java_home} export PATH=%{java_bin}:/usr/bin:$PATH if %{gcj_build}; then export JAVACMD=%{java_bin}/gij-ssa fi # Compute standard options for build. build_options="-os linux -ws gtk -bc %{java_runtime}" if %{ecj_build}; then build_options="$build_options -ecj" fi ./build -target zip.distribution $build_options ./build -target zip.sources $build_options rm -rf scratch mkdir -p scratch cp `find features -name \*.zip` scratch grep -v '^#' MANIFEST | tar --files-from=- -cf - | (cd $RPM_BUILD_ROOT/%{prefix} && tar xfBp -) (cd $RPM_BUILD_ROOT/%{prefix} && unzip -qq -o -u $RPM_BUILD_DIR/%{name}-%{version}/scratch/'*.zip') # Since zip doesn't preserve file permissions, we must mark all the # .so files as executable. find $RPM_BUILD_ROOT/%{prefix} -name '*.so' -print | xargs chmod +x %ifnarch ia64 # FIXME no gcj build on ia64 # Copy the gcj-built .so files. ./gcjBuild install $RPM_BUILD_ROOT/%{prefix} %endif chmod +x eclipse-start install -D eclipse-start ${RPM_BUILD_ROOT}%{_bindir}/eclipse install -D eclipse.desktop ${RPM_BUILD_ROOT}%{_datadir}/applications/eclipse.desktop # Some extra checking that the desktop file validator doesn't do. test -f ${RPM_BUILD_ROOT}/`sed -n 's/^Icon=//p' eclipse.desktop` # Symlink to JRE. # ln -s %{java_jre} ${RPM_BUILD_ROOT}%{prefix}/java # oprofile install ln -s /usr/bin/consolehelper ${RPM_BUILD_ROOT}%{prefix}/plugins/com.redhat.eclipse.oprofile.core.linux_1.0.0/opcontrol install -D -m 644 plugins/com.redhat.eclipse.oprofile.core.linux/opcontrol-wrapper.security ${RPM_BUILD_ROOT}/etc/security/console.apps/opcontrol install -D -m 644 plugins/com.redhat.eclipse.oprofile.core.linux/opcontrol-wrapper.pamd ${RPM_BUILD_ROOT}/etc/pam.d/opcontrol # Note the "*": this is simpler than guessing the arch name that # eclipse uses. chmod +x ${RPM_BUILD_ROOT}/%{prefix}/plugins/com.redhat.eclipse.oprofile.core.linux_1.0.0/os/linux/*/opxml %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root) %{_bindir}/eclipse %{prefix}/cpl-v10.html %{prefix}/eclipse %{prefix}/.eclipseproduct %ifnarch ia64 # FIXME no gcj build on ia64 %{prefix}/gcjlauncher %{prefix}/libstartup.so %endif %{prefix}/icon.xpm %{prefix}/install.ini %{prefix}/notice.html %{prefix}/startup.jar %{prefix}/features %{prefix}/plugins/org* %{prefix}/plugins/com.redhat* %{_datadir}/applications/eclipse.desktop %config(noreplace) /etc/security/console.apps/opcontrol %config(noreplace) /etc/pam.d/opcontrol %files lomboz %{prefix}/plugins/com.objectlearn* %changelog * Fri Mar 5 2004 Tom Tromey 2.1.2-3 - Added ppc hacks - Bug fixes in source tar * Wed Mar 3 2004 Tom Tromey 2.1.2-2 - OProfile installation fixlet - Hover-help feature added * Tue Jan 13 2004 Tom Tromey 2.1.2-1 - Now packaging eclipse 2.1.2 * Wed Dec 24 2003 Keith Seitz - Rename "opcontrol-wrapper" to "opcontrol" * Mon Dec 1 2003 Tom Tromey 2.1.1-4 - Many bug fixes * Thu Nov 13 2003 Tom Tromey 2.1.1-3 - Work around PPC compiler bug by allowing .jar compilations to fail * Mon Nov 10 2003 Tom Tromey 2.1.1-2 - Invoke buildAllSources and zip.sources; bugzilla 109651 * Fri Oct 24 2003 Diego Novillo 2.1.1-1 - Add env var GCJ_BOOTSTRAP. Allow GCJ_BOOTSTRAP, GCJ and CC to be overridden * Mon Oct 20 2003 Tom Tromey 2.1.1-1 - Ensure that icon exists * Tue Oct 7 2003 Tom Tromey 2.1.1-1 - Updated to 2.1.1 * Mon Sep 29 2003 Tom Tromey 2.1.0-22 - Updated upstream sources; oprofile plugin works * Wed Sep 24 2003 Tom Tromey 2.1.0-21 - Updated upstream sources; fixes oprofile buglets, also doc updates * Mon Sep 22 2003 Tom Tromey 2.1.0-18 - xalan-j required at build time and runtime; bugzilla 104513 * Mon Sep 15 2003 Tom Tromey 2.1.0-17 - Bug fixes in sources * Fri Sep 05 2003 Tom Tromey 2.1.0-16 - Updated upstream sources * Fri Aug 15 2003 Tom Tromey 2.1.0-15 - Don't build eclipse with -O2 for now * Thu Aug 14 2003 Tom Tromey 2.1.0-14 - Updated eclipse sources * Thu Aug 7 2003 Tom Tromey 2.1.0-13 - g++ is build requirement * Mon Jul 21 2003 Tom Tromey 2.1.0-12 - Enable gcj build again * Thu Jul 17 2003 Tom Tromey 2.1.0-11 - Updated sources to fix -vm bug * Thu Jul 17 2003 Tom Tromey 2.1.0-10 - Updated sources * Wed Jul 16 2003 Tom Tromey 2.1.0-9 - Updated upstream sources * Wed Jul 16 2003 Tom Tromey 2.1.0-8 - Updated upstream sources - Require gnome-vfs2-devel at build time * Fri Jul 11 2003 Tom Tromey 2.1.0-7 - Use LD_ASSUME_KERNEL hack * Fri Jul 11 2003 Tom Tromey 2.1.0-6 - Updated sources * Wed Jul 9 2003 Tom Tromey 2.1.0-5 - Updated upstream sources - Removed j2sdk dependency - Added rpm-build and gnome-utils dependencies * Tue Jul 8 2003 Tom Tromey 2.1.0-4 - Updated upstream sources * Sun Jul 6 2003 Tom Tromey 2.1.0-3 - Fixed more build buglets * Sat Jul 5 2003 Tom Tromey 2.1.0-2 - Don't build .so files at all * Sat Jul 5 2003 Tom Tromey - Require Sun JVM * Wed Jul 2 2003 Tom Tromey 2.1.0-1 - Updated to eclipse 2.1 * Tue Jul 2 2003 Keith Seitz - From Tom Tromey - Use i386, not x86, in ExclusiveArch * Tue Jul 2 2003 Keith Seitz - Set executable bit for opxml since zip won't preserve it. * Wed May 14 2003 Keith Seitz - Add oprofile plugin installation requirements. * Mon May 5 2003 Tom Tromey 2.0.1-25 - Use ExclusiveArch, not ExcludeArch * Fri May 2 2003 Tom Tromey 2.0.1-24 - Exclude ppc64 * Wed Apr 23 2003 Tom Tromey 2.0.1-23 - Require gdb and make * Tue Apr 8 2003 Tom Tromey 2.0.1-22 - Bumped release for new build - Fixed bug in JDT build * Mon Apr 7 2003 Tom Tromey 2.0.1-21 - Bumped release for rebuild * Tue Apr 1 2003 Tom Tromey 2.0.1-20 - Allow builds on ppc * Fri Mar 28 2003 Tom Tromey 2.0.1-19 - Changes to use gcc-ssa compiler - Default to gcj build; install files required for gcj - Define and use java_bin - Only build on x86 * Wed Mar 5 2003 Tom Tromey - Use build script to create ecj, compute architecture, choose targets - Release 18 * Tue Feb 18 2003 Tom Tromey - Replaced jikes with ecj - Release 17 * Wed Feb 5 2003 Tom Tromey - Added -arch to build, code to build with gcj, code to build with jikes, code to use Sun JDK - Removed java_jrelib - Now release 16 * Tue Dec 10 2002 Tom Tromey - Invoke buildNative - Now release 15 * Wed Nov 27 2002 Tom Tromey - Removed "-linux" from name - Now release 14 * Tue Nov 26 2002 Tom Tromey - Changed name to eclipse - Removed Conflicts - Updated Provides - Now release 13 * Tue Nov 26 2002 Tom Tromey - Install eclipse.desktop in %{_datadir}/applications, for 8.x - Now release 12 * Tue Nov 5 2002 Jeff Johnson - Define java_home, java_jre, java_jrelib - Use %setup - Minor cleanups in %build - Use _bindir * Thu Oct 24 2002 Andrew Haley - eclipse-2.0-linux-gtk.spec (Source): Now use gzip. - (install): Now use Ant zip.distribution to do this installation. - Added Requires for ctags. * Fri Oct 18 2002 Tom Tromey - Require JDK 1.3.1 - Added BuildReq for ant - Use MANIFEST file to decide what to copy into install tree * Tue Oct 15 2002 Tom Tromey - Eclipse source now bzipped * Mon Oct 14 2002 Tom Tromey - No patch required * Fri Oct 11 2002 Tom Tromey - Added .desktop file - Added BuildReq for desktop-file-utils