]> git.pld-linux.org Git - packages/libgda3.git/blob - libgda3.spec
58712dfffefc52d64bd8f8ee6add4e3e1ba3b358
[packages/libgda3.git] / libgda3.spec
1 # TODO: ibmdb2 provider
2 #
3 # Conditional build:
4 %bcond_without  apidocs         # API documentation build
5 %bcond_without  static_libs     # static libraries build
6 %bcond_with     gamin           # use gamin instead of fam library
7 %bcond_without  gnomevfs        # gnome-vfs support
8 %bcond_without  gnome           # (convenience alias for gnomevfs)
9 # - database plugins:
10 %bcond_without  firebird        # Firebird plugin
11 %bcond_with     freetds         # FreeTDS plugin
12 %bcond_without  ldap            # LDAP plugin
13 %bcond_without  mdb             # MDB plugin
14 %bcond_without  mysql           # MySQL plugin
15 %bcond_with     oci             # Oracle DB plugin
16 %bcond_without  odbc            # unixODBC plugin
17 %bcond_without  pgsql           # PostgreSQL plugin
18 %bcond_without  sqlite          # SQLite plugin
19 %bcond_without  sybase          # sybase plugin
20 %bcond_without  xbase           # xbase plugin
21
22 %if %{without gnome}
23 %undefine       with_gnomevfs
24 %endif
25 %ifnarch %{ix86} sparc sparcv9 alpha
26 %undefine       with_firebird
27 %endif
28 Summary:        GNU Data Access library
29 Summary(pl.UTF-8):      Biblioteka GNU Data Access
30 Name:           libgda3
31 Version:        3.1.5
32 Release:        21
33 License:        LGPL v2+/GPL v2+
34 Group:          Libraries
35 Source0:        https://download.gnome.org/sources/libgda/3.1/libgda-%{version}.tar.bz2
36 # Source0-md5:  eb7da5286a112e7cff3111c89fba4456
37 Patch0:         %{name}-configure.patch
38 Patch1:         %{name}-am.patch
39 Patch2:         glib232.patch
40 Patch3:         format-security.patch
41 Patch4:         mdb-0.7.patch
42 Patch5:         x32.patch
43 Patch6:         libgda-mdb1.0.patch
44 URL:            https://www.gnome-db.org/
45 %{?with_firebird:BuildRequires: Firebird-devel}
46 BuildRequires:  autoconf >= 2.59
47 BuildRequires:  automake >= 1:1.8
48 BuildRequires:  bison
49 BuildRequires:  db-devel
50 BuildRequires:  docbook-dtd412-xml
51 %{!?with_gamin:BuildRequires:   fam-devel}
52 BuildRequires:  flex
53 %{?with_freetds:BuildRequires:  freetds-devel = 0.64}
54 %{?with_sybase:BuildRequires:   freetds-devel >= 0.82}
55 %{?with_gamin:BuildRequires:    gamin-devel >= 0.1.8}
56 BuildRequires:  gettext-tools
57 BuildRequires:  glib2-devel >= 1:2.12.0
58 BuildRequires:  gnome-common >= 2.12.0
59 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.20}
60 BuildRequires:  gtk-doc >= 1.6
61 BuildRequires:  intltool >= 0.35.5
62 BuildRequires:  libgcrypt-devel >= 1.1.42
63 BuildRequires:  libtool
64 BuildRequires:  libxml2-devel >= 1:2.6.26
65 BuildRequires:  libxslt-devel >= 1.1.17
66 %{?with_mdb:BuildRequires:      mdbtools-devel >= 0.6}
67 %{?with_mysql:BuildRequires:    mysql-devel}
68 %{?with_ldap:BuildRequires:     openldap-devel >= 2.4.6}
69 %{?with_oci:BuildRequires:      oracle-instantclient-devel}
70 BuildRequires:  perl-base
71 BuildRequires:  pkgconfig
72 BuildRequires:  popt-devel
73 %{?with_pgsql:BuildRequires:    postgresql-devel}
74 BuildRequires:  readline-devel >= 5.0
75 BuildRequires:  rpm-build >= 4.6
76 BuildRequires:  rpmbuild(macros) >= 1.213
77 %{?with_sqlite:BuildRequires:   sqlite3-devel >= 3.5.0-2}
78 %{?with_odbc:BuildRequires:     unixODBC-devel}
79 %{?with_xbase:BuildRequires:    xbase-devel >= 2.0.0}
80 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81
82 %define         libgdadir       libgda-3.0
83 %define         providersdir    %{_libdir}/%{libgdadir}/providers
84
85 %description
86 GNU Data Access is an attempt to provide uniform access to different
87 kinds of data sources (databases, information servers, mail spools,
88 etc). It is a complete architecture that provides all you need to
89 access your data.
90
91 libgda was part of the GNOME-DB project but has been separated from it
92 to allow non-GNOME applications to be developed based on it.
93
94 %description -l pl.UTF-8
95 GNU Data Access to próba zapewnienia jednolitego dostępu do różnych
96 źródeł danych (bazy danych, serwery informacji, katalogi z pocztą
97 itp.). Jest kompletną architekturą dostarczającą wszystko, czego
98 potrzebujesz do dostępu do danych.
99
100 libgda była częścią projektu GNOME-DB, ale została wydzielona, aby
101 pozwolić na używanie przez niegnomowe aplikacje.
102
103 %package devel
104 Summary:        GNU Data Access development files
105 Summary(pl.UTF-8):      Pliki programistyczne biblioteki GNU Data Access
106 Group:          Development/Libraries
107 Requires:       %{name} = %{version}-%{release}
108 %{!?with_gamin:Requires:        fam-devel}
109 %{?with_gamin:Requires: gamin-devel >= 0.1.8}
110 Requires:       glib2-devel >= 1:2.12.0
111 %{?with_gnomevfs:Requires:      gnome-vfs2-devel >= 2.20}
112 Requires:       libgcrypt-devel >= 1.1.42
113 Requires:       libxml2-devel >= 1:2.6.26
114 Requires:       libxslt-devel >= 1.1.17
115 Obsoletes:      libgda0-devel
116
117 %description devel
118 GNU Data Access is an attempt to provide uniform access to different
119 kinds of data sources (databases, information servers, mail spools,
120 etc). It is a complete architecture that provides all you need to
121 access your data. This subpackage contains development files.
122
123 %description devel -l pl.UTF-8
124 GNU Data Access to próba zapewnienia jednolitego dostępu do różnych
125 źródeł danych (bazy danych, serwery informacji, katalogi z pocztą
126 itp.). Jest kompletną architekturą dostarczającą wszystko, czego
127 potrzebujesz do dostępu do danych. Ten podpakiet zawiera pliki dla
128 programistów używających libgda.
129
130 %package static
131 Summary:        GNU Data Access static libraries
132 Summary(pl.UTF-8):      Statyczne biblioteki GNU Data Access
133 Group:          Development/Libraries
134 Requires:       %{name}-devel = %{version}-%{release}
135
136 %description static
137 GNU Data Access static libraries.
138
139 %description static -l pl.UTF-8
140 Statyczne biblioteki GNU Data Access.
141
142 %package apidocs
143 Summary:        GNU Data Access API documentation
144 Summary(pl.UTF-8):      Dokumentacja API GNU Data Access
145 Group:          Documentation
146 Requires:       gtk-doc-common
147 BuildArch:      noarch
148
149 %description apidocs
150 GNU Data Access API documentation.
151
152 %description apidocs -l pl.UTF-8
153 Dokumentacja API GNU Data Access.
154
155 %package provider-db
156 Summary:        GDA Berkeley DB provider
157 Summary(pl.UTF-8):      Źródło danych Berkeley DB dla GDA
158 Group:          Libraries
159 Requires:       %{name} = %{version}-%{release}
160
161 %description provider-db
162 This package contains the GDA Berkeley DB provider.
163
164 %description provider-db -l pl.UTF-8
165 Pakiet dostarczający dane z Berkeley DB dla GDA.
166
167 %package provider-firebird
168 Summary:        GDA Firebird provider
169 Summary(pl.UTF-8):      Źródło danych Firebird dla GDA
170 Group:          Libraries
171 Requires:       %{name} = %{version}-%{release}
172
173 %description provider-firebird
174 This package contains the GDA Firebird provider.
175
176 %description provider-firebird -l pl.UTF-8
177 Pakiet dostarczający dane z Firebird dla GDA.
178
179 %package provider-freetds
180 Summary:        GDA FreeTDS provider
181 Summary(pl.UTF-8):      Źródło danych FreeTDS dla GDA
182 Group:          Libraries
183 Requires:       %{name} = %{version}-%{release}
184
185 %description provider-freetds
186 This package contains the GDA FreeTDS provider.
187
188 %description provider-freetds -l pl.UTF-8
189 Pakiet dostarczający dane z FreeTDS dla GDA.
190
191 %package provider-ldap
192 Summary:        GDA LDAP provider
193 Summary(pl.UTF-8):      Źródło danych LDAP dla GDA
194 Group:          Libraries
195 Requires:       %{name} = %{version}-%{release}
196
197 %description provider-ldap
198 This package contains the GDA LDAP provider.
199
200 %description provider-ldap -l pl.UTF-8
201 Pakiet dostarczający dane z LDAP dla GDA.
202
203 %package provider-mdb
204 Summary:        GDA MDB provider
205 Summary(pl.UTF-8):      Źródło danych MDB
206 Group:          Libraries
207 Requires:       %{name} = %{version}-%{release}
208 Requires:       mdbtools-libs >= 0.6
209
210 %description provider-mdb
211 This package contains the GDA MDB provider.
212
213 %description provider-mdb -l pl.UTF-8
214 Pakiet dostarczający dane z MDB dla GDA.
215
216 %package provider-mysql
217 Summary:        GDA MySQL provider
218 Summary(pl.UTF-8):      Źródło danych MySQL dla GDA
219 Group:          Libraries
220 Requires:       %{name} = %{version}-%{release}
221 Obsoletes:      libgda-mysql0
222
223 %description provider-mysql
224 This package contains the GDA MySQL provider.
225
226 %description provider-mysql -l pl.UTF-8
227 Pakiet dostarczający dane z MySQL dla GDA.
228
229 %package provider-odbc
230 Summary:        GDA ODBC provider
231 Summary(pl.UTF-8):      Źródło danych ODBC dla GDA
232 Group:          Libraries
233 Requires:       %{name} = %{version}-%{release}
234
235 %description provider-odbc
236 This package contains the GDA ODBC provider.
237
238 %description provider-odbc -l pl.UTF-8
239 Pakiet dostarczający dane z ODBC dla GDA.
240
241 %package provider-oracle
242 Summary:        GDA Oracle provider
243 Summary(pl.UTF-8):      Źródło danych Oracle dla GDA
244 Group:          Libraries
245 Requires:       %{name} = %{version}-%{release}
246
247 %description provider-oracle
248 This package contains the GDA Oracle provider.
249
250 %description provider-oracle -l pl.UTF-8
251 Pakiet dostarczający dane z bazy Oracle dla GDA.
252
253 %package provider-postgres
254 Summary:        GDA PostgreSQL provider
255 Summary(pl.UTF-8):      Źródło danych PostgreSQL dla GDA
256 Group:          Libraries
257 Requires:       %{name} = %{version}-%{release}
258 Obsoletes:      libgda-postgres0
259
260 %description provider-postgres
261 This package contains the GDA PostgreSQL provider.
262
263 %description provider-postgres -l pl.UTF-8
264 Pakiet dostarczający dane z PostgreSQL dla GDA.
265
266 %package provider-sqlite
267 Summary:        GDA SQLite provider
268 Summary(pl.UTF-8):      Źródło danych SQLite dla GDA
269 Group:          Libraries
270 Requires:       %{name} = %{version}-%{release}
271
272 %description provider-sqlite
273 This package contains the GDA SQLite provider.
274
275 %description provider-sqlite -l pl.UTF-8
276 Pakiet dostarczający dane z SQLite dla GDA.
277
278 %package provider-sybase
279 Summary:        GDA Sybase provider
280 Summary(pl.UTF-8):      Źródło danych Sybase dla GDA
281 Group:          Libraries
282 Requires:       %{name} = %{version}-%{release}
283
284 %description provider-sybase
285 This package contains the GDA Sybase provider.
286
287 %description provider-sybase -l pl.UTF-8
288 Pakiet dostarczający dane z Sybase dla GDA.
289
290 %package provider-xbase
291 Summary:        GDA xBase provider
292 Summary(pl.UTF-8):      Źródło danych xBase dla GDA
293 Group:          Libraries
294 Requires:       %{name} = %{version}-%{release}
295
296 %description provider-xbase
297 This package contains the GDA xBase (dBase, Clipper, FoxPro) provider.
298
299 %description provider-xbase -l pl.UTF-8
300 Pakiet dostarczający dane z xBase (dBase, Clippera, FoxPro) dla GDA.
301
302 %prep
303 %setup -q -n libgda-%{version}
304 %patch0 -p1
305 %patch1 -p1
306 %patch2 -p1
307 %patch3 -p1
308 %patch4 -p1
309 %patch5 -p1
310 %patch6 -p1
311
312 %if %{without gamin}
313 %{__sed} -i -e 's#PKG_CHECK_MODULES(GAMIN.*)#have_fam=no#g' configure.in
314 %endif
315 %if %{without gnomevfs}
316 %{__sed} -i -e 's#PKG_CHECK_MODULES(GNOMEVFS.*)#have_gnomevfs=no#g' configure.in
317 %endif
318
319 # most of cases use common subset of ISO latin 1 and 2
320 # libgda-xslt code uses ISO latin 2
321 for f in \
322         libgda/gda-column.c \
323         libgda/gda-column.h \
324         libgda/gda-row.c \
325         libgda/sqlite/gda-sqlite.h \
326         libgda/sqlite/gda-sqlite-provider.c \
327         libgda/sqlite/gda-sqlite-provider.h \
328         libgda/sqlite/gda-sqlite-recordset.c \
329         libgda/sqlite/gda-sqlite-recordset.h \
330         libgda-xslt/sql_backend.c \
331         libgda-xslt/sql_exslt_internal.c \
332         libgda-xslt/sqlexslt.c \
333         providers/ldap/libmain.c \
334         ; do
335         iconv -f iso-8859-2 -t utf-8 "$f" -o "${f}.new"
336         %{__mv} "${f}.new" "$f"
337 done
338
339 %build
340 %{__gtkdocize}
341 %{__intltoolize}
342 %{__libtoolize}
343 %{__aclocal}
344 %{__autoconf}
345 %{__automake}
346 CXXFLAGS="%{rpmcxxflags} -fno-rtti -fno-exceptions"
347 %configure \
348         %{!?with_static_libs:--disable-static} \
349         %{?with_apidocs:--enable-gtk-doc} \
350         --with-html-dir=%{_gtkdocdir} \
351         --with-firebird%{!?with_firebird:=no} \
352         --with-ldap%{!?with_ldap:=no} \
353         --with-mdb%{!?with_mdb:=no} \
354         --with-mysql%{!?with_mysql:=no} \
355         --with-odbc%{!?with_odbc:=no} \
356         --with-oracle%{!?with_oci:=no} \
357         --with-postgres%{!?with_pgsql:=no} \
358         %{?with_sybase:--with-sybase=/usr} \
359         --with-tds%{!?with_freetds:=no} \
360         --with-xbase%{!?with_xbase:=no}
361 %{__make} -j1
362
363 %install
364 rm -rf $RPM_BUILD_ROOT
365
366 %{__make} install \
367         DESTDIR=$RPM_BUILD_ROOT \
368         HTML_DIR=%{_gtkdocdir}
369
370 # modules dlopened by *.so through libgmodule
371 %if %{with static_libs}
372 %{__rm} $RPM_BUILD_ROOT%{providersdir}/*.a
373 %endif
374 %{__rm} $RPM_BUILD_ROOT{%{providersdir},%{_libdir}}/*.la
375
376 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{sr@Latn,sr@latin}
377
378 %find_lang libgda-3.0
379
380 %clean
381 rm -rf $RPM_BUILD_ROOT
382
383 %post   -p /sbin/ldconfig
384 %postun -p /sbin/ldconfig
385
386 %files -f libgda-3.0.lang
387 %defattr(644,root,root,755)
388 %doc AUTHORS ChangeLog NEWS README
389 %attr(755,root,root) %{_bindir}/gda-config-tool-3.0
390 %attr(755,root,root) %{_bindir}/gda-list-server-op-3.0
391 %attr(755,root,root) %{_libdir}/libgda-3.0.so.*.*.*
392 %attr(755,root,root) %ghost %{_libdir}/libgda-3.0.so.3
393 %attr(755,root,root) %{_libdir}/libgda-report-3.0.so.*.*.*
394 %attr(755,root,root) %ghost %{_libdir}/libgda-report-3.0.so.3
395 %attr(755,root,root) %{_libdir}/libgda-xslt-3.0.so.*.*.*
396 %attr(755,root,root) %ghost %{_libdir}/libgda-xslt-3.0.so.0
397 %attr(755,root,root) %{_libdir}/libgdasql-3.0.so.*.*.*
398 %attr(755,root,root) %ghost %{_libdir}/libgdasql-3.0.so.3
399 %dir %{_libdir}/%{libgdadir}
400 %dir %{providersdir}
401 %dir %{_datadir}/libgda-3.0
402 %{_datadir}/libgda-3.0/dtd
403 %dir %{_sysconfdir}/libgda-3.0
404 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libgda-3.0/config
405 %{_mandir}/man1/gda-config-tool-3.0.1*
406 %{_mandir}/man5/gda-config-3.0.5*
407
408 %files devel
409 %defattr(644,root,root,755)
410 %attr(755,root,root) %{_bindir}/gda-author-dict-file-3.0
411 %attr(755,root,root) %{_bindir}/gda-bdb-test
412 %attr(755,root,root) %{_bindir}/gda-diagnose-3.0
413 %attr(755,root,root) %{_bindir}/gda-inspect-dict-file-3.0
414 %attr(755,root,root) %{_bindir}/gda-list-config-3.0
415 %attr(755,root,root) %{_bindir}/gda-sql-3.0
416 %attr(755,root,root) %{_bindir}/gda-test-connection-3.0
417 %attr(755,root,root) %{_libdir}/libgda-3.0.so
418 %attr(755,root,root) %{_libdir}/libgda-report-3.0.so
419 %attr(755,root,root) %{_libdir}/libgda-xslt-3.0.so
420 %attr(755,root,root) %{_libdir}/libgdasql-3.0.so
421 %{_includedir}/libgda-3.0
422 %{_pkgconfigdir}/libgda-3.0.pc
423 %{_pkgconfigdir}/libgda-*-3.0.pc
424 %{_sysconfdir}/libgda-3.0/sales_test.db
425
426 %if %{with static_libs}
427 %files static
428 %defattr(644,root,root,755)
429 %{_libdir}/libgda-3.0.a
430 %{_libdir}/libgda-report-3.0.a
431 %{_libdir}/libgda-xslt-3.0.a
432 %{_libdir}/libgdasql-3.0.a
433 %endif
434
435 %if %{with apidocs}
436 %files apidocs
437 %defattr(644,root,root,755)
438 %{_gtkdocdir}/libgda-3.0
439 %endif
440
441 %files provider-db
442 %defattr(644,root,root,755)
443 %attr(755,root,root) %{providersdir}/libgda-bdb.so
444 %{_datadir}/libgda-3.0/bdb_specs_*.xml
445
446 %if %{with firebird}
447 %files provider-firebird
448 %defattr(644,root,root,755)
449 %attr(755,root,root) %{providersdir}/libgda-firebird.so
450 %{_datadir}/libgda-3.0/firebird_specs_*.xml
451 %endif
452
453 %if %{with freetds}
454 %files provider-freetds
455 %defattr(644,root,root,755)
456 %attr(755,root,root) %{providersdir}/libgda-freetds.so
457 %{_datadir}/libgda-3.0/freetds_specs_*.xml
458 %endif
459
460 %if %{with ldap}
461 %files provider-ldap
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{providersdir}/libgda-ldap.so
464 %{_datadir}/libgda-3.0/ldap_specs_*.xml
465 %endif
466
467 %if %{with mdb}
468 %files provider-mdb
469 %defattr(644,root,root,755)
470 %attr(755,root,root) %{providersdir}/libgda-mdb.so
471 %{_datadir}/libgda-3.0/mdb_specs_*.xml
472 %endif
473
474 %if %{with mysql}
475 %files provider-mysql
476 %defattr(644,root,root,755)
477 %attr(755,root,root) %{providersdir}/libgda-mysql.so
478 %{_datadir}/libgda-3.0/mysql_specs_*.xml
479 %endif
480
481 %if %{with odbc}
482 %files provider-odbc
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{providersdir}/libgda-odbc.so
485 %{_datadir}/libgda-3.0/odbc_specs_*.xml
486 %endif
487
488 %if %{with oci}
489 %files provider-oracle
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{providersdir}/libgda-oracle.so
492 %{_datadir}/libgda-3.0/oracle_specs_*.xml
493 %endif
494
495 %if %{with pgsql}
496 %files provider-postgres
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{providersdir}/libgda-postgres.so
499 %{_datadir}/libgda-3.0/postgres_specs_*.xml
500 %endif
501
502 %if %{with sqlite}
503 %files provider-sqlite
504 %defattr(644,root,root,755)
505 %attr(755,root,root) %{providersdir}/libgda-sqlite.so
506 %{_datadir}/libgda-3.0/sqlite_specs_*.xml
507 %endif
508
509 %if %{with sybase}
510 %files provider-sybase
511 %defattr(644,root,root,755)
512 %attr(755,root,root) %{providersdir}/libgda-sybase.so
513 %{_datadir}/libgda-3.0/sybase_specs_*.xml
514 %endif
515
516 %if %{with xbase}
517 %files provider-xbase
518 %defattr(644,root,root,755)
519 %attr(755,root,root) %{providersdir}/libgda-xbase.so
520 %{_datadir}/libgda-3.0/xbase_specs_*.xml
521 %endif
This page took 0.118056 seconds and 4 git commands to generate.