]> git.pld-linux.org Git - packages/libgda3.git/blob - libgda3.spec
4c82e95a3fc3baf4ef94870220485f71ccecb729
[packages/libgda3.git] / libgda3.spec
1 #
2 # TODO: package dotnet-gda-sharp
3 #       resolve libgda-sqlite.la dependency     
4 #
5 # Conditional build:
6 %bcond_without  doc             # don't generate html documentation
7 %bcond_without  static_libs     # don't build static libraries
8 %bcond_with     gamin           # use gamin instead of fam library
9 #
10 %bcond_without  firebird        # build without firebird plugin
11 %bcond_without  freetds         # build without freetds plugin
12 %bcond_without  ldap            # build without ldap plugin
13 %bcond_without  mdb             # build without MDB plugin
14 %bcond_without  mysql           # build without MySQL plugin
15 %bcond_without  odbc            # build without unixODBC
16 %bcond_without  pgsql           # build without PostgreSQL plugin
17 %bcond_without  sqlite          # build without sqlite plugin
18 %bcond_without  xbase           # build without xbase plugin
19 #
20 %ifnarch %{ix86} sparc sparcv9 alpha
21 %undefine       with_firebird
22 %endif
23 Summary:        GNU Data Access library
24 Summary(pl.UTF-8):   Biblioteka GNU Data Access
25 Name:           libgda3
26 Version:        3.1.1
27 Release:        0.1
28 License:        LGPL v2/GPL v2
29 Group:          Applications/Databases
30 Source0:        http://ftp.gnome.org/pub/gnome/sources/libgda/3.1/libgda-%{version}.tar.bz2
31 # Source0-md5:  1e56331d2b69094312f1f011bd45177f
32 Patch0:         %{name}-mdb.patch
33 Patch1:         %{name}-configure.patch
34 Patch2:         %{name}-firebird.patch
35 URL:            http://www.gnome-db.org/
36 %{?with_firebird:BuildRequires: Firebird-devel}
37 BuildRequires:  autoconf >= 2.59
38 BuildRequires:  automake >= 1:1.8
39 BuildRequires:  bison
40 BuildRequires:  db-devel
41 %{!?with_gamin:BuildRequires:   fam-devel}
42 BuildRequires:  flex
43 %{?with_freetds:BuildRequires:  freetds-devel >= 0.64}
44 %{?with_gamin:BuildRequires:    gamin-devel}
45 BuildRequires:  glib2-devel >= 1:2.12.0
46 BuildRequires:  gnome-common >= 2.12.0
47 BuildRequires:  gtk-doc >= 1.6
48 BuildRequires:  intltool >= 0.35
49 BuildRequires:  libtool
50 BuildRequires:  libxml2-devel >= 1:.2.6.26
51 BuildRequires:  libxslt-devel >= 1.1.17
52 %{?with_mdb:BuildRequires:      mdbtools-devel >= 0.6}
53 %{?with_mysql:BuildRequires:    mysql-devel}
54 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
55 BuildRequires:  perl-base
56 BuildRequires:  popt-devel
57 %{?with_pgsql:BuildRequires:    postgresql-devel}
58 BuildRequires:  readline-devel >= 5.0
59 BuildRequires:  rpmbuild(macros) >= 1.213
60 #%{?with_sqlite:BuildRequires:  sqlite3-devel >= 3.3.100}
61 %{?with_odbc:BuildRequires:     unixODBC-devel}
62 %{?with_xbase:BuildRequires:    xbase-devel >= 2.0.0}
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 #%define                _libgdadir      libgda-%(echo %{version} | cut -d '.' -f 1-2 )
66 %define         _libgdadir      libgda-3.0
67 %define         _providersdir   %{_libdir}/%{_libgdadir}/providers
68
69 %description
70 GNU Data Access is an attempt to provide uniform access to different
71 kinds of data sources (databases, information servers, mail spools,
72 etc). It is a complete architecture that provides all you need to
73 access your data.
74
75 libgda was part of the GNOME-DB project but has been separated from it
76 to allow non-GNOME applications to be developed based on it.
77
78 %description -l pl.UTF-8
79 GNU Data Access to próba zapewnienia jednolitego dostępu do różnych
80 źródeł danych (bazy danych, serwery informacji, katalogi z pocztą
81 itp.). Jest kompletną architekturą dostarczającą wszystko, czego
82 potrzebujesz do dostępu do danych.
83
84 libgda była częścią projektu GNOME-DB, ale została wydzielona, aby
85 pozwolić na używanie przez niegnomowe aplikacje.
86
87 %package devel
88 Summary:        GNU Data Access development
89 Summary(pl.UTF-8):   Dla programistów GNU Data Access
90 Group:          Development/Libraries
91 Requires:       %{name} = %{version}-%{release}
92 %{!?with_gamin:Requires:        fam-devel}
93 %{?with_gamin:Requires: gamin-devel}
94 Requires:       glib2-devel >= 1:2.12.0
95 Requires:       gtk-doc-common
96 Requires:       libxml2-devel >= 1:2.6.26
97 Requires:       libxslt-devel >= 1.1.17
98 Obsoletes:      libgda0-devel
99
100 %description devel
101 GNU Data Access is an attempt to provide uniform access to different
102 kinds of data sources (databases, information servers, mail spools,
103 etc). It is a complete architecture that provides all you need to
104 access your data. This subpackage contains development files.
105
106 %description devel -l pl.UTF-8
107 GNU Data Access to próba zapewnienia jednolitego dostępu do różnych
108 źródeł danych (bazy danych, serwery informacji, katalogi z pocztą
109 itp.). Jest kompletną architekturą dostarczającą wszystko, czego
110 potrzebujesz do dostępu do danych. Ten podpakiet zawiera pliki dla
111 programistów używających libgda.
112
113 %package static
114 Summary:        GNU Data Access static libraries
115 Summary(pl.UTF-8):   Statyczne biblioteki GNU Data Access
116 Group:          Development/Libraries
117 Requires:       %{name}-devel = %{version}-%{release}
118
119 %description static
120 GNU Data Access static libraries.
121
122 %description static -l pl.UTF-8
123 Statyczne biblioteki GNU Data Access.
124
125 %package provider-db
126 Summary:        GDA Berkeley DB provider
127 Summary(pl.UTF-8):   Źródło danych Berkeley DB dla GDA
128 Group:          Applications/Databases
129 Requires:       %{name} = %{version}-%{release}
130
131 %description provider-db
132 This package contains the GDA Berkeley DB provider.
133
134 %description provider-db -l pl.UTF-8
135 Pakiet dostaczający dane z Berkeley DB dla GDA.
136
137 %package provider-firebird
138 Summary:        GDA Firebird provider
139 Summary(pl.UTF-8):   Źródło danych Firebird dla GDA
140 Group:          Applications/Databases
141 Requires:       %{name} = %{version}-%{release}
142
143 %description provider-firebird
144 This package contains the GDA Firebird provider.
145
146 %description provider-firebird -l pl.UTF-8
147 Pakiet dostarczający dane z Firebird dla GDA.
148
149 %package provider-freetds
150 Summary:        GDA FreeTDS provider
151 Summary(pl.UTF-8):   Źródło danych FreeTDS dla GDA
152 Group:          Applications/Databases
153 Requires:       %{name} = %{version}-%{release}
154
155 %description provider-freetds
156 This package contains the GDA FreeTDS provider.
157
158 %description provider-freetds -l pl.UTF-8
159 Pakiet dostarczający dane z FreeTDS dla GDA.
160
161 %package provider-ldap
162 Summary:        GDA LDAP provider
163 Summary(pl.UTF-8):   Źródło danych LDAP dla GDA
164 Group:          Applications/Databases
165 Requires:       %{name} = %{version}-%{release}
166
167 %description provider-ldap
168 This package contains the GDA LDAP provider.
169
170 %description provider-ldap -l pl.UTF-8
171 Pakiet dostarczający dane z LDAP dla GDA
172
173 %package provider-mdb
174 Summary:        GDA MDB provider
175 Summary(pl.UTF-8):   Źródło danych MDB
176 Group:          Applications/Databases
177 Requires:       %{name} = %{version}-%{release}
178 Requires:       mdbtools-libs >= 0.6
179
180 %description provider-mdb
181 This package contains the GDA MDB provider.
182
183 %description provider-mdb -l pl.UTF-8
184 Pakiet dostarczający dane z MDB dla GDA.
185
186 %package provider-mysql
187 Summary:        GDA MySQL provider
188 Summary(pl.UTF-8):   Źródło danych MySQL dla GDA
189 Group:          Applications/Databases
190 Requires:       %{name} = %{version}-%{release}
191 Obsoletes:      libgda-mysql0
192
193 %description provider-mysql
194 This package contains the GDA MySQL provider.
195
196 %description provider-mysql -l pl.UTF-8
197 Pakiet dostarczający dane z MySQL dla GDA.
198
199 %package provider-odbc
200 Summary:        GDA ODBC provider
201 Summary(pl.UTF-8):   Źródło danych ODBC dla GDA
202 Group:          Applications/Databases
203 Requires:       %{name} = %{version}-%{release}
204
205 %description provider-odbc
206 This package contains the GDA ODBC provider.
207
208 %description provider-odbc -l pl.UTF-8
209 Pakiet dostarczający dane z ODBC dla GDA.
210
211 %package provider-postgres
212 Summary:        GDA PostgreSQL provider
213 Summary(pl.UTF-8):   Źródło danych PostgreSQL dla GDA
214 Group:          Applications/Databases
215 Requires:       %{name} = %{version}-%{release}
216 Obsoletes:      libgda-postgres0
217
218 %description provider-postgres
219 This package contains the GDA PostgreSQL provider.
220
221 %description provider-postgres -l pl.UTF-8
222 Pakiet dostarczający dane z PostgreSQL dla GDA.
223
224 %package provider-sqlite
225 Summary:        GDA SQLite provider
226 Summary(pl.UTF-8):   Źródło danych SQLite dla GDA
227 Group:          Applications/Databases
228 Requires:       %{name} = %{version}-%{release}
229
230 %description provider-sqlite
231 This package contains the GDA SQLite provider.
232
233 %description provider-sqlite -l pl.UTF-8
234 Pakiet dostarczający dane z SQLite dla GDA.
235
236 %package provider-xbase
237 Summary:        GDA xBase provider
238 Summary(pl.UTF-8):   Źródło danych xBase dla GDA
239 Group:          Applications/Databases
240 Requires:       %{name} = %{version}-%{release}
241
242 %description provider-xbase
243 This package contains the GDA xBase (dBase, Clipper, FoxPro) provider.
244
245 %description provider-xbase -l pl.UTF-8
246 Pakiet dostarczający dane z xBase (dBase, Clippera, FoxPro) dla GDA.
247
248 %prep
249 %setup -q -n libgda-%{version}
250 %patch0 -p1
251 %patch1 -p1
252 %patch2 -p1
253
254 %if ! %{with gamin}
255 sed -i -e 's#\(PKG_CHECK_MODULES(GAMIN.*\)#dnl \1#g' configure.in
256 %endif
257
258 %build
259 CXXFLAGS="%{rpmcxxflags} -fno-rtti -fno-exceptions"
260 %{__intltoolize}
261 %{__libtoolize}
262 %{__aclocal}
263 %{__autoconf}
264 %{__automake}
265 %configure \
266         %{?with_doc:--enable-gtk-doc} \
267         %{!?with_static_libs:--enable-static=no} \
268         --with-html-dir=%{_gtkdocdir} \
269         --with%{!?with_firebird:out}-firebird \
270         --with%{!?with_ldap:out}-ldap \
271         --with%{!?with_mdb:out}-mdb \
272         --with%{!?with_mysql:out}-mysql \
273         --with%{!?with_odbc:out}-odbc \
274         --with%{!?with_pgsql:out}-postgres \
275         --with%{!?with_sqlite:out}-sqlite \
276         --with%{!?with_freetds:out}-tds \
277         --with%{!?with_xbase:out}-xbase \
278         --without-oracle
279 %{__make} -j1
280
281 %install
282 rm -rf $RPM_BUILD_ROOT
283
284 %{__make} install \
285         DESTDIR=$RPM_BUILD_ROOT \
286         HTML_DIR=%{_gtkdocdir}
287
288 # modules dlopened by *.so through libgmodule
289 # Needs to resolve problem with libgda-sqlite.la
290 # rm -f $RPM_BUILD_ROOT%{_providersdir}/*.{a,la}
291 rm -f $RPM_BUILD_ROOT%{_providersdir}/*.a
292
293 rm -r $RPM_BUILD_ROOT%{_datadir}/locale/no
294
295 %find_lang libgda-3.0
296
297 %clean
298 rm -rf $RPM_BUILD_ROOT
299
300 %post   -p /sbin/ldconfig
301 %postun -p /sbin/ldconfig
302
303 %files -f libgda-3.0.lang
304 %defattr(644,root,root,755)
305 %doc AUTHORS ChangeLog NEWS README
306 %attr(755,root,root) %{_bindir}/gda-config-tool-3.0
307 %attr(755,root,root) %{_libdir}/libgda-3.0.so.*.*.*
308 %attr(755,root,root) %{_libdir}/libgda-report-3.0.so.*.*.*
309 %attr(755,root,root) %{_libdir}/libgdasql-3.0.so.*.*.*
310 %dir %{_libdir}/%{_libgdadir}
311 %dir %{_providersdir}
312 %{_datadir}/libgda-3.0
313 %dir %{_sysconfdir}/libgda-3.0
314 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libgda-3.0/config
315 %{_mandir}/man1/gda-config-tool-3.0.1*
316 %{_mandir}/man5/gda-config-3.0.5*
317
318 %files devel
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_bindir}/gda-author-dict-file-3.0
321 %attr(755,root,root) %{_bindir}/gda-bdb-test
322 %attr(755,root,root) %{_bindir}/gda-diagnose-3.0
323 %attr(755,root,root) %{_bindir}/gda-inspect-dict-file-3.0
324 %attr(755,root,root) %{_bindir}/gda-list-config-3.0
325 #%attr(755,root,root) %{_bindir}/gda-report-test-3.0
326 #%attr(755,root,root) %{_bindir}/gda-run-3.0
327 %attr(755,root,root) %{_bindir}/gda-sql-3.0
328 %attr(755,root,root) %{_bindir}/gda-test-connection-3.0
329 %attr(755,root,root) %{_libdir}/libgda-3.0.so
330 %attr(755,root,root) %{_libdir}/libgda-report-3.0.so
331 %attr(755,root,root) %{_libdir}/libgda-virtual-3.0.so
332 %attr(755,root,root) %{_libdir}/libgdasql-3.0.so
333 %{_libdir}/libgda-3.0.la
334 %{_libdir}/libgda-report-3.0.la
335 %{_libdir}/libgdasql-3.0.la
336 %{_libdir}/libgda-virtual-3.0.la
337 %{_includedir}/libgda-3.0
338 %{_pkgconfigdir}/libgda-3.0.pc
339 %{_pkgconfigdir}/libgda-*-3.0.pc
340 %{?with_doc:%{_gtkdocdir}/libgda-3.0}
341 %{_sysconfdir}/libgda-3.0/sales_test.db
342
343 %if %{with static_libs}
344 %files static
345 %defattr(644,root,root,755)
346 %{_libdir}/libgda-3.0.a
347 %{_libdir}/libgda-report-3.0.a
348 %{_libdir}/libgdasql-3.0.a
349 %{_libdir}/libgda-virtual-3.0.a
350 %endif
351
352 %files provider-db
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_providersdir}/libgda-bdb.so
355
356 %if %{with firebird}
357 %files provider-firebird
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_providersdir}/libgda-firebird.so
360 %endif
361
362 %if %{with freetds}
363 %files provider-freetds
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_providersdir}/libgda-freetds.so
366 %endif
367
368 %if %{with ldap}
369 %files provider-ldap
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{_providersdir}/libgda-ldap.so
372 %endif
373
374 %if %{with mdb}
375 %files provider-mdb
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_providersdir}/libgda-mdb.so
378 %endif
379
380 %if %{with mysql}
381 %files provider-mysql
382 %defattr(644,root,root,755)
383 %attr(755,root,root) %{_providersdir}/libgda-mysql.so
384 %endif
385
386 %if %{with odbc}
387 %files provider-odbc
388 %defattr(644,root,root,755)
389 %attr(755,root,root) %{_providersdir}/libgda-odbc.so
390 %endif
391
392 %if %{with pgsql}
393 %files provider-postgres
394 %defattr(644,root,root,755)
395 %attr(755,root,root) %{_providersdir}/libgda-postgres.so
396 %endif
397
398 %if %{with sqlite}
399 %files provider-sqlite
400 %defattr(644,root,root,755)
401 %attr(755,root,root) %{_providersdir}/libgda-sqlite.so
402 %{_providersdir}/libgda-sqlite.la
403 %endif
404
405 %if %{with xbase}
406 %files provider-xbase
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{_providersdir}/libgda-xbase.so
409 %endif
This page took 0.091227 seconds and 2 git commands to generate.