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