]> git.pld-linux.org Git - packages/libdbi-drivers.git/blob - libdbi-drivers.spec
- fix 64bit build; stbr th
[packages/libdbi-drivers.git] / libdbi-drivers.spec
1 # TODO: ingres, msql, oracle
2 #
3 # Conditional build:
4 %bcond_without  firebird        # don't build Firebird driver
5 %bcond_without  freetds         # don't build FreeTDS driver
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
10 #
11 %define dbiver  0.8.3
12 Summary:        Database Independent Abstraction Layer for C
13 Summary(pl.UTF-8):      Warstwa DBI dla C
14 Name:           libdbi-drivers
15 Version:        0.8.3
16 Release:        1
17 License:        LGPL v2+
18 Group:          Libraries
19 Source0:        http://dl.sourceforge.net/libdbi-drivers/libdbi-drivers-%{version}-1.tar.gz
20 # Source0-md5:  4de79b323162a5a7652b65b608eca6cd
21 Patch0:         %{name}-opt.patch
22 URL:            http://libdbi-drivers.sourceforge.net/
23 %{?with_firebird:BuildRequires: Firebird-devel}
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 %{?with_freetds:BuildRequires:  freetds-devel}
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}
32 %{?with_sqlite3:BuildRequires:  sqlite3-devel}
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
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.
46
47 %package firebird
48 Summary:        Firebird plugin for libdbi
49 Summary(pl.UTF-8):      Wtyczka Firebird dla libdbi
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
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.
64
65 %package freetds
66 Summary:        FreeTDS plugin for libdbi
67 Summary(pl.UTF-8):      Wtyczka FreeTDS dla libdbi
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
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.
82
83 %package mysql
84 Summary:        MySQL plugin for libdbi
85 Summary(pl.UTF-8):      Wtyczka MySQL dla libdbi
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
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.
101
102 %package pgsql
103 Summary:        PostgreSQL plugin for libdbi
104 Summary(pl.UTF-8):      Wtyczka PostgreSQL dla libdbi
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
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.
120
121 %package sqlite
122 Summary:        SQLite plugin for libdbi
123 Summary(pl.UTF-8):      Wtyczka SQLite dla libdbi
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
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.
138
139 %package sqlite3
140 Summary:        SQLite3 plugin for libdbi
141 Summary(pl.UTF-8):      Wtyczka SQLite3 dla libdbi
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
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.
155
156 %prep
157 %setup -q -n %{name}-%{version}-1
158 %patch0 -p1
159
160 %build
161 %{__libtoolize}
162 %{__aclocal}
163 %{__autoconf}
164 %{__autoheader}
165 %{__automake}
166 %configure \
167         --disable-static \
168 %if %{with firebird}
169         --with-firebird \
170         --with-firebird-libdir=%{_libdir} \
171         --with-firebird-incdir=%{_includedir} \
172 %endif
173 %if %{with freetds}
174         --with-freetds \
175         --with-freetds-libdir=%{_libdir} \
176         --with-freetds-incdir=%{_includedir} \
177 %endif
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} \
186         --with-pgsql-incdir=%{_includedir} \
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} \
197 %endif
198         --with-dbi-incdir=%{_includedir} \
199         --with-dbi-libdir=%{_libdir}
200 %{__make}
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204 install -d $RPM_BUILD_ROOT%{_libdir}/dbd
205
206 %{__make} install \
207         DESTDIR=$RPM_BUILD_ROOT
208
209 rm -f $RPM_BUILD_ROOT%{_libdir}/dbd/lib*.la
210
211 %clean
212 rm -rf $RPM_BUILD_ROOT
213
214 #%files common
215 #%doc AUTHORS ChangeLog NEWS README README.encodings TODO
216
217 %if %{with firebird}
218 %files firebird
219 %defattr(644,root,root,755)
220 %doc drivers/firebird/{AUTHORS,README,TODO,dbd_firebird}
221 %attr(755,root,root) %{_libdir}/dbd/libdbdfirebird.so
222 %endif
223
224 %if %{with freetds}
225 %files freetds
226 %defattr(644,root,root,755)
227 %doc drivers/freetds/README
228 %attr(755,root,root) %{_libdir}/dbd/libdbdfreetds.so
229 %endif
230
231 %if %{with mysql}
232 %files mysql
233 %defattr(644,root,root,755)
234 %doc drivers/mysql/{AUTHORS,README,TODO,dbd_mysql.pdf,dbd_mysql}
235 %attr(755,root,root) %{_libdir}/dbd/libdbdmysql.so
236 %endif
237
238 %if %{with pgsql}
239 %files pgsql
240 %defattr(644,root,root,755)
241 %doc drivers/pgsql/{AUTHORS,README,TODO,dbd_pgsql.pdf,dbd_pgsql}
242 %attr(755,root,root) %{_libdir}/dbd/libdbdpgsql.so
243 %endif
244
245 %if %{with sqlite}
246 %files sqlite
247 %defattr(644,root,root,755)
248 %doc drivers/sqlite/{AUTHORS,README,TODO,dbd_sqlite.pdf,dbd_sqlite}
249 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite.so
250 %endif
251
252 %if %{with sqlite3}
253 %files sqlite3
254 %defattr(644,root,root,755)
255 %doc drivers/sqlite3/{AUTHORS,README,TODO,dbd_sqlite3.pdf,dbd_sqlite3}
256 %attr(755,root,root) %{_libdir}/dbd/libdbdsqlite3.so
257 %endif
This page took 0.096346 seconds and 4 git commands to generate.