- Re-add compilation of resources.jar.

- Backport bootstrapping patch.
- Add Requires: java-1.4.2-gcj-compat.
- Modified find patch courtesy Ziga Mahkovec (RH#149927#).
- Compile with -O2 on ppc as well.
- Add jsch, jakarta-commons-modeler, and mx4j symlinking.
- Make use of gcj-dbtool -f to create databases in install.
- Use system-wide classmap.db.
- Remove *.jarswithnativelibs from files sections.
- Update mozilla dependency.
This commit is contained in:
Andrew Overholt 2005-03-22 23:17:45 +00:00
parent 978353642f
commit 602cb9df14
1 changed files with 204 additions and 172 deletions

View File

@ -36,35 +36,31 @@ Source6: %{name}.conf
Source7: %{name}-jdt.install
Source8: %{name}-pde.install
Source9: %{name}-platform.install
Source10: %{libname}-gtk2.install
# this should be replaced with:
# Source11: %{name}-native-splash-3.1-M.png
# when Eclipse 3.1 comes out.
Source11: %{name}-native-splash-3.1-M-build.png
Source12: %{name}-jdt.jarswithnativelibs
Source13: %{name}-pde.jarswithnativelibs
Source14: %{name}-platform.jarswithnativelibs
Source15: %{libname}-gtk2.jarswithnativelibs
Source16: %{name}-copy-platform.sh
Source17: %{libname}-gtk2.jarswithnativelibs.64bit
# Build libswt-mozilla
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637
Patch0: %{name}-make-linux.patch
# Work around libgcj #19132
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19132
Patch1: %{name}-textsearch.patch
# Build JNI libs
# FIXME: these should be built by upstream build method
# http://people.redhat.com/bkonrath/eclipse/buildable-source-zips.html
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637
Patch2: %{name}-build.patch
Patch4: %{name}-libupdatebuild.patch
Patch5: %{name}-libupdatebuild2.patch
# This will hopefully be pushed upstream
Patch6: %{name}-bootstrapbuild.patch
# This is so that we can build ecj native during the build
Patch7: %{name}-nobootstrapbuild.patch
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=85915
Patch8: %{name}-antsecuritymanager.patch
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=86571
Patch9: %{name}-pdebuildtarargs.patch
# https://bugs.eclipse.org/bugs/show_bug.cgi?id=86848
Patch10: %{name}-icon.patch
# Use installed mozilla libs and headers
Patch11: %{name}-libswt-mozilla.patch
@ -80,9 +76,10 @@ Patch14: %{name}-s390ands390x2.patch
Patch15: %{name}-build-activeHelpSample.jar.patch
# Make find work. See
# https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=111736
# and
#
Patch16: %{name}-find.patch
# Bootstrap the build a la https://bugs.eclipse.org/bugs/show_bug.cgi?id=84914
# ... the patch is a bit hacky at the moment
Patch17: %{name}-bootstrap.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: ant
@ -91,18 +88,19 @@ BuildRequires: jpackage-utils >= 0:1.5, make, gcc
BuildRequires: gnome-vfs2-devel
BuildRequires: gtk2-devel
BuildRequires: glib2-devel
BuildRequires: mozilla >= 1.7.5
BuildRequires: mozilla-devel >= 1.7.5
BuildRequires: mozilla >= 1.7.6
BuildRequires: mozilla-devel >= 1.7.6
BuildRequires: mozilla-nspr-devel >= 1.7.6
BuildRequires: xorg-x11-devel
BuildRequires: gcc-java >= 4.0.0-0.30
BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_4rh
BuildRequires: gcc-java >= 4.0.0-0.35
BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_13rh
BuildRequires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging
#BuildRequires: ant-apache-bsf ant-commons-net ant-jsch lucene
BuildRequires: ant-jdepend ant-jmf ant-junit ant-nodeps ant-swing ant-trax
#BuildRequires: jsch
BuildRequires: jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-digester jakarta-commons-logging
#BuildRequires: jakarta-commons-modeler mx4j servlet lucene-demo jasper4 tomcat4
BuildRequires: jsch
BuildRequires: jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-digester jakarta-commons-logging jakarta-commons-modeler mx4j
#BuildRequires: servlet lucene-demo jasper4 tomcat4
BuildRequires: regexp junit
%description
@ -116,7 +114,7 @@ Summary: Eclipse Compiler for Java
Group: Development/Languages
Obsoletes: ecj
Provides: ecj
Requires: gcc-java >= 4.0.0-0.30
Requires: gcc-java >= 4.0.0-0.35
%description ecj
Eclipse compiler for Java.
@ -129,18 +127,18 @@ Obsoletes: %{name}-sdk %{name}-ui %{name}-gtk2 eclipse
Provides: %{name}-sdk = %{epoch}:%{version}-%{release}
Provides: %{name}-ui = %{epoch}:%{version}-%{release}
Provides: %{name}-gtk2 = %{epoch}:%{version}-%{release}
Requires: java >= 1.4.2
Requires: java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_11rh
Requires: /usr/bin/perl
Requires: gcc-java >= 4.0.0-0.30
Requires: gcc-java >= 4.0.0-0.35
Requires: %{libname}-gtk2 = %{epoch}:%{version}-%{release}
Requires: /usr/bin/mozilla
Requires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging
#Requires: ant-apache-bsf ant-commons-net ant-jsch lucene
Requires: ant-jdepend ant-jmf ant-junit ant-nodeps ant-swing ant-trax
#Requires: jsch
Requires: jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-digester jakarta-commons-logging
#Requires: jakarta-commons-modeler mx4j servlet lucene-demo jasper4 tomcat4
Requires: jsch
Requires: jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-digester jakarta-commons-logging jakarta-commons-modeler mx4j
#Requires: servlet lucene-demo jasper4 tomcat4
Requires: regexp junit
%description platform
@ -160,7 +158,7 @@ Summary: Eclipse Java development tools
Group: Text Editors/Integrated Development Environments (IDE)
Requires: %{name}-platform = %{epoch}:%{version}-%{release}
Requires: %{name}-ecj = %{epoch}:%{version}-%{release}
Requires: gcc-java >= 4.0.0-0.30
Requires: gcc-java >= 4.0.0-0.35
%description jdt
Eclipse Java developments tools.
@ -178,7 +176,7 @@ Summary: Eclipse PDE
Group: Text Editors/Integrated Development Environments (IDE)
Requires: %{name}-jdt = %{epoch}:%{version}-%{release}
Requires: %{name}-platform-devel = %{epoch}:%{version}-%{release}
Requires: gcc-java >= 4.0.0-0.30
Requires: gcc-java >= 4.0.0-0.35
%package pde-devel
Summary: Eclipse PDE Source
@ -214,8 +212,6 @@ popd
%patch2 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p0
%patch8 -p0
%patch9 -p0
%patch10 -p0
@ -226,6 +222,7 @@ rm -f activeHelpSample.jar
%patch15 -p0
popd
%patch16 -p0
%patch17 -p1
# Red Hat splash screen.
pushd plugins/org.eclipse.platform
@ -301,7 +298,7 @@ ln -sf %{_javadir}/ant.jar plugins/org.eclipse.core.resources/lib/ant.jar
#ln -sf %{_javadir}/xml-commons-apis.jar plugins/org.eclipse.osgi/osgi/xmlParserAPIs.jar
# plugins/org.eclipse.osgi.services/services.jar
# plugins/org.eclipse.osgi.util/util.jar
#ln -sf %{_javadir}/jsch.jar plugins/org.eclipse.team.cvs.ssh2/jsch-0.1.16.jar
ln -sf %{_javadir}/jsch.jar plugins/org.eclipse.team.cvs.ssh2/jsch-0.1.17.jar
# plugins/org.eclipse.text/text.jar
# ------------------------------------------------------------------------
# FIXME: need tomcat4 rpm
@ -333,29 +330,7 @@ ln -sf %{_javadir}/ant.jar plugins/org.eclipse.core.resources/lib/ant.jar
# ------------------------------------------------------------------------
ln -sf %{_javadir}/junit.jar plugins/org.junit/junit.jar
%build
export CLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar:$CLASSPATH
gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
-o jdtcore.jar.so jdtcore.jar
ln -s jdtcore.jar.so lib-org-eclipse-jdt-core.so
ln -s jdtcore.jar.so lib-org-eclipse-jdt-internal-compiler.so
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
# Build jdtcore.jar and jdtCompilerAdapter.jar
ant \
-DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \
bootstrap
# Build a native ecj
gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
-o jdtcore.jar.so jdtcore.jar
gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
-o jdtCompilerAdapter.jar.so jdtCompilerAdapter.jar
gcj -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \
jdtcore.jar.so jdtCompilerAdapter.jar.so -o ecj
ln -s jdtcore.jar.so lib-org-eclipse-jdt.so
rm -f *.jar
# /usr/lib -> /usr/lib64
pushd plugins/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library
perl -pe 's|/usr/lib/|%{_libdir}/|g' \
@ -363,10 +338,77 @@ pushd plugins/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library
mv build.sh.patched build.sh
popd
# Use this ecj and our built jars
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
export CLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar:$CLASSPATH
%build
ORIGCLASSPATH=$CLASSPATH
# Bootstrapping is 3 parts:
# 1. Build ecj with gcj -C
# 2. Build ecj with gcj-built ecj ("javac")
# 3. Re-build ecj with output of 2.
# Keep a backup
cp -r plugins/org.eclipse.jdt.core plugins/org.eclipse.jdt.core.orig
# 1a. Build ecj with gcj -C
pushd plugins/org.eclipse.jdt.core
for f in `find batch -name '*.java' -or -name '*.properties'`; do
g=`echo $f | sed 's:^batch/:compiler/:' | xargs dirname`
[ -d $g ] || mkdir -p $g
cp -a $f $g
done
cd compiler
for f in `find -name '*.java' | cut -c 3-`; do
gcj -Wno-deprecated -C $f
done
find -name '*.class' -or -name '*.properties' -or -name '*.rsc' |\
xargs jar cf ../../../ecj-bootstrap.jar
popd
# Delete our modified jdtcore and restore the backup
rm -rf plugins/org.eclipse.jdt.core
mv plugins/org.eclipse.jdt.core.orig plugins/org.eclipse.jdt.core
## 1b. Natively-compile it
#gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
# -o ecj-bootstrap.jar.so ecj-bootstrap.jar
#
#gcj-dbtool -n bootstrap.db 30000
#gcj-dbtool -a bootstrap.db ecj-bootstrap.jar{,.so}
#
#export GCJ_PROPERTIES="gnu.gcj.precompiled.db.path=`pwd`/bootstrap.db"
# 2a. Build ecj
export CLASSPATH=ecj-bootstrap.jar:$ORIGCLASSPATH
ant -buildfile jdtcoresrc/compilejdtcorewithjavac.xml
## 2b. Natively-compile ecj
#gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
# -o jdtcoresrc/ecj.jar.so jdtcoresrc/ecj.jar
#
#gcj-dbtool -n jdtcoresrc/ecj.db 30000
#gcj-dbtool -a jdtcoresrc/ecj.db jdtcoresrc/ecj.jar{,.so}
#export GCJ_PROPERTIES="gnu.gcj.precompiled.db.path=`pwd`/jdtcoresrc/ecj.db"
# Remove our gcj-built ecj
#rm bootstrap.db ecj-bootstrap.jar
rm ecj-bootstrap.jar
# 3. Use this ecj to rebuild itself
export CLASSPATH=`pwd`/jdtcoresrc/ecj.jar:$ORIGCLASSPATH
ant -buildfile jdtcoresrc/compilejdtcore.xml
## Natively-compile it
#gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
# -o ecj.jar.so ecj.jar
#gcj-dbtool -n ecj.db 30000
#gcj-dbtool -a ecj.db ecj.jar{,.so}
# Remove old native bits
#rm jdtcoresrc/ecj.db jdtcoresrc/ecj.jar.so
# Build the rest of Eclipse
export CLASSPATH=`pwd`/ecj.jar:$ORIGCLASSPATH
#export GCJ_PROPERTIES="gnu.gcj.precompiled.db.path=`pwd`/ecj.db"
ant \
-Dnobootstrap=true \
-DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \
@ -379,8 +421,8 @@ tar zxf org.eclipse.sdk-%{build_id}-linux.gtk.%{eclipse_arch}.zip
pushd eclipse
# Native build -- do O2 on x86 only
%ifarch %{ix86}
# Native build -- do -O2 on x86 and ppc only (for now)
%ifarch %{ix86} ppc
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
for j in `find -name \*.jar`; do
d=".%{_libdir}/%{name}/`dirname $j | sed 's:\./::'`";
@ -400,19 +442,6 @@ pushd eclipse
done
%endif
## Remove ecj binary and re-build it
#rm ../../ecj
#pushd .%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0
# gcj -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \
# -Wl,-R,%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0 \
# jdtcore.jar.so jdtCompilerAdapter.jar.so -o ecj
#popd
#mv .%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/ecj ../..
## FIXME: temporarily remove resources.jar
#rm \
# .%{_libdir}/%{name}/plugins/org.eclipse.core.resources_%{eclipse_majmin}.%{eclipse_micro}/resources.jar.so
# FIXME: temporarily remove eclipseAdaptor.jar
rm \
.%{_libdir}/%{name}/plugins/org.eclipse.osgi_%{eclipse_majmin}.%{eclipse_micro}/eclipseAdaptor.jar.so
@ -442,23 +471,11 @@ install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}
# Natively-compiled jars (shared libraries)
tar -C $RPM_BUILD_ROOT -zxf result/%{name}-nativelycompiledjars.tar.gz
# Link lib-org-eclipse-jdt.so to jdtcore.jar.so for native "javac"
ln -s \
%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so \
$RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/lib-org-eclipse-jdt.so
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
# Directory to hold all the .jar->.so mapping dbs
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings
## Rebuild ecj binary
## FIXME: is this the best place for this?
#gcj -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \
# $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtCompilerAdapter.jar.so \
# $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so \
# -o $RPM_BUILD_ROOT%{_bindir}/ecj
# Eclipse binary
mv $RPM_BUILD_ROOT%{_datadir}/%{name}/eclipse \
$RPM_BUILD_ROOT%{_libdir}/%{name}/eclipse
@ -509,11 +526,6 @@ perl -pe \
s|/usr/bin/|%{_bindir}/|g' \
%{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/eclipse
## DB merging script
#perl -pe \
# 's|/usr/lib/eclipse/|%{_libdir}/%{name}/|g' \
# %{SOURCE17} > $RPM_BUILD_ROOT%{_libdir}/eclipse/eclipse-mergedbs.sh
# Default config
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
perl -pe 's|/usr/lib/eclipse/|%{_datadir}/%{name}/|g' \
@ -540,6 +552,7 @@ install -p -D -m0644 %{SOURCE2} \
cat %{SOURCE7} > %{name}-jdt.install
cat %{SOURCE8} > %{name}-pde.install
cat %{SOURCE9} > %{name}-platform.install
cat %{SOURCE10} > %{libname}-gtk2.install
cat >> $RPM_BUILD_ROOT%{_datadir}/%{name}/.eclipseproduct << EOF
name=Eclipse Platform
@ -603,7 +616,7 @@ ln -sf %{_javadir}/ant/ant-trax.jar plugins/org.apache.ant_*/lib/ant-trax.jar
###ln -sf %{_javadir}/xml-commons-apis.jar plugins/org.eclipse.osgi_*/osgi/xmlParserAPIs.jar
# plugins/org.eclipse.osgi.services_*/services.jar
# plugins/org.eclipse.osgi.util_*/util.jar
#ln -sf %{_javadir}/jsch.jar plugins/org.eclipse.team.cvs.ssh2_*/jsch-0.1.16.jar
ln -sf %{_javadir}/jsch.jar plugins/org.eclipse.team.cvs.ssh2_*/jsch-0.1.17.jar
# plugins/org.eclipse.text/text_*.jar
## BEGIN TOMCAT4 ##
##ln -sf %{tomcat4dir}/bin/bootstrap.jar plugins/org.eclipse.tomcat_*/bootstrap.jar
@ -632,135 +645,160 @@ ln -sf %{_javadir}/ant/ant-trax.jar plugins/org.apache.ant_*/lib/ant-trax.jar
## END TOMCAT4 ##
ln -sf %{_javadir}/junit.jar plugins/org.junit_*/junit.jar
# Create the main gcj db
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/eclipse.db 80000
# Create the gcj dbs for libswt, ecj, platform, jdt, and pde
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/libswt3-gtk2.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/ecj.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/platform.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/pde.db 80000
# Copy these file lists for use at install time
install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_libdir}/%{name}
install -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_libdir}/%{name}
install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_libdir}/%{name}
%ifarch alpha ia64 ppc64 sparc64 x86_64
install -m 644 %{SOURCE17} $RPM_BUILD_ROOT%{_libdir}/%{name}
%else
install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_libdir}/%{name}
%endif
# Copy jdtcore.jar to %{_datadir}/java for eclipse-ecj
mkdir -p $RPM_BUILD_ROOT%{_datadir}/java
ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar \
$RPM_BUILD_ROOT%{_datadir}/java/jdtcore.jar
# Create the gcj dbs for libswt, ecj, platform, jdt, and pde
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/ecj.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/libswt3-gtk2.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/platform.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db 80000
gcj-dbtool -n $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/pde.db 80000
# ecj db
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/ecj.db \
$RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar \
%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar.so
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/ecj.db \
$RPM_BUILD_ROOT%{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar \
%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar.so
# jdt db
for dir in `cat %{SOURCE7}`; do
for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db \
$j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
done;
done
# pde db
for dir in `cat %{SOURCE8}`; do
for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db \
$j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
done;
done
# platform db
for dir in `cat %{SOURCE9}`; do
for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db \
$j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
done;
done
# swt db
for dir in `cat %{SOURCE10}`; do
for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
gcj-dbtool -f $RPM_BUILD_ROOT%{_libdir}/%{name}/mappings/jdt.db \
$j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
done;
done
%clean
rm -rf $RPM_BUILD_ROOT
%post ecj
gcj-dbtool -a %{_libdir}/%{name}/mappings/ecj.db \
%{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar \
%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar.so
gcj-dbtool -a %{_libdir}/%{name}/mappings/ecj.db \
%{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar \
%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtCompilerAdapter.jar.so
dbLocation=`gcj-dbtool -p`
if ! [ -e $dbLocation ]; then
dirname $dbLocation | xargs mkdir -p
gcj-dbtool -n $dbLocation
fi
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%post jdt
for j in `cat %{_libdir}/%{name}/%{name}-jdt.jarswithnativelibs`; do
gcj-dbtool -a %{_libdir}/%{name}/mappings/jdt.db \
$j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
done
dbLocation=`gcj-dbtool -p`
if ! [ -e $dbLocation ]; then
dirname $dbLocation | xargs mkdir -p
gcj-dbtool -n $dbLocation
fi
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%post pde
for j in `cat %{_libdir}/%{name}/%{name}-pde.jarswithnativelibs`; do
gcj-dbtool -a %{_libdir}/%{name}/mappings/pde.db \
$j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
done
dbLocation=`gcj-dbtool -p`
if ! [ -e $dbLocation ]; then
dirname $dbLocation | xargs mkdir -p
gcj-dbtool -n $dbLocation
fi
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%post platform
for j in `cat %{_libdir}/%{name}/%{name}-platform.jarswithnativelibs`; do
gcj-dbtool -a %{_libdir}/%{name}/mappings/platform.db \
$j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
done
dbLocation=`gcj-dbtool -p`
if ! [ -e $dbLocation ]; then
dirname $dbLocation | xargs mkdir -p
gcj-dbtool -n $dbLocation
fi
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%post -n %{libname}-gtk2
%ifarch alpha ia64 ppc64 sparc64 x86_64
for j in `cat %{_libdir}/%{name}/%{libname}-gtk2.jarswithnativelibs.64bit`; do
gcj-dbtool -a %{_libdir}/%{name}/mappings/libswt3-gtk2.db \
$j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
done
%else
for j in `cat %{_libdir}/%{name}/%{libname}-gtk2.jarswithnativelibs`; do
gcj-dbtool -a %{_libdir}/%{name}/mappings/libswt3-gtk2.db \
$j `echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
done
%endif
dbLocation=`gcj-dbtool -p`
mkdir -p `dirname $dbLocation`
if ! [ -e $dbLocation ]; then
gcj-dbtool -n $dbLocation
fi
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%postun ecj
dbLocation=`gcj-dbtool -p`
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%postun jdt
dbLocation=`gcj-dbtool -p`
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%postun pde
dbLocation=`gcj-dbtool -p`
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%postun platform
dbLocation=`gcj-dbtool -p`
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
%postun -n %{libname}-gtk2
dbLocation=`gcj-dbtool -p`
if [ -n "`find %{_libdir}/%{name}/mappings -name \*.db`" ]; then
gcj-dbtool -m %{_libdir}/%{name}/eclipse.db `find %{_libdir}/%{name}/mappings -name \*.db`
gcj-dbtool -m $dbLocation `find %{_libdir}/%{name}/mappings -name \*.db` $dbLocation
fi
# FIXME: add the native directories to these lists
%files ecj
%defattr(0644,root,root,0755)
%dir %{_datadir}/%{name}
#%{_bindir}/ecj
%{_datadir}/%{name}/plugins/org.eclipse.jdt.core_3.*
%{_datadir}/java/jdtcore*.jar
# Native bits
%{_libdir}/%{name}/eclipse.db
#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh
%dir %{_libdir}/%{name}/mappings
%{_libdir}/%{name}/mappings/ecj.db
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/lib-org-eclipse-jdt.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtCompilerAdapter.jar.so
%files -n %{libname}-gtk2
%files -n %{libname}-gtk2 -f %{libname}-gtk2.install
%defattr(0644,root,root,0755)
%{_datadir}/%{name}/plugins/org.eclipse.swt.gtk*_3.*
%{_datadir}/%{name}/plugins/org.eclipse.jface_3.*
%{_datadir}/%{name}/plugins/org.eclipse.jface.text_3.*
%attr(0755,root,root) %{_libdir}/%{name}/libswt-gnome-gtk-*.so
%attr(0755,root,root) %{_libdir}/%{name}/libswt-gtk-*.so
%attr(0755,root,root) %{_libdir}/%{name}/libswt-pi-gtk-*.so
@ -773,8 +811,6 @@ fi
%{_javadir}/swt-mozilla*.jar
%{_javadir}/swt-cairo*.jar
# Native bits
%{_libdir}/%{name}/eclipse.db
#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh
%dir %{_libdir}/%{name}/mappings
%{_libdir}/%{name}/mappings/libswt3-gtk2.db
%ifarch alpha ia64 ppc64 sparc64 x86_64
@ -782,13 +818,11 @@ fi
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0/ws/gtk/swt-mozilla.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0/ws/gtk/swt-cairo.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0/ws/gtk/swt.jar.so
%attr(0644,root,root) %{_libdir}/%{name}/%{libname}-gtk2.jarswithnativelibs.64bit
%else
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt-pi.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt-mozilla.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt-cairo.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk_3.1.0/ws/gtk/swt.jar.so
%attr(0644,root,root) %{_libdir}/%{name}/%{libname}-gtk2.jarswithnativelibs
%endif
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jface_3.1.0/jface.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jface.text_3.1.0/jfacetext.jar.so
@ -796,8 +830,6 @@ fi
%files jdt -f %{name}-jdt.install
%defattr(0644,root,root,0755)
# Native bits
%{_libdir}/%{name}/eclipse.db
#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh
%dir %{_libdir}/%{name}/mappings
%{_libdir}/%{name}/mappings/jdt.db
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_3.1.0/jdiui.jar.so
@ -811,7 +843,6 @@ fi
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.ui_3.1.0/serialsupport.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.junit_3.8.1/junit.jar.so
%attr(0644,root,root) %{_libdir}/%{name}/%{name}-jdt.jarswithnativelibs
%files jdt-devel
%{_datadir}/%{name}/plugins/org.eclipse.jdt.source_3.*
@ -820,8 +851,6 @@ fi
%files pde -f %{name}-pde.install
%defattr(0644,root,root,0755)
# Native bits
%{_libdir}/%{name}/eclipse.db
#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh
%dir %{_libdir}/%{name}/mappings
%{_libdir}/%{name}/mappings/pde.db
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.build_3.1.0/lib/pdebuild-ant.jar.so
@ -833,7 +862,6 @@ fi
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.ui_3.1.0/pdeui.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde_3.1.0/pde.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde_3.1.0/ant_tasks/pde-ant.jar.so
%attr(0644,root,root) %{_libdir}/%{name}/%{name}-pde.jarswithnativelibs
%files pde-devel
%{_datadir}/%{name}/plugins/org.eclipse.pde.source_3.*
@ -857,8 +885,6 @@ fi
%{_datadir}/icons/*/*/apps/*
%config(noreplace) %{_sysconfdir}/eclipse.conf
# Native bits
%{_libdir}/%{name}/eclipse.db
#%attr(0755,root,root) %{_libdir}/%{name}/eclipse-mergedbs.sh
%dir %{_libdir}/%{name}/mappings
%{_libdir}/%{name}/mappings/platform.db
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.ant.core_3.1.0/antsupport.jar.so
@ -945,7 +971,6 @@ fi
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.tomcat_4.1.30/naming-resources.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.tomcat_4.1.30/tomcat-http11.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.osgi_3.1.0/core.jar.so
# FIXME: Don't forget to re-add this jar to eclipse-platform.jarswithnativelibs
#%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.osgi_3.1.0/eclipseAdaptor.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ssh2_3.1.0/cvsssh2.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.apache.ant_1.6.2/lib/ant-stylebook.jar.so
@ -980,8 +1005,6 @@ fi
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.help.webapp_3.0.0/WEB-INF/lib/jsp.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.help.webapp_3.0.0/WEB-INF/lib/servlets.jar.so
%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.ui.console_3.1.0/console.jar.so
# FIXME until libgcj contains gnujaxp (libgcj PR 19301)
%attr(0644,root,root) %{_libdir}/%{name}/%{name}-platform.jarswithnativelibs
%files platform-devel
%{_datadir}/%{name}/plugins/org.eclipse.platform.source_3.*
@ -989,8 +1012,17 @@ fi
%{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0
%changelog
* Wed Mar 09 2005 Andrew Overholt <overholt@redhat.com> 3.1.0_fc-0.M5.13
* Fri Mar 18 2005 Andrew Overholt <overholt@redhat.com> 3.1.0_fc-0.M5.13
- Re-add compilation of resources.jar.
- Backport bootstrapping patch.
- Add Requires: java-1.4.2-gcj-compat.
- Modified find patch courtesy Ziga Mahkovec (RH#149927#).
- Compile with -O2 on ppc as well.
- Add jsch, jakarta-commons-modeler, and mx4j symlinking.
- Make use of gcj-dbtool -f to create databases in install.
- Use system-wide classmap.db.
- Remove *.jarswithnativelibs from files sections.
- Update mozilla dependency.
* Mon Mar 07 2005 Ben Konrath <bkonrath@redhat.com> 3.1.0_fc-0.M5.12
- Add activeHelpSample.jar patch.