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