rpms/eclipse-bugzilla/devel eclipse-bugzilla.spec,1.13,1.14

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Apr 26 22:58:01 UTC 2005


Author: overholt

Update of /cvs/dist/rpms/eclipse-bugzilla/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv4617

Modified Files:
	eclipse-bugzilla.spec 
Log Message:
* Tue Apr 26 2005 Andrew Overholt <overholt at redhat.com> 0.1.0_fc-13
- Re-organize and make use of scripts.



Index: eclipse-bugzilla.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse-bugzilla/devel/eclipse-bugzilla.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- eclipse-bugzilla.spec	26 Apr 2005 21:31:25 -0000	1.13
+++ eclipse-bugzilla.spec	26 Apr 2005 22:57:58 -0000	1.14
@@ -1,6 +1,7 @@
 Epoch: 1
 ExclusiveArch: i386 ppc x86_64
 
+%define gcj_support 		1
 %define pkg_summary		Eclipse Bugzilla plug-in
 %define section			free
 %define eclipse_name 		eclipse
@@ -11,27 +12,21 @@
 %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
+%define eclipse_arch   %{_arch}
 %endif
-%ifarch ppc64pseries
-%define eclipse_arch	ppc64
-%endif
-%ifarch x86_64
-%define eclipse_arch	amd64
-%endif
-
-
 
 Summary: 	%{pkg_summary} 
 Name: 		%{eclipse_name}-bugzilla
 Version: 	%{version_majmin}.%{version_micro}_fc
-Release:	12
+Release:	13
 License:	Common Public License v1.0 <http://www.eclipse.org/legal/cpl-v10.html>
 Group:		Text Editors/Integrated Development Environments (IDE)
 #URL:		
 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 
@@ -44,16 +39,17 @@
 
 Source0: eclipse-bugzilla.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: gcc-java >= 4.0.0-0.30
-BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_13rh
+%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
 
@@ -64,33 +60,24 @@
 %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}
 SDK=$(cd SDK && pwd)
 
 mkdir home
-mkdir native
 
 homedir=$(cd home > /dev/null && pwd)
-nativehome=$(cd native > /dev/null && pwd)
 
 pushd `pwd` 
 cd org.eclipse.team.bugzilla.releng
 
-
-
-# Call eclipse headless to process changelong releng build scripts
+# Call eclipse headless to process bugzilla 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 \
@@ -99,85 +86,101 @@
     -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 zip file
-# that the releng build produces
+%if %{gcj_support}
+  mkdir native
+  for file in $(pwd)/results/I.*/*.tar.gz; do
+    case $file in
+      *org.eclipse.team.bugzilla*)
+        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	
+
+  # We don't need any of this exploded tarball any more
+  rm -rf *
+%endif
+
 popd
-for file in $(pwd)/org.eclipse.team.bugzilla.releng/results/I.*/*.tar.gz; do
-  case $file in
-    *org.eclipse.team.bugzilla*)
-         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 -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 zip)
-		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)/org.eclipse.team.bugzilla.releng/results/I.*/*.tar.gz; do
   case $file in
     *org.eclipse.team.bugzilla*)
       # 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 bugzilla 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 org.eclipse.team.bugzilla.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/org.eclipse.team.bugzilla*
 %{eclipse_base}/plugins/org.eclipse.team.bugzilla*
 %{eclipse_base}/plugins/org.eclipse.team.bugs*
+%if %{gcj_support}
 %{eclipse_lib_base}/plugins/org.eclipse.team.bugzilla*
 %{eclipse_lib_base}/plugins/org.eclipse.team.bugs*
 %{_libdir}/gcj-4.0.0/classmap.db.d/%{name}.db
+%endif
 
 %changelog
+* Tue Apr 26 2005 Andrew Overholt <overholt at redhat.com> 0.1.0_fc-13
+- Re-organize and make use of scripts.
+
 * Tue Apr 26 2005 Jeff Pound <jpound at redhat.com> 0.1.0_fc-12
 - Fix double '/' in URL when retrieving version info.
 - Add workaround for redirects.




More information about the fedora-cvs-commits mailing list