]>
Commit | Line | Data |
---|---|---|
1b7a81ea AM |
1 | # TODO: |
2 | # - add support for ingres, msql, oracle | |
ebda6fef JB |
3 | # |
4 | # Conditional build: | |
ba1fccd8 | 5 | %bcond_without firebird # don't build Firebird driver |
3cf24870 | 6 | %bcond_without freetds # don't build FreeTDS driver |
ba1fccd8 JB |
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 | |
a15bcdf8 | 11 | %bcond_with doc # don't build documentation |
ebda6fef | 12 | # |
db92e756 | 13 | %define dbiver 0.9.0 |
6df27f77 | 14 | Summary: Database Independent Abstraction Layer for C |
e3ad3311 | 15 | Summary(pl.UTF-8): Warstwa DBI dla C |
6df27f77 | 16 | Name: libdbi-drivers |
76fbcf4f | 17 | %define _snap 20110117 |
db92e756 | 18 | Version: 0.9.0 |
4b3b489a | 19 | Release: 0.%{_snap}.2 |
a56b9ef1 | 20 | License: LGPL v2+ |
6df27f77 | 21 | Group: Libraries |
d182db3c MM |
22 | #Source0: http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz |
23 | Source0: %{name}-%{_snap}.tar.gz | |
76fbcf4f | 24 | # Source0-md5: e017f57cf6742a87bcac898e4d43ed26 |
db92e756 | 25 | Patch0: %{name}-sqlite3_libs.patch |
6df27f77 | 26 | URL: http://libdbi-drivers.sourceforge.net/ |
db92e756 JP |
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 | |
3cf24870 | 43 | %{?with_firebird:BuildRequires: Firebird-devel} |
6df27f77 AF |
44 | BuildRequires: autoconf |
45 | BuildRequires: automake | |
3cf24870 | 46 | %{?with_freetds:BuildRequires: freetds-devel} |
6df27f77 AF |
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} | |
ba1fccd8 | 52 | %{?with_sqlite3:BuildRequires: sqlite3-devel} |
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 AF |
121 | |
122 | %package pgsql | |
123 | Summary: PostgreSQL plugin for libdbi | |
e3ad3311 | 124 | Summary(pl.UTF-8): Wtyczka PostgreSQL dla libdbi |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 AF |
140 | |
141 | %package sqlite | |
142 | Summary: SQLite plugin for libdbi | |
e3ad3311 | 143 | Summary(pl.UTF-8): Wtyczka SQLite dla libdbi |
6df27f77 AF |
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 | ||
f92dac68 JR |
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. | |
6df27f77 | 158 | |
ba1fccd8 JB |
159 | %package sqlite3 |
160 | Summary: SQLite3 plugin for libdbi | |
e3ad3311 | 161 | Summary(pl.UTF-8): Wtyczka SQLite3 dla libdbi |
ba1fccd8 JB |
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 | ||
f92dac68 JR |
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. | |
ba1fccd8 | 175 | |
6df27f77 | 176 | %prep |
d182db3c | 177 | %setup -q -n %{name} |
ebda6fef | 178 | %patch0 -p1 |
6df27f77 AF |
179 | |
180 | %build | |
6df27f77 AF |
181 | %{__libtoolize} |
182 | %{__aclocal} | |
6df27f77 | 183 | %{__autoconf} |
a56b9ef1 JB |
184 | %{__autoheader} |
185 | %{__automake} | |
6df27f77 | 186 | %configure \ |
ebda6fef | 187 | --disable-static \ |
d182db3c | 188 | %{!?with_doc:--disable-docs} \ |
ba1fccd8 JB |
189 | %if %{with firebird} |
190 | --with-firebird \ | |
191 | --with-firebird-libdir=%{_libdir} \ | |
192 | --with-firebird-incdir=%{_includedir} \ | |
c6f89c5c | 193 | %endif |
3cf24870 JB |
194 | %if %{with freetds} |
195 | --with-freetds \ | |
196 | --with-freetds-libdir=%{_libdir} \ | |
197 | --with-freetds-incdir=%{_includedir} \ | |
198 | %endif | |
c6f89c5c | 199 | %if %{with mysql} |
451b8bc0 | 200 | --enable-mysql-threadsafe \ |
c6f89c5c JK |
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} \ | |
454bff6d | 208 | --with-pgsql-incdir=%{_includedir} \ |
ba1fccd8 JB |
209 | %endif |
210 | %if %{with sqlite} | |
211 | --with-sqlite \ | |
212 | --with-sqlite-libdir=%{_libdir} \ | |
213 | --with-sqlite-incdir=%{_includedir} \ | |
214 | %endif | |
d182db3c | 215 | %if %{with sqlite3} |
ba1fccd8 JB |
216 | --with-sqlite3 \ |
217 | --with-sqlite3-libdir=%{_libdir} \ | |
218 | --with-sqlite3-incdir=%{_includedir} \ | |
c6f89c5c | 219 | %endif |
bc8248b2 MM |
220 | --with-dbi-incdir=%{_includedir} \ |
221 | --with-dbi-libdir=%{_libdir} | |
6df27f77 AF |
222 | %{__make} |
223 | ||
224 | %install | |
225 | rm -rf $RPM_BUILD_ROOT | |
226 | install -d $RPM_BUILD_ROOT%{_libdir}/dbd | |
227 | ||
ebda6fef JB |
228 | %{__make} install \ |
229 | DESTDIR=$RPM_BUILD_ROOT | |
230 | ||
231 | rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la | |
db92e756 | 232 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc |
6df27f77 AF |
233 | |
234 | %clean | |
235 | rm -rf $RPM_BUILD_ROOT | |
236 | ||
a56b9ef1 JB |
237 | #%files common |
238 | #%doc AUTHORS ChangeLog NEWS README README.encodings TODO | |
239 | ||
3cf24870 | 240 | %if %{with firebird} |
ba1fccd8 JB |
241 | %files firebird |
242 | %defattr(644,root,root,755) | |
d182db3c | 243 | %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}} |
98d4fb76 | 244 | %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so |
ba1fccd8 JB |
245 | %endif |
246 | ||
3cf24870 JB |
247 | %if %{with freetds} |
248 | %files freetds | |
249 | %defattr(644,root,root,755) | |
a56b9ef1 | 250 | %doc drivers/freetds/README |
98d4fb76 | 251 | %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so |
3cf24870 JB |
252 | %endif |
253 | ||
6df27f77 AF |
254 | %if %{with mysql} |
255 | %files mysql | |
256 | %defattr(644,root,root,755) | |
d182db3c | 257 | %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}} |
98d4fb76 | 258 | %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so |
6df27f77 AF |
259 | %endif |
260 | ||
261 | %if %{with pgsql} | |
262 | %files pgsql | |
263 | %defattr(644,root,root,755) | |
d182db3c | 264 | %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}} |
98d4fb76 | 265 | %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so |
6df27f77 AF |
266 | %endif |
267 | ||
268 | %if %{with sqlite} | |
269 | %files sqlite | |
270 | %defattr(644,root,root,755) | |
d182db3c | 271 | %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}} |
98d4fb76 | 272 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so |
6df27f77 | 273 | %endif |
ba1fccd8 JB |
274 | |
275 | %if %{with sqlite3} | |
276 | %files sqlite3 | |
277 | %defattr(644,root,root,755) | |
d182db3c | 278 | %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}} |
98d4fb76 | 279 | %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so |
ba1fccd8 | 280 | %endif |