]>
Commit | Line | Data |
---|---|---|
1b7a81ea | 1 | # TODO: |
8d09b497 | 2 | # - add support for db2, ingres, msql |
ebda6fef JB |
3 | # |
4 | # Conditional build: | |
8d09b497 JB |
5 | %bcond_without firebird # Firebird driver |
6 | %bcond_without freetds # FreeTDS driver | |
7 | %bcond_without mysql # MySQL driver | |
8 | %bcond_with oci # Oracle driver | |
9 | %bcond_without pgsql # PostgreSQL driver | |
10 | %bcond_without sqlite # sqlite driver | |
11 | %bcond_without sqlite3 # sqlite3 driver | |
12 | %bcond_with doc # documentation | |
6e4b565f | 13 | |
db92e756 | 14 | %define dbiver 0.9.0 |
6df27f77 | 15 | Summary: Database Independent Abstraction Layer for C |
e3ad3311 | 16 | Summary(pl.UTF-8): Warstwa DBI dla C |
6df27f77 | 17 | Name: libdbi-drivers |
db92e756 | 18 | Version: 0.9.0 |
e68b576a | 19 | Release: 4 |
a56b9ef1 | 20 | License: LGPL v2+ |
6df27f77 | 21 | Group: Libraries |
8d09b497 JB |
22 | Source0: http://downloads.sourceforge.net/libdbi-drivers/%{name}-%{version}.tar.gz |
23 | # Source0-md5: 9f47b960e225eede2cdeaabf7d22f59f | |
db92e756 | 24 | Patch0: %{name}-sqlite3_libs.patch |
a8405ffd JR |
25 | Patch1: freetds-1.0.patch |
26 | Patch2: firebird3.patch | |
6df27f77 | 27 | URL: http://libdbi-drivers.sourceforge.net/ |
8d09b497 JB |
28 | %{?with_firebird:BuildRequires: Firebird-devel} |
29 | BuildRequires: autoconf >= 2.13 | |
30 | BuildRequires: automake | |
31 | %{?with_freetds:BuildRequires: freetds-devel} | |
32 | BuildRequires: libdbi-devel >= %{dbiver} | |
33 | BuildRequires: libtool >= 2:2 | |
34 | %{?with_mysql:BuildRequires: mysql-devel} | |
35 | %{?with_oci:BuildRequires: oracle-instantclient-devel} | |
36 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
37 | %{?with_sqlite:BuildRequires: sqlite-devel} | |
38 | %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3} | |
db92e756 JP |
39 | %if %{with doc} |
40 | BuildRequires: docbook-dtd41-sgml | |
41 | BuildRequires: docbook-style-dsssl | |
42 | BuildRequires: jadetex | |
43 | BuildRequires: openjade | |
44 | BuildRequires: texlive-fonts-ams | |
45 | BuildRequires: texlive-fonts-marvosym | |
46 | BuildRequires: texlive-fonts-stmaryrd | |
47 | BuildRequires: texlive-fonts-type1-urw | |
48 | BuildRequires: texlive-format-pdflatex | |
49 | BuildRequires: texlive-latex-ams | |
50 | BuildRequires: texlive-latex-extend | |
51 | BuildRequires: texlive-latex-wasysym | |
52 | BuildRequires: texlive-xetex | |
53 | BuildRequires: texlive-xmltex | |
54 | %endif | |
6df27f77 AF |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
57 | %description | |
58 | libdbi implements a database-independent abstraction layer in C, | |
59 | similar to the DBI/DBD layer in Perl. Writing one generic set of code, | |
60 | programmers can leverage the power of multiple databases and multiple | |
61 | simultaneous database connections by using this framework. | |
62 | ||
f92dac68 JR |
63 | %description -l pl.UTF-8 |
64 | libdbi jest implementacją w C warstwy abstrakcyjnej niezależnej od | |
65 | bazy danych, podobnej do warstwy DBI/DBD w Perlu. Używając tego | |
66 | środowiska programista może za pomocą jednego, wspólnego kodu | |
67 | odwoływać się do wielu różnych baz danych, także jednocześnie. | |
6df27f77 | 68 | |
ba1fccd8 JB |
69 | %package firebird |
70 | Summary: Firebird plugin for libdbi | |
e3ad3311 | 71 | Summary(pl.UTF-8): Wtyczka Firebird dla libdbi |
ba1fccd8 JB |
72 | Group: Libraries |
73 | Requires: libdbi >= %{dbiver} | |
74 | Provides: libdbi-dbd = %{version}-%{release} | |
75 | ||
76 | %description firebird | |
77 | This plugin provides connectivity to Firebird database servers through | |
78 | the libdbi database independent abstraction layer. Switching a | |
79 | program's plugin does not require recompilation or rewriting source | |
80 | code. | |
81 | ||
f92dac68 JR |
82 | %description firebird -l pl.UTF-8 |
83 | Ta wtyczka daje możliwość łączenia się z serwerami Firebird poprzez | |
84 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
85 | zmiany źródeł programu. | |
ba1fccd8 | 86 | |
3cf24870 JB |
87 | %package freetds |
88 | Summary: FreeTDS plugin for libdbi | |
e3ad3311 | 89 | Summary(pl.UTF-8): Wtyczka FreeTDS dla libdbi |
3cf24870 JB |
90 | Group: Libraries |
91 | Requires: libdbi >= %{dbiver} | |
92 | Provides: libdbi-dbd = %{version}-%{release} | |
93 | ||
94 | %description freetds | |
95 | This plugin provides connectivity to MS SQL/Sybase database servers | |
96 | through the libdbi database independent abstraction layer. Switching a | |
97 | program's plugin does not require recompilation or rewriting source | |
98 | code. | |
99 | ||
f92dac68 JR |
100 | %description freetds -l pl.UTF-8 |
101 | Ta wtyczka daje możliwość łączenia się z serwerami MS SQL/Sybase | |
102 | poprzez bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga | |
103 | rekompilacji ani zmiany źródeł programu. | |
3cf24870 | 104 | |
6df27f77 AF |
105 | %package mysql |
106 | Summary: MySQL plugin for libdbi | |
e3ad3311 | 107 | Summary(pl.UTF-8): Wtyczka MySQL dla libdbi |
6df27f77 AF |
108 | Group: Libraries |
109 | Requires: libdbi >= %{dbiver} | |
110 | Provides: libdbi-dbd = %{version}-%{release} | |
111 | Obsoletes: libdbi-dbd-mysql | |
112 | ||
113 | %description mysql | |
114 | This plugin provides connectivity to MySQL database servers through | |
115 | the libdbi database independent abstraction layer. Switching a | |
116 | program's plugin does not require recompilation or rewriting source | |
117 | code. | |
118 | ||
f92dac68 JR |
119 | %description mysql -l pl.UTF-8 |
120 | Ta wtyczka daje możliwość łączenia się z serwerami MySQL poprzez | |
121 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
122 | zmiany źródeł programu. | |
6df27f77 | 123 | |
8d09b497 JB |
124 | %package oracle |
125 | Summary: Oracle plugin for libdbi | |
126 | Summary(pl.UTF-8): Wtyczka Oracle dla libdbi | |
127 | Group: Libraries | |
128 | Requires: libdbi >= %{dbiver} | |
129 | Provides: libdbi-dbd = %{version}-%{release} | |
130 | Obsoletes: libdbi-dbd-oracle | |
131 | ||
132 | %description oracle | |
133 | This plugin provides connectivity to Oracle database servers through | |
134 | the libdbi database independent abstraction layer. Switching a | |
135 | program's plugin does not require recompilation or rewriting source | |
136 | code. | |
137 | ||
138 | %description oracle -l pl.UTF-8 | |
139 | Ta wtyczka daje możliwość łączenia się z serwerami baz danych Oracle | |
140 | poprzez bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga | |
141 | rekompilacji ani zmiany źródeł programu. | |
142 | ||
6df27f77 AF |
143 | %package pgsql |
144 | Summary: PostgreSQL plugin for libdbi | |
e3ad3311 | 145 | Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi |
6df27f77 AF |
146 | Group: Libraries |
147 | Requires: libdbi >= %{dbiver} | |
148 | Provides: libdbi-dbd = %{version}-%{release} | |
149 | Obsoletes: libdbi-dbd-pgsql | |
150 | ||
151 | %description pgsql | |
152 | This plugin provides connectivity to PostgreSQL database servers | |
153 | through the libdbi database independent abstraction layer. Switching a | |
154 | program's plugin does not require recompilation or rewriting source | |
155 | code. | |
156 | ||
f92dac68 JR |
157 | %description pgsql -l pl.UTF-8 |
158 | Ta wtyczka daje możliwość łączenia się z serwerami PostgreSQL poprzez | |
159 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
160 | zmiany źródeł programu. | |
6df27f77 AF |
161 | |
162 | %package sqlite | |
163 | Summary: SQLite plugin for libdbi | |
e3ad3311 | 164 | Summary(pl.UTF-8): Wtyczka SQLite dla libdbi |
6df27f77 AF |
165 | Group: Libraries |
166 | Requires: libdbi >= %{dbiver} | |
167 | Provides: libdbi-dbd = %{version}-%{release} | |
168 | ||
169 | %description sqlite | |
6e4b565f ER |
170 | This plugin provides connectivity to SQLite engine through the libdbi |
171 | database independent abstraction layer. Switching a program's plugin | |
172 | does not require recompilation or rewriting source code. | |
6df27f77 | 173 | |
f92dac68 JR |
174 | %description sqlite -l pl.UTF-8 |
175 | Ta wtyczka daje możliwość łączenia się z silnikiem SQLite poprzez | |
176 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
177 | zmiany źródeł programu. | |
6df27f77 | 178 | |
ba1fccd8 JB |
179 | %package sqlite3 |
180 | Summary: SQLite3 plugin for libdbi | |
e3ad3311 | 181 | Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi |
ba1fccd8 JB |
182 | Group: Libraries |
183 | Requires: libdbi >= %{dbiver} | |
184 | Provides: libdbi-dbd = %{version}-%{release} | |
185 | ||
186 | %description sqlite3 | |
187 | This plugin provides connectivity to SQLite3 engine through the libdbi | |
188 | database independent abstraction layer. Switching a program's plugin | |
189 | does not require recompilation or rewriting source code. | |
190 | ||
f92dac68 JR |
191 | %description sqlite3 -l pl.UTF-8 |
192 | Ta wtyczka daje możliwość łączenia się z silnikiem SQLite3 poprzez | |
193 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
194 | zmiany źródeł programu. | |
ba1fccd8 | 195 | |
6df27f77 | 196 | %prep |
8d09b497 | 197 | %setup -q |
ebda6fef | 198 | %patch0 -p1 |
a8405ffd JR |
199 | %patch1 -p1 |
200 | %patch2 -p1 | |
6df27f77 AF |
201 | |
202 | %build | |
6df27f77 AF |
203 | %{__libtoolize} |
204 | %{__aclocal} | |
6df27f77 | 205 | %{__autoconf} |
a56b9ef1 JB |
206 | %{__autoheader} |
207 | %{__automake} | |
6df27f77 | 208 | %configure \ |
ebda6fef | 209 | --disable-static \ |
d182db3c | 210 | %{!?with_doc:--disable-docs} \ |
ba1fccd8 JB |
211 | %if %{with firebird} |
212 | --with-firebird \ | |
213 | --with-firebird-libdir=%{_libdir} \ | |
214 | --with-firebird-incdir=%{_includedir} \ | |
c6f89c5c | 215 | %endif |
3cf24870 JB |
216 | %if %{with freetds} |
217 | --with-freetds \ | |
218 | --with-freetds-libdir=%{_libdir} \ | |
219 | --with-freetds-incdir=%{_includedir} \ | |
220 | %endif | |
c6f89c5c JK |
221 | %if %{with mysql} |
222 | --with-mysql \ | |
223 | --with-mysql-libdir=%{_libdir} \ | |
8d09b497 JB |
224 | --with-mysql-incdir=%{_includedir}/mysql \ |
225 | %endif | |
226 | %if %{with oci} | |
227 | --with-oracle \ | |
228 | --with-oracle-libdir=%{_libdir} \ | |
229 | --with-oracle-incdir=%{_includedir}/oracle/client \ | |
c6f89c5c JK |
230 | %endif |
231 | %if %{with pgsql} | |
232 | --with-pgsql \ | |
233 | --with-pgsql-libdir=%{_libdir} \ | |
454bff6d | 234 | --with-pgsql-incdir=%{_includedir} \ |
ba1fccd8 JB |
235 | %endif |
236 | %if %{with sqlite} | |
237 | --with-sqlite \ | |
238 | --with-sqlite-libdir=%{_libdir} \ | |
239 | --with-sqlite-incdir=%{_includedir} \ | |
240 | %endif | |
d182db3c | 241 | %if %{with sqlite3} |
ba1fccd8 JB |
242 | --with-sqlite3 \ |
243 | --with-sqlite3-libdir=%{_libdir} \ | |
244 | --with-sqlite3-incdir=%{_includedir} \ | |
c6f89c5c | 245 | %endif |
bc8248b2 MM |
246 | --with-dbi-incdir=%{_includedir} \ |
247 | --with-dbi-libdir=%{_libdir} | |
6df27f77 AF |
248 | %{__make} |
249 | ||
250 | %install | |
251 | rm -rf $RPM_BUILD_ROOT | |
252 | install -d $RPM_BUILD_ROOT%{_libdir}/dbd | |
253 | ||
ebda6fef JB |
254 | %{__make} install \ |
255 | DESTDIR=$RPM_BUILD_ROOT | |
256 | ||
257 | rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la | |
6e4b565f | 258 | rm -rf $RPM_BUILD_ROOT%{_docdir} |
6df27f77 AF |
259 | |
260 | %clean | |
261 | rm -rf $RPM_BUILD_ROOT | |
262 | ||
a56b9ef1 JB |
263 | #%files common |
264 | #%doc AUTHORS ChangeLog NEWS README README.encodings TODO | |
265 | ||
3cf24870 | 266 | %if %{with firebird} |
ba1fccd8 JB |
267 | %files firebird |
268 | %defattr(644,root,root,755) | |
d182db3c | 269 | %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}} |
98d4fb76 | 270 | %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so |
ba1fccd8 JB |
271 | %endif |
272 | ||
3cf24870 JB |
273 | %if %{with freetds} |
274 | %files freetds | |
275 | %defattr(644,root,root,755) | |
a56b9ef1 | 276 | %doc drivers/freetds/README |
98d4fb76 | 277 | %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so |
3cf24870 JB |
278 | %endif |
279 | ||
6df27f77 AF |
280 | %if %{with mysql} |
281 | %files mysql | |
282 | %defattr(644,root,root,755) | |
d182db3c | 283 | %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}} |
98d4fb76 | 284 | %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so |
6df27f77 AF |
285 | %endif |
286 | ||
8d09b497 JB |
287 | %if %{with oci} |
288 | %files oracle | |
289 | %defattr(644,root,root,755) | |
290 | %doc drivers/oracle/{AUTHORS,README,TODO%{?with_doc:,dbd_oracle.pdf,dbd_oracle}} | |
291 | %attr(755,root,root) %{_libdir}/dbd/libdbdoracle.so | |
292 | %endif | |
293 | ||
6df27f77 AF |
294 | %if %{with pgsql} |
295 | %files pgsql | |
296 | %defattr(644,root,root,755) | |
d182db3c | 297 | %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}} |
98d4fb76 | 298 | %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so |
6df27f77 AF |
299 | %endif |
300 | ||
301 | %if %{with sqlite} | |
302 | %files sqlite | |
303 | %defattr(644,root,root,755) | |
d182db3c | 304 | %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}} |
98d4fb76 | 305 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so |
6df27f77 | 306 | %endif |
ba1fccd8 JB |
307 | |
308 | %if %{with sqlite3} | |
309 | %files sqlite3 | |
310 | %defattr(644,root,root,755) | |
d182db3c | 311 | %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}} |
98d4fb76 | 312 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so |
ba1fccd8 | 313 | %endif |