Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
libdbi-drivers
> libdbi-drivers.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File libdbi-drivers.spec of Package libdbi-drivers
%define libname libdbi %define pkgname libdbi-drivers %define version 0.8.3 %define release 1 Name: %{pkgname} Version: %{version} Release: %{release} Summary: Database Independent Abstraction Layer for C License: GPLv2 Url: http://libdbi-drivers.sourceforge.net/ Group: Development/Libraries Source0: %{pkgname}-%{version}-1.tar.bz2 Patch0: %{pkgname}-%{version}-oracle-build-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: openjade sgmltool texlive docbook-dsssl-stylesheets BuildRequires: %{libname}-devel BuildRequires: mysql-devel postgresql-devel %if 0%{?suse_version} > 1030 BuildRequires: sqlite3-devel %else buildRequires: sqlite-devel >= 3.0 %endif BuildRequires: oracle-instantclient-devel oracle-instantclient-config %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. In order to utilize the libdbi framework, you need to install drivers for a particular type of database. The drivers officially supported by libdbi are split off into the libdbi-drivers project. The current version of libdbi (0.8.3) is supposed to work with any 0.8.x release of libdbi-drivers. Currently the following database engines are supported: * Firebird/Interbase * FreeTDS (provides access to MS SQL Server and Sybase) * MySQL * PostgreSQL * SQLite/SQLite3 The following database engines are in preparation: * Ingres * mSQL * Oracle %package -n %{libname}-mysql Summary: MySQL driver for libdbi Group: Development/Libraries %description -n %{libname}-mysql MySQL driver for libdbi. %package -n %{libname}-pgsql Summary: PostgreSQL driver for libdbi Group: Development/Libraries %description -n %{libname}-pgsql PostgreSQL driver for libdbi. %package -n %{libname}-sqlite3 Summary: SQLite3 driver for libdbi Group: Development/Libraries %description -n %{libname}-sqlite3 SQLite3 driver for libdbi. %package -n %{libname}-oracle Summary: Oracle driver for libdbi Group: Development/Libraries %description -n %{libname}-oracle Oracle driver for libdbi. %prep %setup -n %{pkgname}-%{version}-1 %patch0 -p1 %build %define ORAINCDIR %(oracle-instantclient-config --cflags | sed -e s@"-I"@@g) %define ORALIBDIR %(oracle-instantclient-config --libs | awk '{print $1}' | sed -e s@"-L"@@g) CFLAGS="$RPM_OPT_FLAGS" \ ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --localstatedir=%{_var} \ --with-mysql \ --with-mysql-incdir=%{_includedir}/mysql \ --with-mysql-libdir=%{_libdir} \ --with-pgsql \ --with-pgsql-incdir=%{_includedir}/pgsql \ --with-pgsql-libdir=%{_libdir} \ --with-sqlite3 \ --with-sqlite3-incdir=%{_includedir} \ --with-sqlite3-libdir=%{_libdir} \ --with-oracle \ --with-oracle-incdir=%{ORAINCDIR} \ --with-oracle-libdir=%{ORALIBDIR} \ --with-dbi-incdir=%{_includedir}/dbi \ --with-dbi-libdir=%{_libdir} %{__make} %install %{__make} DESTDIR=%{buildroot} install mkdir guides mv -f %{buildroot}/usr/share/doc/%{pkgname}-%{version}-1/dbd_mysql* guides/ mv -f %{buildroot}/usr/share/doc/%{pkgname}-%{version}-1/dbd_pgsql* guides/ mv -f %{buildroot}/usr/share/doc/%{pkgname}-%{version}-1/dbd_sqlite3* guides/ mv -f %{buildroot}/usr/share/doc/%{pkgname}-%{version}-1/dbd_oracle* guides/ %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc README %doc guides/ %dir %{_libdir}/dbd %files -n %{libname}-mysql %defattr(-,root,root) %{_libdir}/dbd/libdbdmysql.* %files -n %{libname}-pgsql %defattr(-,root,root) %{_libdir}/dbd/libdbdpgsql.* %files -n %{libname}-sqlite3 %defattr(-,root,root) %{_libdir}/dbd/libdbdsqlite3.* %files -n %{libname}-oracle %defattr(-,root,root) %{_libdir}/dbd/libdbdoracle.* %changelog * Sun Jul 19 2009 Carsten Schoene <cs@linux-administrator.com> - 0.8.3-1 - initial build