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