1 # TODO: ingres, msql, oracle
4 %bcond_without firebird # don't build Firebird driver
5 %bcond_without freetds # don't build FreeTDS driver
6 %bcond_without mysql # don't build MySQL driver
7 %bcond_without pgsql # don't build PostgreSQL driver
8 %bcond_without sqlite # don't build sqlite driver
9 %bcond_without sqlite3 # don't build sqlite3 driver
10 %bcond_without doc # don't build documentation
13 Summary: Database Independent Abstraction Layer for C
14 Summary(pl.UTF-8): Warstwa DBI dla C
16 %define _snap 20090420
21 #Source0: http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz
22 Source0: %{name}-%{_snap}.tar.gz
23 # Source0-md5: 4de79b323162a5a7652b65b608eca6cd
24 Patch0: %{name}-destdir.patch
25 Patch1: %{name}-docs_acfix.patch
26 Patch2: %{name}-sqlite3_libs.patch
27 URL: http://libdbi-drivers.sourceforge.net/
28 %{?with_firebird:BuildRequires: Firebird-devel}
29 BuildRequires: autoconf
30 BuildRequires: automake
31 %{?with_freetds:BuildRequires: freetds-devel}
32 BuildRequires: libtool
33 BuildRequires: libdbi-devel >= %{dbiver}
34 %{?with_mysql:BuildRequires: mysql-devel}
35 %{?with_pgsql:BuildRequires: postgresql-devel}
36 %{?with_sqlite:BuildRequires: sqlite-devel}
37 %{?with_sqlite3:BuildRequires: sqlite3-devel}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 libdbi implements a database-independent abstraction layer in C,
42 similar to the DBI/DBD layer in Perl. Writing one generic set of code,
43 programmers can leverage the power of multiple databases and multiple
44 simultaneous database connections by using this framework.
46 %description -l pl.UTF-8
47 libdbi jest implementacją w C warstwy abstrakcyjnej niezależnej od
48 bazy danych, podobnej do warstwy DBI/DBD w Perlu. Używając tego
49 środowiska programista może za pomocą jednego, wspólnego kodu
50 odwoływać się do wielu różnych baz danych, także jednocześnie.
53 Summary: Firebird plugin for libdbi
54 Summary(pl.UTF-8): Wtyczka Firebird dla libdbi
56 Requires: libdbi >= %{dbiver}
57 Provides: libdbi-dbd = %{version}-%{release}
60 This plugin provides connectivity to Firebird database servers through
61 the libdbi database independent abstraction layer. Switching a
62 program's plugin does not require recompilation or rewriting source
65 %description firebird -l pl.UTF-8
66 Ta wtyczka daje możliwość łączenia się z serwerami Firebird poprzez
67 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
68 zmiany źródeł programu.
71 Summary: FreeTDS plugin for libdbi
72 Summary(pl.UTF-8): Wtyczka FreeTDS dla libdbi
74 Requires: libdbi >= %{dbiver}
75 Provides: libdbi-dbd = %{version}-%{release}
78 This plugin provides connectivity to MS SQL/Sybase database servers
79 through the libdbi database independent abstraction layer. Switching a
80 program's plugin does not require recompilation or rewriting source
83 %description freetds -l pl.UTF-8
84 Ta wtyczka daje możliwość łączenia się z serwerami MS SQL/Sybase
85 poprzez bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga
86 rekompilacji ani zmiany źródeł programu.
89 Summary: MySQL plugin for libdbi
90 Summary(pl.UTF-8): Wtyczka MySQL dla libdbi
92 Requires: libdbi >= %{dbiver}
93 Provides: libdbi-dbd = %{version}-%{release}
94 Obsoletes: libdbi-dbd-mysql
97 This plugin provides connectivity to MySQL database servers through
98 the libdbi database independent abstraction layer. Switching a
99 program's plugin does not require recompilation or rewriting source
102 %description mysql -l pl.UTF-8
103 Ta wtyczka daje możliwość łączenia się z serwerami MySQL poprzez
104 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
105 zmiany źródeł programu.
108 Summary: PostgreSQL plugin for libdbi
109 Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi
111 Requires: libdbi >= %{dbiver}
112 Provides: libdbi-dbd = %{version}-%{release}
113 Obsoletes: libdbi-dbd-pgsql
116 This plugin provides connectivity to PostgreSQL database servers
117 through the libdbi database independent abstraction layer. Switching a
118 program's plugin does not require recompilation or rewriting source
121 %description pgsql -l pl.UTF-8
122 Ta wtyczka daje możliwość łączenia się z serwerami PostgreSQL poprzez
123 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
124 zmiany źródeł programu.
127 Summary: SQLite plugin for libdbi
128 Summary(pl.UTF-8): Wtyczka SQLite dla libdbi
130 Requires: libdbi >= %{dbiver}
131 Provides: libdbi-dbd = %{version}-%{release}
134 This plugin provides connectivity to SQLite engine
135 through the libdbi database independent abstraction layer. Switching a
136 program's plugin does not require recompilation or rewriting source
139 %description sqlite -l pl.UTF-8
140 Ta wtyczka daje możliwość łączenia się z silnikiem SQLite poprzez
141 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
142 zmiany źródeł programu.
145 Summary: SQLite3 plugin for libdbi
146 Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi
148 Requires: libdbi >= %{dbiver}
149 Provides: libdbi-dbd = %{version}-%{release}
152 This plugin provides connectivity to SQLite3 engine through the libdbi
153 database independent abstraction layer. Switching a program's plugin
154 does not require recompilation or rewriting source code.
156 %description sqlite3 -l pl.UTF-8
157 Ta wtyczka daje możliwość łączenia się z silnikiem SQLite3 poprzez
158 bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani
159 zmiany źródeł programu.
175 %{!?with_doc:--disable-docs} \
178 --with-firebird-libdir=%{_libdir} \
179 --with-firebird-incdir=%{_includedir} \
183 --with-freetds-libdir=%{_libdir} \
184 --with-freetds-incdir=%{_includedir} \
188 --with-mysql-libdir=%{_libdir} \
189 --with-mysql-incdir=%{_includedir} \
193 --with-pgsql-libdir=%{_libdir} \
194 --with-pgsql-incdir=%{_includedir} \
198 --with-sqlite-libdir=%{_libdir} \
199 --with-sqlite-incdir=%{_includedir} \
203 --with-sqlite3-libdir=%{_libdir} \
204 --with-sqlite3-incdir=%{_includedir} \
206 --with-dbi-incdir=%{_includedir} \
207 --with-dbi-libdir=%{_libdir}
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
215 DESTDIR=$RPM_BUILD_ROOT
217 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
220 rm -rf $RPM_BUILD_ROOT
223 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
227 %defattr(644,root,root,755)
228 %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}}
229 %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so
234 %defattr(644,root,root,755)
235 %doc drivers/freetds/README
236 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
241 %defattr(644,root,root,755)
242 %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}}
243 %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so
248 %defattr(644,root,root,755)
249 %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}}
250 %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so
255 %defattr(644,root,root,755)
256 %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}}
257 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so
262 %defattr(644,root,root,755)
263 %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}}
264 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so