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
|
|
|
#
|
2013-09-12 18:19:26 +02:00
|
|
|
# Copyright (c) 2013 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
|
|
|
|
2012-10-03 07:57:54 +02:00
|
|
|
%define libdbi_sover 1
|
2013-09-12 18:19:26 +02:00
|
|
|
Name: libdbi-drivers
|
|
|
|
Version: 0.9.0
|
|
|
|
Release: 0
|
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+
|
2013-09-12 18:19:26 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Url: http://libdbi-drivers.sf.net/
|
2011-01-25 13:22:58 +01:00
|
|
|
|
2013-09-12 18:19:26 +02:00
|
|
|
Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz
|
|
|
|
Patch1: sqlite3.diff
|
|
|
|
Patch2: badcode.diff
|
|
|
|
Patch3: libdl.diff
|
2011-01-25 13:22:58 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-09-12 18:19:26 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2012-01-19 10:35:09 +01:00
|
|
|
BuildRequires: gettext
|
|
|
|
BuildRequires: libdbi-devel
|
2013-09-12 18:19:26 +02:00
|
|
|
BuildRequires: libtool
|
2012-01-19 10:35:09 +01:00
|
|
|
BuildRequires: mysql-devel
|
|
|
|
BuildRequires: openjade
|
|
|
|
BuildRequires: postgresql-devel
|
2013-09-12 18:19:26 +02:00
|
|
|
BuildRequires: sqlite3-devel
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description
|
2013-09-12 18:19:26 +02:00
|
|
|
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.
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%package dbd-mysql
|
|
|
|
Summary: MySQL driver for libdbi
|
2013-09-12 18:19:26 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Requires: libdbi%{libdbi_sover} = %version
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-mysql
|
2013-09-12 18:19:26 +02:00
|
|
|
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.
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%package dbd-pgsql
|
|
|
|
Summary: PostgreSQL driver for libdbi
|
2013-09-12 18:19:26 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Requires: libdbi%{libdbi_sover} = %version
|
2012-10-03 07:57:54 +02:00
|
|
|
Requires: postgresql >= 7.0.3
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%description dbd-pgsql
|
2013-09-12 18:19:26 +02:00
|
|
|
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.
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%package dbd-sqlite3
|
|
|
|
Summary: SQLite3 driver for libdbi
|
2013-09-12 18:19:26 +02:00
|
|
|
Group: System/Libraries
|
|
|
|
Requires: libdbi%{libdbi_sover} = %version
|
2012-10-03 07:57:54 +02:00
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
2013-09-12 18:19:26 +02:00
|
|
|
%setup -q
|
|
|
|
%patch -P 1 -P 2 -P 3 -p1
|
|
|
|
|
|
|
|
# Fake the __DATE__ so we do not needelessly rebuild
|
|
|
|
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
|
|
|
|
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" drivers/*/*.c
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%build
|
2013-09-12 18:19:26 +02:00
|
|
|
autoreconf -fi
|
2012-02-14 19:02:16 +01:00
|
|
|
%configure \
|
2011-01-25 13:22:58 +01:00
|
|
|
--with-mysql \
|
|
|
|
--with-pgsql \
|
|
|
|
--with-sqlite3 \
|
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
|
2013-09-12 18:19:26 +02:00
|
|
|
make %{?_smp_mflags}
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2013-09-12 18:19:26 +02:00
|
|
|
find "%buildroot" -type f -name "*.la" -delete
|
|
|
|
|
|
|
|
%check
|
|
|
|
make check || :
|
2011-01-25 13:22:58 +01:00
|
|
|
|
|
|
|
%files dbd-mysql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdmysql.so
|
|
|
|
|
|
|
|
%files dbd-pgsql
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdpgsql.so
|
|
|
|
|
|
|
|
%files dbd-sqlite3
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_libdir}/dbd
|
|
|
|
%{_libdir}/dbd/libdbdsqlite3.so
|
|
|
|
|
|
|
|
%changelog
|