# Default provider build options (MySQL, Postgres & unixODBC)
#
# Package build options:
# --with tds
# --with db2
# --with oracle
# --with sybase
# --with mdb
# --without ldap
# --without mysql
# --without odbc
# --without postgres
#
%define FREETDS 0
%define IBMDB2 0
%define MYSQL 1
%define ODBC 1
%define ORACLE 0
%define POSTGRES 1
%define SYBASE 0
%define MDB 0
%define LDAP 1
%{?_with_tds:%define FREETDS 1}
%{?_with_db2:%define IBMDB2 1}
%{?_with_mdb:%define MDB 1}
%{?_with_oracle:%define ORACLE 1}
%{?_with_sybase:%define SYBASE 1}
%{?_without_ldap:%define LDAP 0}
%{?_without_mysql:%define MYSQL 0}
%{?_without_odbc:%define ODBC 0}
%{?_without_postgres:%define POSTGRES 0}
Summary: Library for writing gnome database programs
Name: libgda
Version: 1.9.100
Release: 12%{?dist}
Epoch: 1
Source: http://ftp.gnome.org/pub/GNOME/sources/%{name}/1.9/%{name}-%{version}.tar.bz2
URL: http://www.gnome-db.org/
Group: System Environment/Libraries
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pkgconfig >= 0.8
BuildRequires: glib2-devel >= 2.0.0
BuildRequires: libxslt-devel >= 1.0.9
BuildRequires: libxml2-devel ncurses-devel sqlite-devel readline-devel
BuildRequires: db4-devel gamin-devel gtk-doc scrollkeeper groff gettext
BuildRequires: flex bison intltool automake libtool
%ifnarch ppc64
BuildRequires: mono-devel gtk-sharp2-devel gtk-sharp2-gapi
%endif
%if %{FREETDS}
BuildRequires: freetds-devel
%endif
%if %{MYSQL}
BuildRequires: mysqlclient10-devel
%endif
%if %{POSTGRES}
BuildRequires: postgresql-devel
%endif
%if %{ODBC}
BuildRequires: unixODBC-devel
%endif
%if %{MDB}
BuildRequires: mdbtools-devel
%endif
%if %{LDAP}
BuildRequires: openldap-devel
%endif
Patch0: libgda-1.9.100-configure.patch
Patch1: libgda-1.9.100-sharp.patch
Patch2: libgda-1.9.100-syslibs.patch
Patch3: libgda-1.9.100-64bit.patch
%description
libgda is a library that eases the task of writing
gnome database programs.
%package devel
Summary: Development libraries and header files for libgda
Group: Development/Libraries
Requires: glib2-devel >= 2.0.0
Requires: libxslt-devel >= 1.0.9
Requires: db4-devel libxml2-devel
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
This package contains the header files and libraries needed to write
or compile programs that use libgda.
%ifnarch ppc64
%package sharp
Summary: Mono bindings for libgda
Group: System Environment/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
%description sharp
This package contains the dll files needed to run (and compile) Mono
applications which use libgda.
%package sharp-devel
Summary: Development files for the Mono bindings for libgda
Group: Development/Libraries
Requires: %{name}-sharp = %{epoch}:%{version}-%{release}
Requires: pkgconfig
%description sharp-devel
Development files for the Mono bindings for libgda
%endif
%package sqlite
Summary: SQLite provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-sqlite < %{epoch}:%{version}-%{release}
Provides: gda-sqlite = %{epoch}:%{version}-%{release}
%description sqlite
This package includes the libgda SQLite provider.
%if %{FREETDS}
%package freetds
Summary: FreeTDS provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-freetds < %{epoch}:%{version}-%{release}
Provides: gda-freetds = %{epoch}:%{version}-%{release}
%description freetds
This package includes the libgda FreeTDS provider.
%endif
%if %{IBMDB2}
%package ibmdb2
Summary: IBM DB2 provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-ibmdb2 < %{epoch}:%{version}-%{release}
Provides: gda-ibmdb2 = %{epoch}:%{version}-%{release}
%description ibmdb2
This package includes the libgda IBM DB2 provider.
%endif
%if %{MYSQL}
%package mysql
Summary: MySQL provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-mysql < %{epoch}:%{version}-%{release}
Provides: gda-mysql = %{epoch}:%{version}-%{release}
%description mysql
This package includes the libgda MySQL provider.
%endif
%if %{ODBC}
%package odbc
Summary: ODBC provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-odbc < %{epoch}:%{version}-%{release}
Provides: gda-odbc = %{epoch}:%{version}-%{release}
%description odbc
This package includes the libgda ODBC provider.
%endif
%if %{ORACLE}
%package oracle
Summary: Oracle provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-oracle < %{epoch}:%{version}-%{release}
Provides: gda-oracle = %{epoch}:%{version}-%{release}
%description oracle
This package includes the libgda Oracle provider.
%endif
%if %{POSTGRES}
%package postgres
Summary: PostgreSQL provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-postgres < %{epoch}:%{version}-%{release}
Provides: gda-postgres = %{epoch}:%{version}-%{release}
%description postgres
This package includes the libgda PostgreSQL provider.
%endif
%if %{SYBASE}
%package sybase
Summary: Sybase provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-sybase < %{epoch}:%{version}-%{release}
Provides: gda-sybase = %{epoch}:%{version}-%{release}
%description sybase
This package includes the libgda Sybase provider.
%endif
%if %{MDB}
%package mdb
Summary: MDB provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-mdb < %{epoch}:%{version}-%{release}
Provides: gda-mdb = %{epoch}:%{version}-%{release}
%description mdb
This package includes the libgda MDB provider.
%endif
%if %{LDAP}
%package ldap
Summary: LDAP provider for libgda
Group: System Environment/Libraries
Obsoletes: gda-ldap < %{epoch}:%{version}-%{release}
Provides: gda-ldap = %{epoch}:%{version}-%{release}
%description ldap
This package includes the libgda LDAP provider.
%endif
%prep
%setup -q
rm -fr providers/sqlite/sqlite-src
%patch0 -p1 -b .configure
%patch1 -p1 -b .sharp
%patch2 -p1 -b .syslibs
%patch3 -p1 -b .64bit
# fix ppc64 postgres detection
sed -i 's/x86_64\* | sparc64\*) lib="lib64";;/x86_64\* | sparc64\* | powerpc64\*) lib="lib64";;/' \
configure.in
aclocal
automake
autoconf
%build
%if %{FREETDS}
CONFIG="$CONFIG --with-tds"
%else
CONFIG="$CONFIG --without-tds"
%endif
%if %{IBMDB2}
CONFIG="$CONFIG --with-ibmdb2"
%else
CONFIG="$CONFIG --without-ibmdb2"
%endif
%if %{MYSQL}
CONFIG="$CONFIG --with-mysql"
%else
CONFIG="$CONFIG --without-mysql"
%endif
%if %{POSTGRES}
CONFIG="$CONFIG --with-postgres"
%else
CONFIG="$CONFIG --without-postgres"
%endif
%if %{ODBC}
CONFIG="$CONFIG --with-odbc"
%else
CONFIG="$CONFIG --without-odbc"
%endif
%if %{ORACLE}
CONFIG="$CONFIG --with-oracle"
%else
CONFIG="$CONFIG --without-oracle"
%endif
%if %{SYBASE}
CONFIG="$CONFIG --with-sybase"
%else
CONFIG="$CONFIG --without-sybase"
%endif
%if %{MDB}
CONFIG="$CONFIG --with-mdb"
%else
CONFIG="$CONFIG --without-mdb"
%endif
%if %{LDAP}
CONFIG="$CONFIG --with-ldap"
%else
CONFIG="$CONFIG --without-ldap"
%endif
%configure $CONFIG
make
%install
rm -rf %{buildroot}
%makeinstall
%ifnarch ppc64
#fixup mono / sharp related files install
mkdir -p %{buildroot}/%{_datadir}/gapi-2.0
mv %{buildroot}/%{_libdir}/libgda/gda-api.xml %{buildroot}/%{_datadir}/gapi-2.0
%endif
# Cleanup unnecessary, unpackaged files
rm -f %{buildroot}/%{_libdir}/libgda-1.9/providers/*.{a,la}
rm -f %{buildroot}/%{_libdir}/*.{a,la}
rm -f %{buildroot}/%{_sysconfdir}/libgda/sales_test.db
%find_lang libgda-3
%post -p /sbin/ldconfig
%post devel
if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi
%postun -p /sbin/ldconfig
%postun devel
if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi
%clean
rm -rf %{buildroot}
%files -f libgda-3.lang
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README NEWS
#%doc %{_datadir}/gnome/help/libgda
%dir %{_sysconfdir}/libgda
%config(noreplace) %{_sysconfdir}/libgda/config
%{_bindir}/*
%{_datadir}/libgda
%{_libdir}/*.so.*
%dir %{_libdir}/libgda-1.9
%dir %{_libdir}/libgda-1.9/providers
# note this file really should be in its own subpackage too, but libgda
# needs to have atleast one provider present to be of any use.
%{_libdir}/libgda-1.9/providers/libgda-bdb.so
%{_mandir}/man1/*
%{_mandir}/man5/*
%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/libgda
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libgda-2.0.pc
%ifnarch ppc64
%files sharp
%defattr(-,root,root)
%{_libdir}/libgda
%files sharp-devel
%defattr(-,root,root)
%{_datadir}/gapi-2.0
%{_libdir}/pkgconfig/gda-sharp-2.0.pc
%endif
%files sqlite
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-sqlite.so
%if %{FREETDS}
%files freetds
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-freetds.so
%endif
%if %{IBMDB2}
%files ibmdb2
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-ibmdb2.so
%endif
%if %{MYSQL}
%files mysql
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-mysql.so
%endif
%if %{ODBC}
%files odbc
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-odbc.so
%endif
%if %{ORACLE}
%files oracle
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-oracle.so
%endif
%if %{POSTGRES}
%files postgres
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-postgres.so
%endif
%if %{SYBASE}
%files sybase
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-sybase.so
%endif
%if %{MDB}
%files mdb
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-mdb.so
%endif
%if %{LDAP}
%files ldap
%defattr(-,root,root)
%{_libdir}/libgda-1.9/providers/libgda-ldap.so
%endif
%changelog
* Thu May 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-12
- Don't build mono/sharp bits on ppc64
- Fixup packaging of sharp bindings to match the mono packaging guidelines
* Fri Dec 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-11
- Rebuild for new postgres
* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-10
- FE6 Rebuild
* Tue Jun 20 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-9
- Add BuildRequires: libtool hopefully _really_ fixing building with the new
stripped mock config. (Drop BR: autoconf which is implied by BR: automake).
* Thu Jun 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-8
- Add BuildRequires: automake, autoconf to fix building with the new even more
stripped mock config.
* Sat Jun 10 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-7
- Add BuildRequires: gettext, bison, flex, gamin-devel to fix building with
new stripped mock config.
* Thu May 11 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-6
- Move Obsoletes and Provides for plugins out of the plugins %%description,
so that they actually Obsolete and Provide instead of showing up in rpm -qi
(bug 191213).
* Thu May 4 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-5
- Add patch3 fixing a couple of x86_64 bugs (bz 190366)
* Mon Feb 13 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-4
- Bump release and rebuild for new gcc4.1 and glibc.
- Make sqlite plugin use system sqlite not build in version
- Make sqlite plugin a seperate package again
- Attempt to properly install C-sharp/mono bindings
- Add %%{?dist} for consistency with my other packages
- Remove static lib from -devel package
* Tue Jan 17 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-3
- Make -sharp package Require the main package.
* Mon Jan 16 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-2
- Remove unneeded requires (.so reqs are automaticly picked up by rpm).
- Add BuildRequires for building libgda-sharp
* Sun Nov 27 2005 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.9.100-1
- New upstream version
- Drop 4 intergrated patches
- Removed sqlite configurability, it is now an internal part of the upstream
sources.
* Fri Aug 5 2005 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.2.0-8
- Remove libgda.la file from devel package.
* Sat Jun 25 2005 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.2.0-7
- Added Patch4: libgda-1.2.0-libdir.patch which fixes loading of
database providers on platforms with a lib64 dir. Thanks to:
Bas Driessen <bas.driessen@xobas.com> for the patch.
- Enabled building of libgda-ldap and libgda-sqlite by default.
* Tue Jun 21 2005 Hans de Goede <j.w.r.degoede@hhs.nl> 1:1.2.0-6
- rebuild so that we depend on the proper version of libpq.so (#160917)
- change names of database providers from gda-xxx to libgda-xxx (#160917)
* Wed Mar 2 2005 Caolan McNamara <caolanm@redhat.com> 1:1.2.0-5
- rebuild with gcc4
* Fri Feb 11 2005 Caolan McNamara <caolanm@redhat.com> 1:1.2.0-4
- well, that was moronic
* Wed Feb 10 2005 Caolan McNamara <caolanm@redhat.com> 1:1.2.0-3
- bandaid
* Wed Feb 9 2005 Jeremy Katz <katzj@redhat.com> - 1:1.2.0-2
- rebuild to try to fix broken dep
* Fri Feb 4 2005 Caolan McNamara <caolanm@redhat.com> 1:1.2.0-1
- bump to latest version
- drop integrated break warning patch
- update configure patch
* Wed Jan 12 2005 Tim Waugh <twaugh@redhat.com> 1:1.0.4-5
- Rebuilt for new readline.
* Sat Oct 30 2004 Caolan McNamara <caolanm@redhat.com> 1:1.0.4-4
- Use mysqlclient10
* Fri Oct 8 2004 Caolan McNamara <caolanm@redhat.com> 1:1.0.4-3
- #rh135043# Extra BuildRequires
* Thu Sep 9 2004 Bill Nottingham <notting@redhat.com> 1:1.0.4-2
- %%defattr
* Thu Aug 12 2004 Caolan McNamara <caolanm@redhat.com> 1:1.0.4-1
- Initial Red Hat import
- patch for missing break statement
- fixup devel package requirement pickiness
- autoconf patch to pick up correct mysql path from mysql_config (e.g. x64)
- autoconf patch to just look in the normal place for postgres first
* Tue Mar 11 2003 David Hollis <dhollis@davehollis.com>
- Fix --with-tds & --without-tds to match what configure wants
* Tue Jan 28 2003 Yanko Kaneti <yaneti@declera.com>
- Remove the idl path
- Include gda-config man page
- add --without-* for disabled providers
- package and use the omf/scrollkeeper bits
* Tue Dec 31 2002 David Hollis <dhollis@davehollis.com>
- Added sqlite-devel buildreq
- Include gda-config-tool man page
* Mon Aug 19 2002 Ben Liblit <liblit@acm.org>
- Fixed version number substitutions
- Removed some explicit "Requires:" prerequisites that RPM will figure
out on its own. Removed explicit dependency on older MySQL client
libraries
- Required that the ODBC development package be installed if we are
building the ODBC provider
- Created distinct subpackages for each provider, conditional on that
provider actually being enabled; some of these will need to be
updated as the family of available providers changes
- Updated files list to match what "make install" actually installs
- Added URL tag pointing to GNOME-DB project's web site
* Tue Feb 26 2002 Chris Chabot <chabotc@reviewboard.com>
- Added defines and configure flags for all supported DB types
* Mon Feb 25 2002 Chris Chabot <chabotc@reviewboard.com>
- Cleaned up formatting
- Added Requirements
- Added defines for postgres, mysql, odbc support
* Thu Feb 21 2002 Chris Chabot <chabotc@reviewboard.com>
- Initial spec file