2011-01-25 13:22:58 +01:00
|
|
|
#
|
2011-01-25 13:23:18 +01:00
|
|
|
# spec file for package libdbi-drivers
|
2011-01-25 13:22:58 +01:00
|
|
|
#
|
2012-01-19 10:35:09 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-01-25 13:22:58 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-02-14 19:02:16 +01:00
|
|
|
|
2011-01-25 13:22:58 +01:00
|
|
|
%define special -1
|
|
|
|
|
2012-10-03 07:57:54 +02:00
|
|
|
%define libdbi_ver 0.8.4
|
|
|
|
%define libdbi_sover 1
|
|
|
|
|
2011-01-25 13:22:58 +01:00
|
|
|
Summary: Database drivers for libdbi
|
2012-01-19 10:35:09 +01:00
|
|
|
License: LGPL-2.1+
|
|
|
|
Group: Development/Libraries
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
Name: libdbi-drivers
|
|
|
|
Version: 0.8.3
|
2012-01-19 10:35:09 +01:00
|
|
|
Release: 0
|
2011-01-25 13:22:58 +01:00
|
|
|
Url: http://libdbi-drivers.sourceforge.net/
|
|
|
|
Source: %{name}-%{version}%{special}.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2012-01-19 10:35:09 +01:00
|
|
|
BuildRequires: gettext
|
|
|
|
BuildRequires: libdbi-devel
|
|
|
|
BuildRequires: mysql-devel
|
|
|
|
BuildRequires: openjade
|
|
|
|
BuildRequires: postgresql-devel
|
|
|
|
BuildRequires: sqlite-devel
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
libdbi implements a database-independent abstraction layer in C, similar to the
|
|
|
|
DBI/DBD layer in Perl. Drivers are distributed separately from the library
|
|
|
|
itself.
|
|
|
|
|
|
|
|
%package dbd-mysql
|
|
|
|
Summary: MySQL driver for libdbi
|
|
|
|
Group: Development/Libraries
|
2012-10-03 07:57:54 +02:00
|
|
|
Requires: libdbi%{libdbi_sover} = %{libdbi_ver}
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-mysql
|
|
|
|
This driver provides connectivity to MySQL database servers through the
|
|
|
|
libdbi database independent abstraction layer. Switching a program's driver
|
|
|
|
does not require recompilation or rewriting source code.
|
|
|
|
|
|
|
|
%package dbd-pgsql
|
|
|
|
Summary: PostgreSQL driver for libdbi
|
|
|
|
Group: Development/Libraries
|
2012-10-03 07:57:54 +02:00
|
|
|
Requires: libdbi%{libdbi_sover} = %{libdbi_ver}
|
|
|
|
Requires: postgresql >= 7.0.3
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-pgsql
|
|
|
|
This driver provides connectivity to PostgreSQL database servers through the
|
|
|
|
libdbi database independent abstraction layer. Switching a program's driver
|
|
|
|
does not require recompilation or rewriting source code.
|
|
|
|
|
|
|
|
%if 0%{?suse_version} == 910
|
|
|
|
# SLES 9
|
|
|
|
|
|
|
|
%package dbd-sqlite
|
|
|
|
Summary: SQLite driver for libdbi
|
|
|
|
Group: Development/Libraries
|
2012-10-03 07:57:54 +02:00
|
|
|
Requires: libdbi%{libdbi_sover} = %{libdbi_ver}
|
|
|
|
Requires: sqlite
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-sqlite
|
|
|
|
This driver provides connectivity to SQLite database servers through the
|
|
|
|
libdbi database independent abstraction layer. Switching a program's driver
|
|
|
|
does not require recompilation or rewriting source code.
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%package dbd-sqlite3
|
|
|
|
|
|
|
|
Summary: SQLite3 driver for libdbi
|
|
|
|
Group: Development/Libraries
|
2012-10-03 07:57:54 +02:00
|
|
|
Requires: libdbi%{libdbi_sover} = %{libdbi_ver}
|
|
|
|
Requires: sqlite
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-sqlite3
|
|
|
|
This driver provides connectivity to SQLite database servers through the
|
|
|
|
libdbi database independent abstraction layer. Switching a program's driver
|
|
|
|
does not require recompilation or rewriting source code.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}%{special}
|
|
|
|
|
|
|
|
%build
|
2012-02-14 19:02:16 +01:00
|
|
|
%configure \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-mysql \
|
2012-02-14 19:02:16 +01:00
|
|
|
--with-mysql-incdir=%_includedir/mysql \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-mysql-libdir=%{_libdir}/mysql \
|
|
|
|
--with-pgsql \
|
2012-02-14 19:02:16 +01:00
|
|
|
--with-pgsql-incdir=%_includedir/pgsql \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-pgsql-libdir=%{_libdir} \
|
|
|
|
%if 0%{?suse_version} == 910
|
|
|
|
--with-sqlite \
|
2012-02-14 19:02:16 +01:00
|
|
|
--with-sqlite-incdir=%_includedir \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-sqlite-libdir=%{_libdir} \
|
|
|
|
%else
|
|
|
|
--with-sqlite3 \
|
2012-02-14 19:02:16 +01:00
|
|
|
--with-sqlite3-incdir=%_includedir \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-sqlite3-libdir=%{_libdir} \
|
|
|
|
%endif
|
2012-02-14 19:02:16 +01:00
|
|
|
--with-dbi-incdir=%_includedir/dbi \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-dbi-libdir=%{_libdir} \
|
|
|
|
--disable-static \
|
|
|
|
--disable-docs
|
2012-02-14 19:02:16 +01:00
|
|
|
# Broken upstream code overrides CFLAGS !:-[. Since AM_CFLAGS is unused in
|
|
|
|
# the source, we can hack there to get our flags in...
|
|
|
|
make %{?_smp_mflags} AM_CFLAGS="%optflags"
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
|
|
|
|
%files dbd-mysql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdmysql.so
|
|
|
|
%{_libdir}/dbd/libdbdmysql.la
|
|
|
|
|
|
|
|
%files dbd-pgsql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdpgsql.so
|
|
|
|
%{_libdir}/dbd/libdbdpgsql.la
|
|
|
|
|
|
|
|
%if 0%{?suse_version} == 910
|
|
|
|
%defattr(-,root,root)
|
|
|
|
# SLES 9
|
|
|
|
|
|
|
|
%files dbd-sqlite
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdsqlite.so
|
|
|
|
%{_libdir}/dbd/libdbdsqlite.la
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%files dbd-sqlite3
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdsqlite3.so
|
|
|
|
%{_libdir}/dbd/libdbdsqlite3.la
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%changelog
|