Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > f730d9fe452de65ccf584948ece9d45c > files > 1

compat-libgda-3.1.2-4.fc14.src.rpm

# Default provider build options (MySQL, Postgres, unixODBC, LDAP, FreeTDS)
#
# Package build options:
# --with db2
# --with oracle
# --with sybase
# --without ldap
# --without mdb
# --without mysql
# --without odbc
# --without postgres
# --without tds
# --without xbase
# 

%define           IBMDB2   0
%define           ORACLE   0
%define           SYBASE   0
%define           LDAP     0
%define           MDB      0
%define           MYSQL    0
%define           ODBC     0
%define           POSTGRES 0
%define           FREETDS  0
%define           XBASE    0

%{?_with_db2:%define IBMDB2     1}
%{?_with_oracle:%define ORACLE  1}
%{?_with_sybase:%define SYBASE  1}
%{?_without_ldap:%define LDAP   0}
%{?_without_mdb:%define MDB     0}
%{?_without_mysql:%define MYSQL 0}
%{?_without_odbc:%define ODBC   0}
%{?_without_postgres:%define POSTGRES 0}
%{?_without_tds:%define FREETDS 0}
%{?_without_xbase:%define XBASE 0}

Name:             compat-libgda
Version:          3.1.2
Release:          4%{?dist}
Summary:          Library for writing gnome database programs
Group:            System Environment/Libraries
License:          LGPLv2+
URL:              http://www.gnome-db.org/
Source:           http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.1/libgda-%{version}.tar.bz2
Patch1:           libgda-3.0.0-man.patch
Patch2:           libgda-3.1.2-new-freetds.patch
Patch3:           libgda-3.1.2-lib64.patch
Patch4:           libgda-3.1.2-bdbmakefile.patch
BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:    pkgconfig >= 0.8
BuildRequires:    glib2-devel >= 2.0.0
BuildRequires:    libxslt-devel >= 1.0.9
BuildRequires:    sqlite-devel >= 3.4.0
BuildRequires:    libxml2-devel readline-devel db4-devel gamin-devel
BuildRequires:    gtk-doc scrollkeeper gettext flex bison perl(XML::Parser)
# note we do not provide these, they no longer exist
Obsoletes:        libgda-sharp < 1:%{version}-%{release}
Obsoletes:        libgda-sharp-devel < 1:%{version}-%{release}

%if %{FREETDS}
BuildRequires:    freetds-devel >= 0.82-2
%endif

%if %{MYSQL}
BuildRequires:    mysql-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

%if %{XBASE}
BuildRequires:    xbase-devel
%endif

%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 pkgconfig
Requires:         %{name} = %{version}-%{release}

%description devel
This package contains the header files and libraries needed to write
or compile programs that use libgda.


%package sqlite
Summary:          SQLite provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-sqlite < 1:%{version}-%{release}
Provides:         compat-gda-sqlite = %{version}-%{release}
%description sqlite
This package includes the libgda SQLite provider.

%package sqlite-devel
Summary:          SQLite provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-sqlite = %{version}-%{release}
%description sqlite-devel
This package includes the pkgconfig file for the libgda SQLite provider.


%if %{FREETDS}
%package freetds
Summary:          FreeTDS provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-freetds < 1:%{version}-%{release}
Provides:         compat-gda-freetds = %{version}-%{release}
%description freetds
This package includes the libgda FreeTDS provider.

%package freetds-devel
Summary:          FreeTDS provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-freetds = %{version}-%{release}
%description freetds-devel
This package includes the pkgconfig file for the libgda FreeTDS provider.
%endif

%if %{IBMDB2}
%package ibmdb2
Summary:          IBM DB2 provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-ibmdb2 < 1:%{version}-%{release}
Provides:         compat-gda-ibmdb2 = %{version}-%{release}
%description ibmdb2
This package includes the libgda IBM DB2 provider.

%package ibmdb2-devel
Summary:          IBM DB2 provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-ibmdb2 = %{version}-%{release}
%description ibmdb2-devel
This package includes the pkgconfig file for the libgda IBM DB2 provider.
%endif

%if %{MYSQL}
%package mysql
Summary:          MySQL provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-mysql < 1:%{version}-%{release}
Provides:         compat-gda-mysql = %{version}-%{release}
%description mysql
This package includes the libgda MySQL provider.

%package mysql-devel
Summary:          MySQL provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-mysql = %{version}-%{release}
%description mysql-devel
This package includes the pkgconfig file for the libgda MySQL provider.
%endif

%if %{ODBC}
%package odbc
Summary:          ODBC provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-odbc < 1:%{version}-%{release}
Provides:         compat-gda-odbc = %{version}-%{release}
%description odbc
This package includes the libgda ODBC provider.

%package odbc-devel
Summary:          ODBC provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-odbc = %{version}-%{release}
%description odbc-devel
This package includes the pkgconfig file for the libgda ODBC provider.
%endif

%if %{ORACLE}
%package oracle
Summary:          Oracle provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-oracle < 1:%{version}-%{release}
Provides:         compat-gda-oracle = %{version}-%{release}
%description oracle
This package includes the libgda Oracle provider.

%package oracle-devel
Summary:          Oracle provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-oracle = %{version}-%{release}
%description oracle-devel
This package includes the pkgconfig file for the libgda Oracle provider.
%endif

%if %{POSTGRES}
%package postgres
Summary:          PostgreSQL provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-postgres < 1:%{version}-%{release}
Provides:         compat-gda-postgres = %{version}-%{release}
%description postgres
This package includes the libgda PostgreSQL provider.

%package postgres-devel
Summary:          PostgreSQL provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-postgres = %{version}-%{release}
%description postgres-devel
This package includes the pkgconfig file for the libgda PostgreSQL provider.
%endif

%if %{SYBASE}
%package sybase
Summary:          Sybase provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-sybase < 1:%{version}-%{release}
Provides:         compat-gda-sybase = %{version}-%{release}
%description sybase
This package includes the libgda Sybase provider.

%package sybase-devel
Summary:          Sybase provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-sybase = %{version}-%{release}
%description sybase-devel
This package includes the pkgconfig file for the libgda Sybase provider.
%endif

%if %{MDB}
%package mdb
Summary:          MDB provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-mdb < 1:%{version}-%{release}
Provides:         compat-gda-mdb = %{version}-%{release}
%description mdb
This package includes the libgda MDB provider.

%package mdb-devel
Summary:          MDB provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-mdb = %{version}-%{release}
%description mdb-devel
This package includes the pkgconfig file for the libgda MDB provider.
%endif
		
%if %{LDAP}
%package ldap
Summary:          LDAP provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
Obsoletes:        gda-ldap < 1:%{version}-%{release}
Provides:         compat-gda-ldap = %{version}-%{release}
%description ldap
This package includes the libgda LDAP provider.

%package ldap-devel
Summary:          LDAP provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         pkgconfig
Requires:         %{name}-ldap = %{version}-%{release}
%description ldap-devel
This package includes the pkgconfig file for the libgda LDAP provider.
%endif

%if %{XBASE}
%package xbase
Summary:          XBASE provider for libgda
Group:            System Environment/Libraries
Requires:         %{name} = %{version}-%{release}
%description xbase
This package includes the GDA XBASE provider.

%package xbase-devel
Summary:          XBASE provider for libgda pkgconfig file
Group:            Development/Libraries
Requires:         %{name}-xbase = %{version}-%{release}, pkgconfig
%description xbase-devel
This package includes the pkgconfig file for the libgda XBASE provider.
%endif


%prep
%setup -q -n libgda-%{version}
%patch1 -p1 -b .man
%patch2 -p1
%patch3 -p1 -b .lib64
%patch4 -p0
# fix ppc64 postgres detection
sed -i 's/x86_64\* | sparc64\*) lib="lib64";;/x86_64\* | sparc64\* | powerpc64\*) lib="lib64";;/' \
  configure configure.in
# stop autoxxx rerunning because of our patches above
touch aclocal.m4
touch `find -name Makefile.in`


%build
CONFIG="--disable-static --disable-dependency-tracking"

%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

%if %{XBASE}
CONFIG="$CONFIG --with-xbase"
%else
CONFIG="$CONFIG --without-xbase"
%endif

%configure $CONFIG
# Don't use rpath!
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# work around gda-report-test-3.0 linking failing because of the disabling of
# rpath above
export LD_LIBRARY_PATH=`pwd`/libsql/.libs
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

# Cleanup unnecessary, unpackaged files
rm $RPM_BUILD_ROOT/%{_libdir}/libgda-3.0/providers/*.la
rm $RPM_BUILD_ROOT/%{_libdir}/*.la
rm $RPM_BUILD_ROOT/%{_sysconfdir}/libgda-3.0/sales_test.db

%find_lang libgda-3.0


%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 $RPM_BUILD_ROOT


%files -f libgda-3.0.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README NEWS
%config(noreplace) %{_sysconfdir}/libgda-3.0
%{_bindir}/*
%{_datadir}/libgda-3.0
%{_libdir}/*.so.*
%dir %{_libdir}/libgda-3.0
%dir %{_libdir}/libgda-3.0/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-3.0/providers/libgda-bdb.so
%{_mandir}/man1/*
%{_mandir}/man5/*

%files devel
%defattr(-,root,root,-)
%doc %{_datadir}/gtk-doc/html/libgda-3.0
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/libgda-3.0.pc
%{_libdir}/pkgconfig/libgda-bdb-3.0.pc
%{_libdir}/pkgconfig/libgda-report-3.0.pc
%{_libdir}/pkgconfig/libgda-xslt-3.0.pc

%files sqlite
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-sqlite.so

%files sqlite-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-sqlite-3.0.pc

%if %{FREETDS}
%files freetds
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-freetds.so

%files freetds-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-freetds-3.0.pc
%endif

%if %{IBMDB2}
%files ibmdb2
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-ibmdb2.so

%files ibmdb2-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-imdb2-3.0.pc
%endif

%if %{MYSQL}
%files mysql
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-mysql.so

%files mysql-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-mysql-3.0.pc
%endif

%if %{ODBC}
%files odbc
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-odbc.so

%files odbc-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-odbc-3.0.pc
%endif

%if %{ORACLE}
%files oracle
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-oracle.so

%files oracle-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-oracle-3.0.pc
%endif

%if %{POSTGRES}
%files postgres
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-postgres.so

%files postgres-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-postgres-3.0.pc
%endif

%if %{SYBASE}
%files sybase
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-sybase.so

%files sybase-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-sybase-3.0.pc
%endif

%if %{MDB}
%files mdb
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-mdb.so

%files mdb-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-mdb-3.0.pc
%endif

%if %{LDAP}
%files ldap
%defattr(-,root,root,-)
%{_libdir}/libgda-3.0/providers/libgda-ldap.so

%files ldap-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-ldap-3.0.pc
%endif

%if %{XBASE}
%files xbase
%defattr(-,root,root)
%{_libdir}/libgda-3.0/providers/libgda-xbase.so

%files xbase-devel
%defattr(-,root,root,-)
%{_libdir}/pkgconfig/libgda-xbase-3.0.pc
%endif


%changelog
* Wed Jun 2 2010 Nick Bebout <nb@fedoraproject.org> - 3.1.2-4
- Fix FTBFS

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Jan 21 2009 Denis Leroy <denis@poolshark.org> - 3.1.2-1
- Resurrected for 3.0 API, with libgda moving on to 4.0 API

* Tue Jan  9 2007 Denis Leroy <denis@poolshark.org> - 1.2.4-1
- Update to libgda 1.2.4

* Fri Dec  8 2006 Denis Leroy <denis@poolshark.org> - 1.2.3-5
- Rebuild with libpq.so.5

* Mon Sep 11 2006 Denis Leroy <denis@poolshark.org> - 1.2.3-4
- Added intltool BR

* Mon Sep 11 2006 Tom "spot" Callaway <tcallawa@redhat.com> - 1.2.3-3
- add xbase
- enable everything we can by default (they're subpackages)
- make sure all the libs get stripped into debuginfo
- use URL to Source0
- use correct license tags

* Mon Jul 24 2006 Denis Leroy <denis@poolshark.org> - 1.2.3-2
- Fixed compat configuration directory

* Wed Jul  5 2006 Denis Leroy <denis@poolshark.org> - 1.2.3-1
- First draft, based on FC-4 libgda.spec