]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - add support for ingres, msql, oracle | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without firebird # don't build Firebird driver | |
6 | %bcond_without freetds # don't build FreeTDS driver | |
7 | %bcond_without mysql # don't build MySQL driver | |
8 | %bcond_without pgsql # don't build PostgreSQL driver | |
9 | %bcond_without sqlite # don't build sqlite driver | |
10 | %bcond_without sqlite3 # don't build sqlite3 driver | |
11 | %bcond_with doc # don't build documentation | |
12 | # | |
13 | %define dbiver 0.9.0 | |
14 | Summary: Database Independent Abstraction Layer for C | |
15 | Summary(pl.UTF-8): Warstwa DBI dla C | |
16 | Name: libdbi-drivers | |
17 | %define _snap 20100921 | |
18 | Version: 0.9.0 | |
19 | Release: 0.%{_snap}.2 | |
20 | License: LGPL v2+ | |
21 | Group: Libraries | |
22 | #Source0: http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz | |
23 | Source0: %{name}-%{_snap}.tar.gz | |
24 | # Source0-md5: 3e3b1df63ab59f9246111db7fbad8310 | |
25 | Patch0: %{name}-sqlite3_libs.patch | |
26 | URL: http://libdbi-drivers.sourceforge.net/ | |
27 | %if %{with doc} | |
28 | BuildRequires: docbook-dtd41-sgml | |
29 | BuildRequires: docbook-style-dsssl | |
30 | BuildRequires: jadetex | |
31 | BuildRequires: openjade | |
32 | BuildRequires: texlive-fonts-ams | |
33 | BuildRequires: texlive-fonts-marvosym | |
34 | BuildRequires: texlive-fonts-stmaryrd | |
35 | BuildRequires: texlive-fonts-type1-urw | |
36 | BuildRequires: texlive-format-pdflatex | |
37 | BuildRequires: texlive-latex-ams | |
38 | BuildRequires: texlive-latex-extend | |
39 | BuildRequires: texlive-latex-wasysym | |
40 | BuildRequires: texlive-xetex | |
41 | BuildRequires: texlive-xmltex | |
42 | %endif | |
43 | %{?with_firebird:BuildRequires: Firebird-devel} | |
44 | BuildRequires: autoconf | |
45 | BuildRequires: automake | |
46 | %{?with_freetds:BuildRequires: freetds-devel} | |
47 | BuildRequires: libtool | |
48 | BuildRequires: libdbi-devel >= %{dbiver} | |
49 | %{?with_mysql:BuildRequires: mysql-devel} | |
50 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
51 | %{?with_sqlite:BuildRequires: sqlite-devel} | |
52 | %{?with_sqlite3:BuildRequires: sqlite3-devel} | |
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 | ||
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. | |
66 | ||
67 | %package firebird | |
68 | Summary: Firebird plugin for libdbi | |
69 | Summary(pl.UTF-8): Wtyczka Firebird dla libdbi | |
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 | ||
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. | |
84 | ||
85 | %package freetds | |
86 | Summary: FreeTDS plugin for libdbi | |
87 | Summary(pl.UTF-8): Wtyczka FreeTDS dla libdbi | |
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 | ||
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. | |
102 | ||
103 | %package mysql | |
104 | Summary: MySQL plugin for libdbi | |
105 | Summary(pl.UTF-8): Wtyczka MySQL dla libdbi | |
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 | ||
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. | |
121 | ||
122 | %package pgsql | |
123 | Summary: PostgreSQL plugin for libdbi | |
124 | Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi | |
125 | Group: Libraries | |
126 | Requires: libdbi >= %{dbiver} | |
127 | Provides: libdbi-dbd = %{version}-%{release} | |
128 | Obsoletes: libdbi-dbd-pgsql | |
129 | ||
130 | %description pgsql | |
131 | This plugin provides connectivity to PostgreSQL database servers | |
132 | through the libdbi database independent abstraction layer. Switching a | |
133 | program's plugin does not require recompilation or rewriting source | |
134 | code. | |
135 | ||
136 | %description pgsql -l pl.UTF-8 | |
137 | Ta wtyczka daje możliwość łączenia się z serwerami PostgreSQL poprzez | |
138 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
139 | zmiany źródeł programu. | |
140 | ||
141 | %package sqlite | |
142 | Summary: SQLite plugin for libdbi | |
143 | Summary(pl.UTF-8): Wtyczka SQLite dla libdbi | |
144 | Group: Libraries | |
145 | Requires: libdbi >= %{dbiver} | |
146 | Provides: libdbi-dbd = %{version}-%{release} | |
147 | ||
148 | %description sqlite | |
149 | This plugin provides connectivity to SQLite engine | |
150 | through the libdbi database independent abstraction layer. Switching a | |
151 | program's plugin does not require recompilation or rewriting source | |
152 | code. | |
153 | ||
154 | %description sqlite -l pl.UTF-8 | |
155 | Ta wtyczka daje możliwość łączenia się z silnikiem SQLite poprzez | |
156 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
157 | zmiany źródeł programu. | |
158 | ||
159 | %package sqlite3 | |
160 | Summary: SQLite3 plugin for libdbi | |
161 | Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi | |
162 | Group: Libraries | |
163 | Requires: libdbi >= %{dbiver} | |
164 | Provides: libdbi-dbd = %{version}-%{release} | |
165 | ||
166 | %description sqlite3 | |
167 | This plugin provides connectivity to SQLite3 engine through the libdbi | |
168 | database independent abstraction layer. Switching a program's plugin | |
169 | does not require recompilation or rewriting source code. | |
170 | ||
171 | %description sqlite3 -l pl.UTF-8 | |
172 | Ta wtyczka daje możliwość łączenia się z silnikiem SQLite3 poprzez | |
173 | bibliotekę libdbi. Zmiana używanej wtyczki nie wymaga rekompilacji ani | |
174 | zmiany źródeł programu. | |
175 | ||
176 | %prep | |
177 | %setup -q -n %{name} | |
178 | %patch0 -p1 | |
179 | ||
180 | %build | |
181 | %{__libtoolize} | |
182 | %{__aclocal} | |
183 | %{__autoconf} | |
184 | %{__autoheader} | |
185 | %{__automake} | |
186 | %configure \ | |
187 | --disable-static \ | |
188 | %{!?with_doc:--disable-docs} \ | |
189 | %if %{with firebird} | |
190 | --with-firebird \ | |
191 | --with-firebird-libdir=%{_libdir} \ | |
192 | --with-firebird-incdir=%{_includedir} \ | |
193 | %endif | |
194 | %if %{with freetds} | |
195 | --with-freetds \ | |
196 | --with-freetds-libdir=%{_libdir} \ | |
197 | --with-freetds-incdir=%{_includedir} \ | |
198 | %endif | |
199 | %if %{with mysql} | |
200 | --enable-mysql-threadsafe \ | |
201 | --with-mysql \ | |
202 | --with-mysql-libdir=%{_libdir} \ | |
203 | --with-mysql-incdir=%{_includedir} \ | |
204 | %endif | |
205 | %if %{with pgsql} | |
206 | --with-pgsql \ | |
207 | --with-pgsql-libdir=%{_libdir} \ | |
208 | --with-pgsql-incdir=%{_includedir} \ | |
209 | %endif | |
210 | %if %{with sqlite} | |
211 | --with-sqlite \ | |
212 | --with-sqlite-libdir=%{_libdir} \ | |
213 | --with-sqlite-incdir=%{_includedir} \ | |
214 | %endif | |
215 | %if %{with sqlite3} | |
216 | --with-sqlite3 \ | |
217 | --with-sqlite3-libdir=%{_libdir} \ | |
218 | --with-sqlite3-incdir=%{_includedir} \ | |
219 | %endif | |
220 | --with-dbi-incdir=%{_includedir} \ | |
221 | --with-dbi-libdir=%{_libdir} | |
222 | %{__make} | |
223 | ||
224 | %install | |
225 | rm -rf $RPM_BUILD_ROOT | |
226 | install -d $RPM_BUILD_ROOT%{_libdir}/dbd | |
227 | ||
228 | %{__make} install \ | |
229 | DESTDIR=$RPM_BUILD_ROOT | |
230 | ||
231 | rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la | |
232 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc | |
233 | ||
234 | %clean | |
235 | rm -rf $RPM_BUILD_ROOT | |
236 | ||
237 | #%files common | |
238 | #%doc AUTHORS ChangeLog NEWS README README.encodings TODO | |
239 | ||
240 | %if %{with firebird} | |
241 | %files firebird | |
242 | %defattr(644,root,root,755) | |
243 | %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}} | |
244 | %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so | |
245 | %endif | |
246 | ||
247 | %if %{with freetds} | |
248 | %files freetds | |
249 | %defattr(644,root,root,755) | |
250 | %doc drivers/freetds/README | |
251 | %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so | |
252 | %endif | |
253 | ||
254 | %if %{with mysql} | |
255 | %files mysql | |
256 | %defattr(644,root,root,755) | |
257 | %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}} | |
258 | %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so | |
259 | %endif | |
260 | ||
261 | %if %{with pgsql} | |
262 | %files pgsql | |
263 | %defattr(644,root,root,755) | |
264 | %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}} | |
265 | %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so | |
266 | %endif | |
267 | ||
268 | %if %{with sqlite} | |
269 | %files sqlite | |
270 | %defattr(644,root,root,755) | |
271 | %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}} | |
272 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so | |
273 | %endif | |
274 | ||
275 | %if %{with sqlite3} | |
276 | %files sqlite3 | |
277 | %defattr(644,root,root,755) | |
278 | %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}} | |
279 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so | |
280 | %endif |