]> git.pld-linux.org Git - packages/libdbi-drivers.git/blob - libdbi-drivers.spec
d1664c17e985d4cae6b1fd4842d9cd9043570b7b
[packages/libdbi-drivers.git] / libdbi-drivers.spec
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_without  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}.1
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         --with-mysql \
201         --with-mysql-libdir=%{_libdir} \
202         --with-mysql-incdir=%{_includedir} \
203 %endif
204 %if %{with pgsql}
205         --with-pgsql \
206         --with-pgsql-libdir=%{_libdir} \
207         --with-pgsql-incdir=%{_includedir} \
208 %endif
209 %if %{with sqlite}
210         --with-sqlite \
211         --with-sqlite-libdir=%{_libdir} \
212         --with-sqlite-incdir=%{_includedir} \
213 %endif
214 %if %{with sqlite3}
215         --with-sqlite3 \
216         --with-sqlite3-libdir=%{_libdir} \
217         --with-sqlite3-incdir=%{_includedir} \
218 %endif
219         --with-dbi-incdir=%{_includedir} \
220         --with-dbi-libdir=%{_libdir}
221 %{__make}
222
223 %install
224 rm -rf $RPM_BUILD_ROOT
225 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
226
227 %{__make} install \
228         DESTDIR=$RPM_BUILD_ROOT
229
230 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
231 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
232
233 %clean
234 rm -rf $RPM_BUILD_ROOT
235
236 #%files common
237 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
238
239 %if %{with firebird}
240 %files firebird
241 %defattr(644,root,root,755)
242 %doc drivers/firebird/{AUTHORS,README,TODO%{?with_doc:,dbd_firebird}}
243 %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so
244 %endif
245
246 %if %{with freetds}
247 %files freetds
248 %defattr(644,root,root,755)
249 %doc drivers/freetds/README
250 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
251 %endif
252
253 %if %{with mysql}
254 %files mysql
255 %defattr(644,root,root,755)
256 %doc drivers/mysql/{AUTHORS,README,TODO%{?with_doc:,dbd_mysql.pdf,dbd_mysql}}
257 %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so
258 %endif
259
260 %if %{with pgsql}
261 %files pgsql
262 %defattr(644,root,root,755)
263 %doc drivers/pgsql/{AUTHORS,README,TODO%{?with_doc:,dbd_pgsql.pdf,dbd_pgsql}}
264 %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so
265 %endif
266
267 %if %{with sqlite}
268 %files sqlite
269 %defattr(644,root,root,755)
270 %doc drivers/sqlite/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite.pdf,dbd_sqlite}}
271 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so
272 %endif
273
274 %if %{with sqlite3}
275 %files sqlite3
276 %defattr(644,root,root,755)
277 %doc drivers/sqlite3/{AUTHORS,README,TODO%{?with_doc:,dbd_sqlite3.pdf,dbd_sqlite3}}
278 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so
279 %endif
This page took 0.035025 seconds and 2 git commands to generate.