]>
Commit | Line | Data |
---|---|---|
a56b9ef1 | 1 | # TODO: ingres, msql, oracle |
ebda6fef JB |
2 | # |
3 | # Conditional build: | |
ba1fccd8 | 4 | %bcond_without firebird # don't build Firebird driver |
3cf24870 | 5 | %bcond_without freetds # don't build FreeTDS driver |
ba1fccd8 JB |
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 | |
d182db3c | 10 | %bcond_without doc # don't build documentation |
ebda6fef | 11 | # |
d182db3c | 12 | %define dbiver 0.8.4 |
6df27f77 | 13 | Summary: Database Independent Abstraction Layer for C |
e3ad3311 | 14 | Summary(pl.UTF-8): Warstwa DBI dla C |
6df27f77 | 15 | Name: libdbi-drivers |
d182db3c MM |
16 | %define _snap 20090420 |
17 | Version: 0.8.4 | |
18 | Release: 0.%{_snap}.1 | |
a56b9ef1 | 19 | License: LGPL v2+ |
6df27f77 | 20 | Group: Libraries |
d182db3c MM |
21 | #Source0: http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz |
22 | Source0: %{name}-%{_snap}.tar.gz | |
a56b9ef1 | 23 | # Source0-md5: 4de79b323162a5a7652b65b608eca6cd |
d182db3c MM |
24 | Patch0: %{name}-destdir.patch |
25 | Patch1: %{name}-docs_acfix.patch | |
26 | Patch2: %{name}-sqlite3_libs.patch | |
6df27f77 | 27 | URL: http://libdbi-drivers.sourceforge.net/ |
3cf24870 | 28 | %{?with_firebird:BuildRequires: Firebird-devel} |
6df27f77 AF |
29 | BuildRequires: autoconf |
30 | BuildRequires: automake | |
3cf24870 | 31 | %{?with_freetds:BuildRequires: freetds-devel} |
6df27f77 AF |
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} | |
ba1fccd8 | 37 | %{?with_sqlite3:BuildRequires: sqlite3-devel} |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 | 51 | |
ba1fccd8 JB |
52 | %package firebird |
53 | Summary: Firebird plugin for libdbi | |
e3ad3311 | 54 | Summary(pl.UTF-8): Wtyczka Firebird dla libdbi |
ba1fccd8 JB |
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 | ||
f92dac68 JR |
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. | |
ba1fccd8 | 69 | |
3cf24870 JB |
70 | %package freetds |
71 | Summary: FreeTDS plugin for libdbi | |
e3ad3311 | 72 | Summary(pl.UTF-8): Wtyczka FreeTDS dla libdbi |
3cf24870 JB |
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 | ||
f92dac68 JR |
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. | |
3cf24870 | 87 | |
6df27f77 AF |
88 | %package mysql |
89 | Summary: MySQL plugin for libdbi | |
e3ad3311 | 90 | Summary(pl.UTF-8): Wtyczka MySQL dla libdbi |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 AF |
106 | |
107 | %package pgsql | |
108 | Summary: PostgreSQL plugin for libdbi | |
e3ad3311 | 109 | Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 AF |
125 | |
126 | %package sqlite | |
127 | Summary: SQLite plugin for libdbi | |
e3ad3311 | 128 | Summary(pl.UTF-8): Wtyczka SQLite dla libdbi |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 | 143 | |
ba1fccd8 JB |
144 | %package sqlite3 |
145 | Summary: SQLite3 plugin for libdbi | |
e3ad3311 | 146 | Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi |
ba1fccd8 JB |
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 | ||
f92dac68 JR |
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. | |
ba1fccd8 | 160 | |
6df27f77 | 161 | %prep |
d182db3c | 162 | %setup -q -n %{name} |
ebda6fef | 163 | %patch0 -p1 |
d182db3c MM |
164 | %patch1 -p1 |
165 | %patch2 -p1 | |
6df27f77 AF |
166 | |
167 | %build | |
6df27f77 AF |
168 | %{__libtoolize} |
169 | %{__aclocal} | |
6df27f77 | 170 | %{__autoconf} |
a56b9ef1 JB |
171 | %{__autoheader} |
172 | %{__automake} | |
6df27f77 | 173 | %configure \ |
ebda6fef | 174 | --disable-static \ |
d182db3c | 175 | %{!?with_doc:--disable-docs} \ |
ba1fccd8 JB |
176 | %if %{with firebird} |
177 | --with-firebird \ | |
178 | --with-firebird-libdir=%{_libdir} \ | |
179 | --with-firebird-incdir=%{_includedir} \ | |
c6f89c5c | 180 | %endif |
3cf24870 JB |
181 | %if %{with freetds} |
182 | --with-freetds \ | |
183 | --with-freetds-libdir=%{_libdir} \ | |
184 | --with-freetds-incdir=%{_includedir} \ | |
185 | %endif | |
c6f89c5c JK |
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} \ | |
454bff6d | 194 | --with-pgsql-incdir=%{_includedir} \ |
ba1fccd8 JB |
195 | %endif |
196 | %if %{with sqlite} | |
197 | --with-sqlite \ | |
198 | --with-sqlite-libdir=%{_libdir} \ | |
199 | --with-sqlite-incdir=%{_includedir} \ | |
200 | %endif | |
d182db3c | 201 | %if %{with sqlite3} |
ba1fccd8 JB |
202 | --with-sqlite3 \ |
203 | --with-sqlite3-libdir=%{_libdir} \ | |
204 | --with-sqlite3-incdir=%{_includedir} \ | |
c6f89c5c | 205 | %endif |
bc8248b2 MM |
206 | --with-dbi-incdir=%{_includedir} \ |
207 | --with-dbi-libdir=%{_libdir} | |
6df27f77 AF |
208 | %{__make} |
209 | ||
210 | %install | |
211 | rm -rf $RPM_BUILD_ROOT | |
212 | install -d $RPM_BUILD_ROOT%{_libdir}/dbd | |
213 | ||
ebda6fef JB |
214 | %{__make} install \ |
215 | DESTDIR=$RPM_BUILD_ROOT | |
216 | ||
217 | rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la | |
6df27f77 AF |
218 | |
219 | %clean | |
220 | rm -rf $RPM_BUILD_ROOT | |
221 | ||
a56b9ef1 JB |
222 | #%files common |
223 | #%doc AUTHORS ChangeLog NEWS README README.encodings TODO | |
224 | ||
3cf24870 | 225 | %if %{with firebird} |
ba1fccd8 JB |
226 | %files firebird |
227 | %defattr(644,root,root,755) | |
d182db3c | 228 | %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}} |
98d4fb76 | 229 | %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so |
ba1fccd8 JB |
230 | %endif |
231 | ||
3cf24870 JB |
232 | %if %{with freetds} |
233 | %files freetds | |
234 | %defattr(644,root,root,755) | |
a56b9ef1 | 235 | %doc drivers/freetds/README |
98d4fb76 | 236 | %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so |
3cf24870 JB |
237 | %endif |
238 | ||
6df27f77 AF |
239 | %if %{with mysql} |
240 | %files mysql | |
241 | %defattr(644,root,root,755) | |
d182db3c | 242 | %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}} |
98d4fb76 | 243 | %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so |
6df27f77 AF |
244 | %endif |
245 | ||
246 | %if %{with pgsql} | |
247 | %files pgsql | |
248 | %defattr(644,root,root,755) | |
d182db3c | 249 | %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}} |
98d4fb76 | 250 | %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so |
6df27f77 AF |
251 | %endif |
252 | ||
253 | %if %{with sqlite} | |
254 | %files sqlite | |
255 | %defattr(644,root,root,755) | |
d182db3c | 256 | %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}} |
98d4fb76 | 257 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so |
6df27f77 | 258 | %endif |
ba1fccd8 JB |
259 | |
260 | %if %{with sqlite3} | |
261 | %files sqlite3 | |
262 | %defattr(644,root,root,755) | |
d182db3c | 263 | %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}} |
98d4fb76 | 264 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so |
ba1fccd8 | 265 | %endif |