rpms/eclipse-changelog/devel eclipse-changelog.spec,1.25,1.26
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Apr 27 04:22:51 UTC 2005
Author: overholt
Update of /cvs/dist/rpms/eclipse-changelog/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv12691
Modified Files:
eclipse-changelog.spec
Log Message:
* Tue Apr 26 2005 Andrew Overholt <overholt at redhat.com> 2.0.1_fc-21
- Re-organize and make use of scripts.
Index: eclipse-changelog.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse-changelog/devel/eclipse-changelog.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- eclipse-changelog.spec 20 Apr 2005 21:41:09 -0000 1.25
+++ eclipse-changelog.spec 27 Apr 2005 04:22:49 -0000 1.26
@@ -1,6 +1,7 @@
Epoch: 1
ExclusiveArch: i386 ppc x86_64
+%define gcj_support 1
%define pkg_summary Eclipse Changelog plug-in
%define section free
%define eclipse_name eclipse
@@ -11,6 +12,7 @@
%define eclipse_base %{_datadir}/%{eclipse_name}
%define eclipse_lib_base %{_libdir}/%{eclipse_name}
+# All arches line up except i386 -> x86
%ifarch %{ix86}
%define eclipse_arch x86
%else
@@ -20,12 +22,11 @@
Summary: %{pkg_summary}
Name: %{eclipse_name}-changelog
Version: %{changelog_majmin}.%{changelog_micro}_fc
-Release: 20
+Release: 21
License: EPL (Eclipse Public License) <http://www.eclipse.org/legal/epl-v10.html>
Group: Text Editors/Integrated Development Environments (IDE)
-URL: http://www.redhat.com
+URL: http://sources.redhat.com/eclipse
Requires: eclipse-platform
-Requires: gcc-java
# Note that following the Eclipse Releng process we do not distribute a
# real .tar.gz file. Instead, you must build it by hand. The way to do
@@ -38,18 +39,16 @@
Source0: eclipse-changelog.tar.gz
-BuildRequires: jpackage-utils >= 0:1.5
-BuildRequires: gtk2-devel
-BuildRequires: glib2-devel
-BuildRequires: eclipse-platform
-BuildRequires: eclipse-jdt
BuildRequires: eclipse-pde
-BuildRequires: libswt3-gtk2
-BuildRequires: eclipse-gtk2
BuildRequires: eclipse-cdt
BuildRequires: eclipse-pydev
-BuildRequires: gcc-java >= 4.0.0-0.30
-BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_4rh
+%if %{gcj_support}
+BuildRequires: gcc-java >= 4.0.0-1
+BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_18rh
+Requires(post,postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_18rh
+%else
+BuildRequires: java-devel >= 1.4.2
+%endif
BuildRoot: %{_tmppath}/%{name}-buildroot
@@ -60,10 +59,7 @@
%prep
%setup -q -c
-
%build
-export JAVA_HOME=%{java_home}
-export PATH=%{java_bin}:%{_bindir}:$PATH
# See comments in the script to understand this.
/bin/sh -x %{eclipse_base}/buildscripts/copy-platform SDK %{eclipse_base} cdt
@@ -72,105 +68,114 @@
SDK=$(cd SDK && pwd)
mkdir home
-mkdir native
homedir=$(cd home > /dev/null && pwd)
-nativehome=$(cd native > /dev/null && pwd)
pushd `pwd`
cd com.redhat.eclipse.changelog.releng
-# Call eclipse headless to process changelong releng build scripts
+# Call eclipse headless to process changelog releng build scripts
# need -Dosgi.install.area for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198
java -cp $SDK/startup.jar \
-Duser.home=$homedir \
-Dosgi.install.area=%{eclipse_base} \
- -Dorg.eclipse.core.runtime.ignoreLockFile=true \
- -Dgnu.gcj.runtime.VMClassLoader.library_control=never \
org.eclipse.core.launcher.Main \
-application org.eclipse.ant.core.antRunner \
+ -DjavacFailOnError=false \
-DdontUnzip=true \
-DbaseLocation=$SDK \
-Dpde.build.scripts=$SDK/plugins/org.eclipse.pde.build_3.1.0/scripts \
-DdontFetchAnything=true
-# Build the each .jar to .so. We have to extract them from the tar file
-# that the releng build produces
+%if %{gcj_support}
+ mkdir native
+ for file in $(pwd)/results/I.*/*.tar.gz; do
+ case $file in
+ *eclipse-Changelog*)
+ tar -zx -C native -f $file *.jar
+ cd native
+ %ifarch %{ix86} ppc
+ find-and-aot-compile %{name}-native "-fPIC -fjni -O2"
+ %else
+ find-and-aot-compile %{name}-native "-fPIC -fjni -O1"
+ %endif
+ mv %{name}-native.tar.gz ..
+ ;;
+ esac
+ done
+%endif
popd
-for file in $(pwd)/com.redhat.eclipse.changelog.releng/results/I.*/*.tar.gz; do
- case $file in
- *eclipse-Changelog*)
- tar -zxv -C $nativehome -f $file *.jar
- cd $nativehome/eclipse/plugins
- for jarname in `find . -type f -name "*.jar"`; do
- jarname=`echo $jarname | cut -c3-`
- gcj -fPIC -O2 -fjni -findirect-dispatch -shared -Wl,-Bsymbolic -o $jarname.so $jarname
-
- # Once compiled, we don't care about the jar (it's still in the original tar)
- rm $jarname
- done
- ;;
- esac
-done
-
%install
-nativehome=$(cd native > /dev/null && pwd)
rm -rf ${RPM_BUILD_ROOT}
-mkdir -p ${RPM_BUILD_ROOT}/%{eclipse_base}
+
+install -d -m755 ${RPM_BUILD_ROOT}/%{eclipse_base}
# Dump the files from the releng tarball into the build root
for file in $(pwd)/com.redhat.eclipse.changelog.releng/results/I.*/*.tar.gz; do
case $file in
*eclipse-Changelog*)
# The ".." is needed since the zip files contain "eclipse/foo".
- (cd $RPM_BUILD_ROOT/%{eclipse_base}/.. && tar zxvf $file)
+ (cd $RPM_BUILD_ROOT/%{eclipse_base}/.. && tar zxf $file)
;;
esac
done
-# Create mappings directory
-install -d -m755 $RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
-
-# Create the initial changelog database
-gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
-gcj-dbtool -n $gcjdbdir/%{name}.db 8000
-
+%if %{gcj_support}
-# Create plugins directory in eclipse lib base
-install -d -m755 $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins/
+ # Create plugins directory in eclipse lib base
+ install -d -m755 $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins
-# Populate db with mappings
-for j in `find $RPM_BUILD_ROOT/%{eclipse_base} -name \*.jar`; do
- gcj-dbtool -f $gcjdbdir/%{name}.db \
- $j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
-done;
+ cd com.redhat.eclipse.changelog.releng/native
+ tar zxf ../%{name}-native.tar.gz
+ mv %{name}-native/eclipse/plugins/* $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins
+
+ # Directory to hold all the .jar->.so mapping dbs
+ install -d -m 755 $RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`
+ install -d -m 755 $RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
+
+ # Create the pydev database
+ gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
+ mkdir -p $gcjdbdir
+ gcj-dbtool -n $gcjdbdir/%{name}.db 8000
+
+ # Populate it
+ for j in `find $RPM_BUILD_ROOT/%{eclipse_base} -name \*.jar`; do
+ lib=`echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
+ lib=`dirname $lib`/lib`basename $lib`;
+ ls -l $lib;
+ if [ -f $lib ]; then
+ gcj-dbtool -f $gcjdbdir/%{name}.db \
+ $j `echo $lib | sed "s:$RPM_BUILD_ROOT/::"`;
+ fi;
+ done;
-cd $nativehome/eclipse/plugins
+%endif
-# Copy the .so(s) we created earlier into the build root
-for file in `find . -type f -name *.so`; do
- install -m755 -d $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins/`dirname $file`
- install -m644 $file $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins/`dirname $file`
-done
+%clean
+rm -rf ${RPM_BUILD_ROOT}
-%post
-rebuild-gcj-db %{_libdir}
+%if %{gcj_support}
+%post
+/usr/bin/rebuild-gcj-db %{_libdir}
%postun
-rebuild-gcj-db %{_libdir}
-
-%clean
-rm -rf ${RPM_BUILD_ROOT}
+/usr/bin/rebuild-gcj-db %{_libdir}
+%endif
%files
%defattr(-,root,root)
%{eclipse_base}/features/com.redhat.eclipse.changelog*
%{eclipse_base}/plugins/com.redhat.eclipse.changelog*
+%if %{gcj_support}
%{eclipse_lib_base}/plugins/com.redhat.eclipse.changelog*
%{_libdir}/gcj-4.0.0/classmap.db.d/%{name}.db
+%endif
%changelog
+* Tue Apr 26 2005 Andrew Overholt <overholt at redhat.com> 2.0.1_fc-21
+- Re-organize and make use of scripts.
+
* Wed Apr 20 2005 Phil Muldoon <pmuldoon at redhat.com> 2.0.1_fc-20
- Fixed SDK symlink so Python parser will build
- Remove -DjavacFailOnError=false from java -cp command
More information about the fedora-cvs-commits
mailing list