Re: [gnome-db] Litle question about redhat 7.x srpm



On Tue, 2002-04-16 at 14:22, Rodrigo Moya wrote:

> and, this is done how? If you know how to do it and it's the correct
> way, please, can you provide a patch?
> 

Yes, i've downloaded and installed InterBaseCS_LI-6.0, and i recompiled
successfully libgda with support for interbase, so i've added
'InterBaseCS_LI >= 6.0' as a BuildPrereq, i dont know if previous
versions work as well.

I also changed a little the spec file to be, IMHO cleaner, if you don't
like the changes i made, sorry about that, please tell me and i'll send
you a patch with only the BuildPrereq change in it.

PS: This patch is for libgda-0.2.95

Joan.

--- SPECS/libgda.spec	Fri Feb 22 15:47:14 2002
+++ libgda.spec	Tue Apr 16 16:40:35 2002
@@ -6,6 +6,11 @@
 %define  RELEASE 1
 %define  rel     %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
 
+%define WithInterbase        0
+%define WithPostgresql       0
+%define WithODBC             0
+%define WithMysql            1
+
 Summary: GNU Data Access
 Name: 		%name
 Version:	%ver
@@ -15,7 +20,7 @@
 Source:		ftp://ftp.gnome-db.org/pub/gnome-db/sources/%{ver}/%{name}-%{ver}.tar.gz
 BuildRoot: 	%{_tmppath}/%{name}-%{ver}-root
 URL: 		http://www.gnome-db.org
-BuildPrereq: GConf-devel >= 0.11, libxml-devel >= 1.8 , oaf-devel >= 0.6, ORBit-devel >= 0.5, glib-devel >= 1.2, gtk+-devel >= 1.2
+BuildPrereq: GConf-devel >= 0.11 , libxml-devel >= 1.8 , oaf-devel >= 0.6, ORBit-devel >= 0.5, glib-devel >= 1.2, gtk+-devel >= 1.2
 %define add_incs -I/usr/include/popt -I/usr/include/tcl -I/usr/include/gdbm
 %description
 GNU Data Access is an attempt to provide uniform access to
@@ -46,6 +51,7 @@
  separated from it to allow non-GNOME applications to be
  developed based on it.
 
+%if %{WithODBC}
 %package -n gda-odbc
 Summary: GDA ODBC Provider
 Group:		Applications/Databases
@@ -66,6 +72,8 @@
 
  This package includes the GDA ODBC provider
 
+%endif
+%if %{WithPostgresql}
 %package -n gda-postgres
 Summary: GDA PostgreSQL Provider
 Group:		Applications/Databases
@@ -86,6 +94,8 @@
 
  This package includes the GDA PostgreSQL provider
 
+%endif
+%if %{WithMysql}
 %package -n gda-mysql
 Summary: GDA MySQL Provider
 Group:		Applications/Databases
@@ -106,11 +116,13 @@
 
  This package includes the GDA MySQL provider
 
+%endif
+%if %{WithInterbase}
 %package -n gda-interbase
 Summary: GDA InterBase Provider
 Group:          Applications/Databases
 Requires:       %name = %{PACKAGE_VERSION}
-#BuildPrereq:    -devel >= 
+BuildPrereq:    InterBaseCS_LI >= 6.0
 
 %description -n gda-interbase
 GNU Data Access is an attempt to provide uniform access to
@@ -125,6 +137,7 @@
  developed based on it.
 
  This package includes the GDA InterBase provider
+%endif
 
 %changelog
 * Thu May 31 2001 Serge Pavlovsky <pal re com ua>
@@ -145,11 +158,36 @@
 
 export CFLAGS="%optflags %add_incs" 
 # Needed for snapshot releases.
-if [ ! -f configure ]; then
-  ./autogen.sh $ARCH_FLAGS --prefix=%{_prefix} --with-odbc=%{_prefix} --with-postgres=yes --with-mysql=yes --with-interbase=/opt/interbase
-else
-  ./configure $ARCH_FLAGS --prefix=%{_prefix} --with-odbc=%{_prefix} --with-postgres=yes --with-mysql=yes --with-interbase=/opt/interbase
-fi
+
+ if [ ! -f configure ]; then
+   ./autogen.sh $ARCH_FLAGS --prefix=%{_prefix} 
+          %if %{WithODBC}
+              --with-odbc=%{_prefix} \
+          %endif
+          %if %{WithPostgresql}
+              --with-postgres=yes \
+          %endif
+          %if %{WithMysql}
+              --with-mysql=yes \
+          %endif
+          %if %{WithInterbase}
+              --with-interbase=/opt/interbase
+          %endif
+ else
+   ./configure $ARCH_FLAGS --prefix=%{_prefix} \
+          %if %{WithODBC}
+              --with-odbc=%{_prefix} \
+          %endif
+          %if %{WithPostgresql}
+              --with-postgres=yes \
+          %endif
+          %if %{WithMysql}
+              --with-mysql=yes \
+          %endif
+          %if %{WithInterbase}
+              --with-interbase=/opt/interbase
+          %endif
+ fi
 
 if [ "$SMP" != "" ]; then
   (make "MAKE=make -k -j $SMP"; exit 0)
@@ -193,28 +231,35 @@
 %{_libdir}/lib*.so
 %{_includedir}/*
 
+%if %{WithODBC}         
 %files -n gda-odbc
 %defattr(-, root, root)
 
 %{_bindir}/gda-odbc-srv
 %{_datadir}/oaf/GNOME_GDA_Provider_ODBC.oaf
+%endif
 
+%if %{WithPostgresql}
 %files -n gda-postgres
 %defattr(-, root, root)
 
 %{_bindir}/gda-postgres-srv
 %{_datadir}/oaf/GNOME_GDA_Provider_Postgres.oaf
+%endif
 
+%if %{WithMysql}
 %files -n gda-mysql
 %defattr(-, root, root)
 
 %{_bindir}/gda-mysql-srv
 %{_datadir}/oaf/GNOME_GDA_Provider_MySQL.oaf
+%endif
 
+%if %{WithInterbase}
 %files -n gda-interbase
 %defattr(-, root, root)
 
 %{_bindir}/gda-interbase-srv
 %{_datadir}/oaf/GNOME_GDA_Provider_InterBase.oaf
-
+%endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]