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