]> git.pld-linux.org Git - packages/libdbi-drivers.git/blob - libdbi-drivers.spec
- rel .3; typo fix
[packages/libdbi-drivers.git] / libdbi-drivers.spec
1 # TODO:
2 # - add support for ingres, msql, oracle
3 # - fix doc bcond build
4 #
5 # Conditional 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
13 #
14 %define dbiver  0.8.4
15 Summary:        Database Independent Abstraction Layer for C
16 Summary(pl.UTF-8):      Warstwa DBI dla C
17 Name:           libdbi-drivers
18 %define _snap   20090420
19 Version:        0.8.4
20 Release:        0.%{_snap}.3
21 License:        LGPL v2+
22 Group:          Libraries
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)
41
42 %description
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.
47
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.
53
54 %package firebird
55 Summary:        Firebird plugin for libdbi
56 Summary(pl.UTF-8):      Wtyczka Firebird dla libdbi
57 Group:          Libraries
58 Requires:       libdbi >= %{dbiver}
59 Provides:       libdbi-dbd = %{version}-%{release}
60
61 %description firebird
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
65 code.
66
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.
71
72 %package freetds
73 Summary:        FreeTDS plugin for libdbi
74 Summary(pl.UTF-8):      Wtyczka FreeTDS dla libdbi
75 Group:          Libraries
76 Requires:       libdbi >= %{dbiver}
77 Provides:       libdbi-dbd = %{version}-%{release}
78
79 %description freetds
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
83 code.
84
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.
89
90 %package mysql
91 Summary:        MySQL plugin for libdbi
92 Summary(pl.UTF-8):      Wtyczka MySQL dla libdbi
93 Group:          Libraries
94 Requires:       libdbi >= %{dbiver}
95 Provides:       libdbi-dbd = %{version}-%{release}
96 Obsoletes:      libdbi-dbd-mysql
97
98 %description 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
102 code.
103
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.
108
109 %package pgsql
110 Summary:        PostgreSQL plugin for libdbi
111 Summary(pl.UTF-8):      Wtyczka PostgreSQL dla libdbi
112 Group:          Libraries
113 Requires:       libdbi >= %{dbiver}
114 Provides:       libdbi-dbd = %{version}-%{release}
115 Obsoletes:      libdbi-dbd-pgsql
116
117 %description 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
121 code.
122
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.
127
128 %package sqlite
129 Summary:        SQLite plugin for libdbi
130 Summary(pl.UTF-8):      Wtyczka SQLite dla libdbi
131 Group:          Libraries
132 Requires:       libdbi >= %{dbiver}
133 Provides:       libdbi-dbd = %{version}-%{release}
134
135 %description sqlite
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
139 code.
140
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.
145
146 %package sqlite3
147 Summary:        SQLite3 plugin for libdbi
148 Summary(pl.UTF-8):      Wtyczka SQLite3 dla libdbi
149 Group:          Libraries
150 Requires:       libdbi >= %{dbiver}
151 Provides:       libdbi-dbd = %{version}-%{release}
152
153 %description sqlite3
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.
157
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.
162
163 %prep
164 %setup -q -n %{name}
165 %patch0 -p1
166 %patch1 -p1
167 %patch2 -p1
168
169 %build
170 %{__libtoolize}
171 %{__aclocal}
172 %{__autoconf}
173 %{__autoheader}
174 %{__automake}
175 %configure \
176         --disable-static \
177         %{!?with_doc:--disable-docs} \
178 %if %{with firebird}
179         --with-firebird \
180         --with-firebird-libdir=%{_libdir} \
181         --with-firebird-incdir=%{_includedir} \
182 %endif
183 %if %{with freetds}
184         --with-freetds \
185         --with-freetds-libdir=%{_libdir} \
186         --with-freetds-incdir=%{_includedir} \
187 %endif
188 %if %{with mysql}
189         --with-mysql \
190         --with-mysql-libdir=%{_libdir} \
191         --with-mysql-incdir=%{_includedir} \
192 %endif
193 %if %{with pgsql}
194         --with-pgsql \
195         --with-pgsql-libdir=%{_libdir} \
196         --with-pgsql-incdir=%{_includedir} \
197 %endif
198 %if %{with sqlite}
199         --with-sqlite \
200         --with-sqlite-libdir=%{_libdir} \
201         --with-sqlite-incdir=%{_includedir} \
202 %endif
203 %if %{with sqlite3}
204         --with-sqlite3 \
205         --with-sqlite3-libdir=%{_libdir} \
206         --with-sqlite3-incdir=%{_includedir} \
207 %endif
208         --with-dbi-incdir=%{_includedir} \
209         --with-dbi-libdir=%{_libdir}
210 %{__make}
211
212 %install
213 rm -rf $RPM_BUILD_ROOT
214 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
215
216 %{__make} install \
217         DESTDIR=$RPM_BUILD_ROOT
218
219 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
220
221 %clean
222 rm -rf $RPM_BUILD_ROOT
223
224 #%files common
225 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
226
227 %if %{with firebird}
228 %files firebird
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
232 %endif
233
234 %if %{with freetds}
235 %files freetds
236 %defattr(644,root,root,755)
237 %doc drivers/freetds/README
238 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
239 %endif
240
241 %if %{with mysql}
242 %files mysql
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
246 %endif
247
248 %if %{with pgsql}
249 %files pgsql
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
253 %endif
254
255 %if %{with sqlite}
256 %files sqlite
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
260 %endif
261
262 %if %{with sqlite3}
263 %files sqlite3
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
267 %endif
This page took 0.048905 seconds and 3 git commands to generate.