3 %bcond_with java # build db-java
4 %bcond_without tcl # don't build Tcl bindings
5 %bcond_with pmutex # use POSIX mutexes (only process-private with linuxthreads)
6 %bcond_with nptl # use process-shared POSIX mutexes (NPTL provides full interface)
7 %bcond_with default_db # use this db as default system db
12 %{?with_nptl:%define with_pmutex 1}
13 Summary: Berkeley DB database library for C
14 Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
16 Version: %{ver}.%{patchlevel}
18 License: Sleepycat public license (GPL-like, see LICENSE)
20 #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
21 Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
22 # Source0-md5: cbc77517c9278cdb47613ce8cb55779f
23 %patchset_source -f http://download.oracle.com/berkeley-db/patches/db/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
24 Patch0: db-so-suffix.patch
25 Patch1: %{name}-amd64-fastmutex.patch
26 URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html
27 BuildRequires: autoconf
28 BuildRequires: automake
30 %{?with_java:BuildRequires: jdk}
31 BuildRequires: libstdc++-devel
32 BuildRequires: libtool
33 BuildRequires: rpmbuild(macros) >= 1.426
34 BuildRequires: sed >= 4.0
35 %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
36 %if %{with default_db}
37 Provides: db = %{version}-%{release}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %if %{without default_db}
43 %define _includedir %{_prefix}/include/db4.2
47 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
48 provides embedded database support for both traditional and
49 client/server applications. Berkeley DB is used by many applications,
50 including Python and Perl, so this should be installed on all systems.
52 %description -l pl.UTF-8
53 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
54 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
55 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
59 Summary: Header files for Berkeley database library
60 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 %if %{with default_db}
64 Provides: db-devel = %{version}-%{release}
70 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
71 provides embedded database support for both traditional and
72 client/server applications. Berkeley DB includes B+tree, Extended
73 Linear Hashing, Fixed and Variable-length record access methods,
74 transactions, locking, logging, shared memory caching and database
75 recovery. DB supports C, C++, Java and Perl APIs.
77 This package contains the header files, libraries, and documentation
78 for building programs which use Berkeley DB.
80 %description devel -l pl.UTF-8
81 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
82 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
83 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
84 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
85 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
86 dla C, C++, Javy i Perla.
88 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
89 programów używających Berkeley DB.
92 Summary: Static libraries for Berkeley database library
93 Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
94 Group: Development/Libraries
95 Requires: %{name}-devel = %{version}-%{release}
96 %if %{with default_db}
97 Provides: db-static = %{version}-%{release}
103 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
104 provides embedded database support for both traditional and
105 client/server applications. Berkeley DB includes B+tree, Extended
106 Linear Hashing, Fixed and Variable-length record access methods,
107 transactions, locking, logging, shared memory caching and database
108 recovery. DB supports C, C++, Java and Perl APIs.
110 This package contains the static libraries for building programs which
113 %description static -l pl.UTF-8
114 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
115 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
116 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
117 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
118 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
119 dla C, C++, Javy i Perla.
121 Ten pakiet zawiera statyczne biblioteki do budowania programów
122 używających Berkeley DB.
125 Summary: Berkeley database library for C++
126 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
128 %if %{with default_db}
129 Provides: db-cxx = %{version}-%{release}
134 Berkeley database library for C++.
136 %description cxx -l pl.UTF-8
137 Biblioteka baz danych Berkeley dla C++.
140 Summary: Header files for db-cxx library
141 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
142 Group: Development/Libraries
143 Requires: %{name}-cxx = %{version}-%{release}
144 Requires: %{name}-devel = %{version}-%{release}
145 %if %{with default_db}
146 Provides: db-cxx-devel = %{version}-%{release}
148 Conflicts: db-devel < 4.1.25-3
150 %description cxx-devel
151 Header files for db-cxx library.
153 %description cxx-devel -l pl.UTF-8
154 Pliki nagłówkowe biblioteki db-cxx.
157 Summary: Static version of db-cxx library
158 Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
159 Group: Development/Libraries
160 Requires: %{name}-cxx-devel = %{version}-%{release}
161 %if %{with default_db}
162 Provides: db-cxx-static = %{version}-%{release}
164 Conflicts: db-static < 4.2.50-1
166 %description cxx-static
167 Static version of db-cxx library.
169 %description cxx-static -l pl.UTF-8
170 Statyczna wersja biblioteki db-cxx.
173 Summary: Berkeley database library for Java
174 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
176 Requires: jpackage-utils
177 %if %{with default_db}
178 Provides: db-java = %{version}-%{release}
182 Berkeley database library for Java.
184 %description java -l pl.UTF-8
185 Biblioteka baz danych Berkeley dla Javy.
188 Summary: Development files for db-java library
189 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
190 Group: Development/Languages/Java
191 Requires: %{name}-java = %{version}-%{release}
192 %if %{with default_db}
193 Provides: db-java-devel = %{version}-%{release}
195 Conflicts: db-devel < 4.1.25-3
197 %description java-devel
198 Development files for db-java library.
200 %description java-devel -l pl.UTF-8
201 Pliki programistyczne biblioteki db-java.
204 Summary: Berkeley database library for Tcl
205 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
206 Group: Development/Languages/Tcl
208 %if %{with default_db}
209 Provides: db-tcl = %{version}-%{release}
214 Berkeley database library for Tcl.
216 %description tcl -l pl.UTF-8
217 Biblioteka baz danych Berkeley dla Tcl.
220 Summary: Development files for db-tcl library
221 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
222 Group: Development/Languages/Tcl
223 Requires: %{name}-tcl = %{version}-%{release}
224 %if %{with default_db}
225 Provides: db-tcl-devel = %{version}-%{release}
227 Conflicts: db-devel < 4.1.25-3
229 %description tcl-devel
230 Development files for db-tcl library.
232 %description tcl-devel -l pl.UTF-8
233 Pliki programistyczne biblioteki db-tcl.
236 Summary: Command line tools for managing Berkeley DB databases
237 Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
238 Group: Applications/Databases
239 Requires: %{name} = %{version}-%{release}
240 %if %{with default_db}
241 Provides: db-utils = %{version}-%{release}
246 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
247 provides embedded database support for both traditional and
248 client/server applications. Berkeley DB includes B+tree, Extended
249 Linear Hashing, Fixed and Variable-length record access methods,
250 transactions, locking, logging, shared memory caching and database
251 recovery. DB supports C, C++, Java and Perl APIs.
253 This package contains command line tools for managing Berkeley DB
256 %description utils -l pl.UTF-8
257 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
258 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
259 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
260 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
261 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
262 dla C, C++, Javy i Perla.
264 Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
268 %setup -q -n db-%{ver}
271 %patchset_patch 1 %{patchlevel}
277 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
282 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
283 cp -f /usr/share/automake/config.sub .
284 cp -f /usr/share/libtool/ltmain.sh .
288 cp -a build_unix build_unix.static
294 CFLAGS="%{rpmcflags}"
295 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
296 LDFLAGS="%{rpmldflags}"
297 export CC CXX CFLAGS CXXFLAGS LDFLAGS
304 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
307 # (temporarily?) disabled because of compilation errors:
310 %{__make} library_build
315 --prefix=%{_prefix} \
316 --libdir=%{_libdir} \
319 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
321 %{?with_tcl:--enable-tcl} \
322 %{?with_tcl:--with-tcl=/usr/lib} \
323 %{?with_java:--enable-java} \
327 %{__make} library_build \
328 TCFLAGS='-I$(builddir) -I%{_includedir}' \
329 LIBSO_LIBS="\$(LIBS)" \
330 LIBTSO_LIBS="\$(LIBS) -ltcl"
333 rm -rf $RPM_BUILD_ROOT
334 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
336 install -d $RPM_BUILD_ROOT%{_javadir}
339 %{__make} -C build_unix.static library_install \
340 DESTDIR=$RPM_BUILD_ROOT \
341 docdir=%{_docdir}/db-%{version}-docs \
342 includedir=%{_includedir}
344 %{__make} -C build_unix library_install \
345 DESTDIR=$RPM_BUILD_ROOT \
346 LIB_INSTALL_FILE_LIST="" \
347 docdir=%{_docdir}/db-%{version}-docs \
348 includedir=%{_includedir}
350 cd $RPM_BUILD_ROOT%{_libdir}
351 mv -f libdb.a libdb-4.2.a
352 mv -f libdb_cxx.a libdb_cxx-4.2.a
355 sed -i "s/old_library=''/old_library='libdb-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb-4.2.la
356 sed -i "s/old_library=''/old_library='libdb_cxx-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb_cxx-4.2.la
358 rm -f examples_c*/tags
359 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
360 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
362 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
363 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
366 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
367 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
368 mv $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}
370 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java
374 rm -rf $RPM_BUILD_ROOT
376 %post -p /sbin/ldconfig
377 %postun -p /sbin/ldconfig
379 %post tcl -p /sbin/ldconfig
380 %postun tcl -p /sbin/ldconfig
382 %post cxx -p /sbin/ldconfig
383 %postun cxx -p /sbin/ldconfig
386 %defattr(644,root,root,755)
388 %if %{with default_db}
389 %attr(755,root,root) /%{_lib}/libdb-4.2.so
391 %attr(755,root,root) %{_libdir}/libdb-4.2.so
393 %dir %{_docdir}/db-%{version}-docs
394 %{_docdir}/db-%{version}-docs/sleepycat
395 %{_docdir}/db-%{version}-docs/index.html
398 %defattr(644,root,root,755)
399 %{_libdir}/libdb-4.2.la
400 %if %{with default_db}
401 %attr(755,root,root) %{_libdir}/libdb-4.2.so
402 %attr(755,root,root) %{_libdir}/libdb4.so
403 %attr(755,root,root) %{_libdir}/libdb.so
404 %attr(755,root,root) %{_libdir}/libndbm.so
407 %{_libdir}/libndbm.la
412 %{_includedir}/db_185.h
413 %{_docdir}/db-%{version}-docs/api_c
414 %{_docdir}/db-%{version}-docs/images
415 %{_docdir}/db-%{version}-docs/ref
416 %{_examplesdir}/db-%{version}
419 %defattr(644,root,root,755)
420 %{_libdir}/libdb-4.2.a
423 %defattr(644,root,root,755)
424 %attr(755,root,root) %{_libdir}/libdb_cxx-4.2.so
427 %defattr(644,root,root,755)
428 %{_libdir}/libdb_cxx-4.2.la
429 %if %{with default_db}
430 %attr(755,root,root) %{_libdir}/libdb_cxx.so
431 %{_libdir}/libdb_cxx.la
433 %{_includedir}/db_cxx.h
434 %{_docdir}/db-%{version}-docs/api_cxx
435 %{_examplesdir}/db-cxx-%{version}
438 %defattr(644,root,root,755)
439 %{_libdir}/libdb_cxx-4.2.a
440 %if %{with default_db}
441 %{_libdir}/libdb_cxx.a
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_libdir}/libdb_java-4.2.so
451 %defattr(644,root,root,755)
452 %{_libdir}/libdb_java-4.2.la
453 %{_docdir}/db-%{version}-docs/java
454 %{_examplesdir}/db-java-%{version}
459 %defattr(644,root,root,755)
460 %attr(755,root,root) %{_libdir}/libdb_tcl-4.2.so
463 %defattr(644,root,root,755)
464 %{_libdir}/libdb_tcl-4.2.la
465 %if %{with default_db}
466 %attr(755,root,root) %{_libdir}/libdb_tcl.so
467 %{_libdir}/libdb_tcl.la
469 %{_docdir}/db-%{version}-docs/api_tcl
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_bindir}/berkeley_db_svc
475 %attr(755,root,root) %{_bindir}/db*_archive
476 %attr(755,root,root) %{_bindir}/db*_checkpoint
477 %attr(755,root,root) %{_bindir}/db*_deadlock
478 %attr(755,root,root) %{_bindir}/db*_dump
479 #%attr(755,root,root) %{_bindir}/db*_dump185
480 %attr(755,root,root) %{_bindir}/db*_load
481 %attr(755,root,root) %{_bindir}/db*_printlog
482 %attr(755,root,root) %{_bindir}/db*_recover
483 %attr(755,root,root) %{_bindir}/db*_stat
484 %attr(755,root,root) %{_bindir}/db*_upgrade
485 %attr(755,root,root) %{_bindir}/db*_verify
486 %{_docdir}/db-%{version}-docs/utility