]> git.pld-linux.org Git - packages/libdbi-drivers.git/blob - libdbi-drivers.spec
- argh, md5sum
[packages/libdbi-drivers.git] / libdbi-drivers.spec
1 # TODO: ingres, msql, oracle
2 #
3 # Conditional build:
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
11 #
12 %define dbiver  0.8.4
13 Summary:        Database Independent Abstraction Layer for C
14 Summary(pl.UTF-8):      Warstwa DBI dla C
15 Name:           libdbi-drivers
16 %define _snap   20090420
17 Version:        0.8.4
18 Release:        0.%{_snap}.1
19 License:        LGPL v2+
20 Group:          Libraries
21 #Source0:       http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz
22 Source0:        %{name}-%{_snap}.tar.gz
23 # Source0-md5:  c0a2dae1a28e1815353823c3fe09917f
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)
39
40 %description
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.
45
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.
51
52 %package firebird
53 Summary:        Firebird plugin for libdbi
54 Summary(pl.UTF-8):      Wtyczka Firebird dla libdbi
55 Group:          Libraries
56 Requires:       libdbi >= %{dbiver}
57 Provides:       libdbi-dbd = %{version}-%{release}
58
59 %description firebird
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
63 code.
64
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.
69
70 %package freetds
71 Summary:        FreeTDS plugin for libdbi
72 Summary(pl.UTF-8):      Wtyczka FreeTDS dla libdbi
73 Group:          Libraries
74 Requires:       libdbi >= %{dbiver}
75 Provides:       libdbi-dbd = %{version}-%{release}
76
77 %description freetds
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
81 code.
82
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.
87
88 %package mysql
89 Summary:        MySQL plugin for libdbi
90 Summary(pl.UTF-8):      Wtyczka MySQL dla libdbi
91 Group:          Libraries
92 Requires:       libdbi >= %{dbiver}
93 Provides:       libdbi-dbd = %{version}-%{release}
94 Obsoletes:      libdbi-dbd-mysql
95
96 %description 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
100 code.
101
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.
106
107 %package pgsql
108 Summary:        PostgreSQL plugin for libdbi
109 Summary(pl.UTF-8):      Wtyczka PostgreSQL dla libdbi
110 Group:          Libraries
111 Requires:       libdbi >= %{dbiver}
112 Provides:       libdbi-dbd = %{version}-%{release}
113 Obsoletes:      libdbi-dbd-pgsql
114
115 %description 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
119 code.
120
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.
125
126 %package sqlite
127 Summary:        SQLite plugin for libdbi
128 Summary(pl.UTF-8):      Wtyczka SQLite dla libdbi
129 Group:          Libraries
130 Requires:       libdbi >= %{dbiver}
131 Provides:       libdbi-dbd = %{version}-%{release}
132
133 %description sqlite
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
137 code.
138
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.
143
144 %package sqlite3
145 Summary:        SQLite3 plugin for libdbi
146 Summary(pl.UTF-8):      Wtyczka SQLite3 dla libdbi
147 Group:          Libraries
148 Requires:       libdbi >= %{dbiver}
149 Provides:       libdbi-dbd = %{version}-%{release}
150
151 %description sqlite3
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.
155
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.
160
161 %prep
162 %setup -q -n %{name}
163 %patch0 -p1
164 %patch1 -p1
165 %patch2 -p1
166
167 %build
168 %{__libtoolize}
169 %{__aclocal}
170 %{__autoconf}
171 %{__autoheader}
172 %{__automake}
173 %configure \
174         --disable-static \
175         %{!?with_doc:--disable-docs} \
176 %if %{with firebird}
177         --with-firebird \
178         --with-firebird-libdir=%{_libdir} \
179         --with-firebird-incdir=%{_includedir} \
180 %endif
181 %if %{with freetds}
182         --with-freetds \
183         --with-freetds-libdir=%{_libdir} \
184         --with-freetds-incdir=%{_includedir} \
185 %endif
186 %if %{with mysql}
187         --with-mysql \
188         --with-mysql-libdir=%{_libdir} \
189         --with-mysql-incdir=%{_includedir} \
190 %endif
191 %if %{with pgsql}
192         --with-pgsql \
193         --with-pgsql-libdir=%{_libdir} \
194         --with-pgsql-incdir=%{_includedir} \
195 %endif
196 %if %{with sqlite}
197         --with-sqlite \
198         --with-sqlite-libdir=%{_libdir} \
199         --with-sqlite-incdir=%{_includedir} \
200 %endif
201 %if %{with sqlite3}
202         --with-sqlite3 \
203         --with-sqlite3-libdir=%{_libdir} \
204         --with-sqlite3-incdir=%{_includedir} \
205 %endif
206         --with-dbi-incdir=%{_includedir} \
207         --with-dbi-libdir=%{_libdir}
208 %{__make}
209
210 %install
211 rm -rf $RPM_BUILD_ROOT
212 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
213
214 %{__make} install \
215         DESTDIR=$RPM_BUILD_ROOT
216
217 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
218
219 %clean
220 rm -rf $RPM_BUILD_ROOT
221
222 #%files common
223 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
224
225 %if %{with firebird}
226 %files firebird
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
230 %endif
231
232 %if %{with freetds}
233 %files freetds
234 %defattr(644,root,root,755)
235 %doc drivers/freetds/README
236 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
237 %endif
238
239 %if %{with mysql}
240 %files mysql
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
244 %endif
245
246 %if %{with pgsql}
247 %files pgsql
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
251 %endif
252
253 %if %{with sqlite}
254 %files sqlite
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
258 %endif
259
260 %if %{with sqlite3}
261 %files sqlite3
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
265 %endif
This page took 0.077336 seconds and 4 git commands to generate.