2 # - add support for ingres, msql, oracle
3 # - fix doc bcond build
6 %bcond_without firebird # don't build Firebird driver
7 %bcond_without freetds # don't build FreeTDS driver
8 %bcond_without mysql # don't build MySQL driver
9 %bcond_without pgsql # don't build PostgreSQL driver
10 %bcond_without sqlite # don't build sqlite driver
11 %bcond_without sqlite3 # don't build sqlite3 driver
12 %bcond_with doc # don't build documentation
15 Summary: Database Independent Abstraction Layer for C
16 Summary(pl.UTF-8): Warstwa DBI dla C
18 %define _snap 20090420
23 #Source0: http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz
24 Source0: %{name}-%{_snap}.tar.gz
25 # Source0-md5: c0a2dae1a28e1815353823c3fe09917f
26 Patch0: %{name}-destdir.patch
27 Patch1: %{name}-docs_acfix.patch
28 Patch2: %{name}-sqlite3_libs.patch
29 URL: http://libdbi-drivers.sourceforge.net/
30 %{?with_firebird:BuildRequires: Firebird-devel}
31 BuildRequires: autoconf
32 BuildRequires: automake
33 %{?with_freetds:BuildRequires: freetds-devel}
34 BuildRequires: libtool
35 BuildRequires: libdbi-devel >= %{dbiver}
36 %{?with_mysql:BuildRequires: mysql-devel}
37 %{?with_pgsql:BuildRequires: postgresql-devel}
38 %{?with_sqlite:BuildRequires: sqlite-devel}
39 %{?with_sqlite3:BuildRequires: sqlite3-devel}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 libdbi implements a database-independent abstraction layer in C,
44 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
45 programmers can leverage the power of multiple databases and multiple
46 simultaneous database connections by using this framework.
48 %description -l pl.UTF-8
49 libdbi jest implementacją w C warstwy abstrakcyjnej niezależnej od
50 bazy danych, podobnej do warstwy DBI/DBD w Perlu. Używając tego
51 środowiska programista może za pomocą jednego, wspólnego kodu
52 odwoływać się do wielu różnych baz danych, także jednocześnie.
55 Summary: Firebird plugin for libdbi
56 Summary(pl.UTF-8): Wtyczka Firebird dla libdbi
58 Requires: libdbi >= %{dbiver}
59 Provides: libdbi-dbd = %{version}-%{release}
62 This plugin provides connectivity to Firebird database servers through
63 the libdbi database independent abstraction layer. Switching a
64 program's plugin does not require recompilation or rewriting source
67 %description firebird -l pl.UTF-8
68 Ta wtyczka daje możliwość łączenia się z serwerami Firebird poprzez
69 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
70 zmiany źródeł programu.
73 Summary: FreeTDS plugin for libdbi
74 Summary(pl.UTF-8): Wtyczka FreeTDS dla libdbi
76 Requires: libdbi >= %{dbiver}
77 Provides: libdbi-dbd = %{version}-%{release}
80 This plugin provides connectivity to MS SQL/Sybase database servers
81 through the libdbi database independent abstraction layer. Switching a
82 program's plugin does not require recompilation or rewriting source
85 %description freetds -l pl.UTF-8
86 Ta wtyczka daje możliwość łączenia się z serwerami MS SQL/Sybase
87 poprzez bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga
88 rekompilacji ani zmiany źródeł programu.
91 Summary: MySQL plugin for libdbi
92 Summary(pl.UTF-8): Wtyczka MySQL dla libdbi
94 Requires: libdbi >= %{dbiver}
95 Provides: libdbi-dbd = %{version}-%{release}
96 Obsoletes: libdbi-dbd-mysql
99 This plugin provides connectivity to MySQL database servers through
100 the libdbi database independent abstraction layer. Switching a
101 program's plugin does not require recompilation or rewriting source
104 %description mysql -l pl.UTF-8
105 Ta wtyczka daje możliwość łączenia się z serwerami MySQL poprzez
106 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
107 zmiany źródeł programu.
110 Summary: PostgreSQL plugin for libdbi
111 Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi
113 Requires: libdbi >= %{dbiver}
114 Provides: libdbi-dbd = %{version}-%{release}
115 Obsoletes: libdbi-dbd-pgsql
118 This plugin provides connectivity to PostgreSQL database servers
119 through the libdbi database independent abstraction layer. Switching a
120 program's plugin does not require recompilation or rewriting source
123 %description pgsql -l pl.UTF-8
124 Ta wtyczka daje możliwość łączenia się z serwerami PostgreSQL poprzez
125 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
126 zmiany źródeł programu.
129 Summary: SQLite plugin for libdbi
130 Summary(pl.UTF-8): Wtyczka SQLite dla libdbi
132 Requires: libdbi >= %{dbiver}
133 Provides: libdbi-dbd = %{version}-%{release}
136 This plugin provides connectivity to SQLite engine
137 through the libdbi database independent abstraction layer. Switching a
138 program's plugin does not require recompilation or rewriting source
141 %description sqlite -l pl.UTF-8
142 Ta wtyczka daje możliwość łączenia się z silnikiem SQLite poprzez
143 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
144 zmiany źródeł programu.
147 Summary: SQLite3 plugin for libdbi
148 Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi
150 Requires: libdbi >= %{dbiver}
151 Provides: libdbi-dbd = %{version}-%{release}
154 This plugin provides connectivity to SQLite3 engine through the libdbi
155 database independent abstraction layer. Switching a program's plugin
156 does not require recompilation or rewriting source code.
158 %description sqlite3 -l pl.UTF-8
159 Ta wtyczka daje możliwość łączenia się z silnikiem SQLite3 poprzez
160 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
161 zmiany źródeł programu.
177 %{!?with_doc:--disable-docs} \
180 --with-firebird-libdir=%{_libdir} \
181 --with-firebird-incdir=%{_includedir} \
185 --with-freetds-libdir=%{_libdir} \
186 --with-freetds-incdir=%{_includedir} \
190 --with-mysql-libdir=%{_libdir} \
191 --with-mysql-incdir=%{_includedir} \
195 --with-pgsql-libdir=%{_libdir} \
196 --with-pgsql-incdir=%{_includedir} \
200 --with-sqlite-libdir=%{_libdir} \
201 --with-sqlite-incdir=%{_includedir} \
205 --with-sqlite3-libdir=%{_libdir} \
206 --with-sqlite3-incdir=%{_includedir} \
208 --with-dbi-incdir=%{_includedir} \
209 --with-dbi-libdir=%{_libdir}
213 rm -rf $RPM_BUILD_ROOT
214 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
217 DESTDIR=$RPM_BUILD_ROOT
219 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
222 rm -rf $RPM_BUILD_ROOT
225 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
229 %defattr(644,root,root,755)
230 %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}}
231 %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so
236 %defattr(644,root,root,755)
237 %doc drivers/freetds/README
238 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
243 %defattr(644,root,root,755)
244 %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}}
245 %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so
250 %defattr(644,root,root,755)
251 %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}}
252 %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so
257 %defattr(644,root,root,755)
258 %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}}
259 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so
264 %defattr(644,root,root,755)
265 %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}}
266 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so