Summary: Database Independent Abstraction Layer for C
Name: libdbi
Version: 0.6.5
Release: 9
Group: Development/Libraries
License: LGPL
URL: http://libdbi.sourceforge.net/
Source: http://prdownloads.sourceforge.net/libdbi/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
libdbi implements a database-independent abstraction layer in C, similar to the
DBI/DBD layer in Perl. Writing one generic set of code, programmers can
leverage the power of multiple databases and multiple simultaneous database
connections by using this framework.
%package devel
Summary: Development files for libdbi (Database Independent Abstraction Layer for C)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The libdbi-devel package contains the header files and documentation
needed to develop applications with libdbi.
%package dbd-mysql
Summary: MySQL plugin for libdbi
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: mysql-devel
%description dbd-mysql
This plugin provides connectivity to MySQL database servers through the
libdbi database independent abstraction layer. Switching a program's plugin
does not require recompilation or rewriting source code.
%package dbd-pgsql
Summary: PostgreSQL plugin for libdbi
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
BuildRequires: postgresql-devel, krb5-devel, openssl-devel
%description dbd-pgsql
This plugin provides connectivity to PostgreSQL database servers through the
libdbi database independent abstraction layer. Switching a program's plugin
does not require recompilation or rewriting source code.
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%prep
%setup -q -n %{name}-%{version}
%build
# configure is broken, must pass both --with-*sql-libdir _AND_
# --with-*sql-incdir in order for --with-*sql-libdir to be used
%configure --with-mysql --with-pgsql --with-mysql-libdir=%{_libdir}/mysql \
--with-mysql-incdir=%{_includedir} \
--with-pgsql-libdir=%{_libdir} \
--with-pgsql-incdir=%{_includedir}
make %{?_smp_mflags}
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
#makeinstall plugindir=$RPM_BUILD_ROOT%{_libdir}/dbd
make DESTDIR=$RPM_BUILD_ROOT install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS
%doc ChangeLog
%doc COPYING
%doc README
%doc README.drivers
%{_libdir}/libdbi.so.*
%files devel
%defattr(-,root,root)
%doc README
%doc TODO
%doc doc/programmers-guide.pdf
%doc doc/programmers-guide/
%doc doc/driver-guide.pdf
%doc doc/driver-guide/
/usr/include/dbi
/usr/include/dbi/*
%{_libdir}/libdbi.a
%{_libdir}/libdbi.la
%{_libdir}/libdbi.so
%files dbd-mysql
%defattr(-,root,root)
%{_libdir}/dbd/libmysql.so
%{_libdir}/dbd/libmysql.la
%{_libdir}/dbd/libmysql.a
%files dbd-pgsql
%defattr(-,root,root)
%{_libdir}/dbd/libpgsql.so
%{_libdir}/dbd/libpgsql.la
%{_libdir}/dbd/libpgsql.a
%changelog
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Thu Jul 03 2003 Patrick Macdonald <patrickm@redhat.com> 0.6.5-7
- rebuilt
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Jan 24 2003 Tom Lane <tgl@redhat.com>
- /usr/include/dbi should be owned
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
* Sun Dec 01 2002 Elliot Lee <sopwith@redhat.com> 0.6.5-3
- multilibify
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Tue Jun 18 2002 Trond Eivind Glomsrød <teg@redhat.com> 0.6.5-1
- 0.6.5
* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Wed Mar 13 2002 Trond Eivind Glomsrød <teg@redhat.com> 0.6.4-2
- 0.6.4
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Thu Sep 20 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.6.2-1
- Sanitize, prepare for distribution
* Sat Aug 4 2001 David Parker <david@neongoat.com>
- initial spec file created