3 %bcond_without java # don't build Java library
4 %bcond_without tcl # don't build Tcl bindings
5 %bcond_with pmutex # use POSIX mutexes (only process-private with linuxthreads)
6 %bcond_without nptl # don't use process-shared POSIX mutexes (NPTL provides full interface)
7 %bcond_without static_libs # don't build static libraries
8 %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}
19 License: Sleepycat public license (GPL-like, see LICENSE)
21 #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
22 Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
23 # Source0-md5: 13585a20ce32f113b8e8cdb57f52e3bb
24 %patchset_source -f http://download.oracle.com/berkeley-db/patches/db/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
25 URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html
26 BuildRequires: autoconf
27 BuildRequires: automake
30 %{?with_java:BuildRequires: jdk}
31 BuildRequires: libstdc++-devel
32 BuildRequires: libtool >= 2:2.2
33 BuildRequires: sed >= 4.0
34 %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
35 %if %{with default_db}
36 Provides: db = %{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %if %{without default_db}
42 %define _includedir %{_prefix}/include/db4.2
46 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
47 provides embedded database support for both traditional and
48 client/server applications. Berkeley DB is used by many applications,
49 including Python and Perl, so this should be installed on all systems.
51 %description -l pl.UTF-8
52 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
53 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
54 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
58 Summary: Header files for Berkeley database library
59 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
60 Group: Development/Libraries
61 Requires: %{name} = %{epoch}:%{version}-%{release}
62 %if %{with default_db}
63 Provides: db-devel = %{version}-%{release}
69 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
70 provides embedded database support for both traditional and
71 client/server applications. Berkeley DB includes B+tree, Extended
72 Linear Hashing, Fixed and Variable-length record access methods,
73 transactions, locking, logging, shared memory caching and database
74 recovery. DB supports C, C++, Java and Perl APIs.
76 This package contains the header files, libraries, and documentation
77 for building programs which use Berkeley DB.
79 %description devel -l pl.UTF-8
80 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
81 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
82 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
83 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
84 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
85 dla C, C++, Javy i Perla.
87 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
88 programów używających Berkeley DB.
91 Summary: Static libraries for Berkeley database library
92 Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
93 Group: Development/Libraries
94 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
95 %if %{with default_db}
96 Provides: db-static = %{version}-%{release}
102 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
103 provides embedded database support for both traditional and
104 client/server applications. Berkeley DB includes B+tree, Extended
105 Linear Hashing, Fixed and Variable-length record access methods,
106 transactions, locking, logging, shared memory caching and database
107 recovery. DB supports C, C++, Java and Perl APIs.
109 This package contains the static libraries for building programs which
112 %description static -l pl.UTF-8
113 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
114 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
115 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
116 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
117 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
118 dla C, C++, Javy i Perla.
120 Ten pakiet zawiera statyczne biblioteki do budowania programów
121 używających Berkeley DB.
124 Summary: Berkeley database library for C++
125 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
127 %if %{with default_db}
128 Provides: db-cxx = %{version}-%{release}
133 Berkeley database library for C++.
135 %description cxx -l pl.UTF-8
136 Biblioteka baz danych Berkeley dla C++.
139 Summary: Header files for db-cxx library
140 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
141 Group: Development/Libraries
142 Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
143 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
144 %if %{with default_db}
145 Provides: db-cxx-devel = %{version}-%{release}
147 Conflicts: db-devel < 4.1.25-3
149 %description cxx-devel
150 Header files for db-cxx library.
152 %description cxx-devel -l pl.UTF-8
153 Pliki nagłówkowe biblioteki db-cxx.
156 Summary: Static version of db-cxx library
157 Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
158 Group: Development/Libraries
159 Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
160 %if %{with default_db}
161 Provides: db-cxx-static = %{version}-%{release}
163 Conflicts: db-static < 4.2.50-1
165 %description cxx-static
166 Static version of db-cxx library.
168 %description cxx-static -l pl.UTF-8
169 Statyczna wersja biblioteki db-cxx.
172 Summary: Berkeley database library for Java
173 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
175 Requires: jpackage-utils
176 %if %{with default_db}
177 Provides: db-java = %{version}-%{release}
181 Berkeley database library for Java.
183 %description java -l pl.UTF-8
184 Biblioteka baz danych Berkeley dla Javy.
187 Summary: Development files for db-java library
188 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
189 Group: Development/Languages/Java
190 Requires: %{name}-java = %{epoch}:%{version}-%{release}
191 %if %{with default_db}
192 Provides: db-java-devel = %{version}-%{release}
194 Conflicts: db-devel < 4.1.25-3
196 %description java-devel
197 Development files for db-java library.
199 %description java-devel -l pl.UTF-8
200 Pliki programistyczne biblioteki db-java.
203 Summary: Berkeley database library for Tcl
204 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
205 Group: Development/Languages/Tcl
207 %if %{with default_db}
208 Provides: db-tcl = %{version}-%{release}
213 Berkeley database library for Tcl.
215 %description tcl -l pl.UTF-8
216 Biblioteka baz danych Berkeley dla Tcl.
219 Summary: Development files for db-tcl library
220 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
221 Group: Development/Languages/Tcl
222 Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
223 %if %{with default_db}
224 Provides: db-tcl-devel = %{version}-%{release}
226 Conflicts: db-devel < 4.1.25-3
228 %description tcl-devel
229 Development files for db-tcl library.
231 %description tcl-devel -l pl.UTF-8
232 Pliki programistyczne biblioteki db-tcl.
235 Summary: Command line tools for managing Berkeley DB databases
236 Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
237 Group: Applications/Databases
238 Requires: %{name} = %{epoch}:%{version}-%{release}
239 %if %{with default_db}
240 Provides: db-utils = %{version}-%{release}
245 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
246 provides embedded database support for both traditional and
247 client/server applications. Berkeley DB includes B+tree, Extended
248 Linear Hashing, Fixed and Variable-length record access methods,
249 transactions, locking, logging, shared memory caching and database
250 recovery. DB supports C, C++, Java and Perl APIs.
252 This package contains command line tools for managing Berkeley DB
255 %description utils -l pl.UTF-8
256 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
257 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
258 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
259 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
260 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
261 dla C, C++, Javy i Perla.
263 Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
267 %setup -q -n db-%{ver}
269 %patchset_patch 1 %{patchlevel}
272 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
275 sed -i -e '/AC_PROG_LIBTOOL/aLT_OUTPUT' dist/configure.ac
279 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
280 cp -f /usr/share/aclocal/ltoptions.m4 aclocal/ltoptions.ac
281 cp -f /usr/share/aclocal/ltsugar.m4 aclocal/ltsugar.ac
282 cp -f /usr/share/aclocal/ltversion.m4 aclocal/ltversion.ac
283 cp -f /usr/share/aclocal/lt~obsolete.m4 aclocal/lt~obsolete.ac
284 cp -f /usr/share/automake/config.sub .
285 cp -f /usr/share/libtool/config/ltmain.sh .
289 %if %{with static_libs}
290 cp -a build_unix build_unix.static
296 CFLAGS="%{rpmcflags}"
297 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
298 LDFLAGS="%{rpmldflags}"
299 export CC CXX CFLAGS CXXFLAGS LDFLAGS
306 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
309 # (temporarily?) disabled because of compilation errors:
312 %{__make} library_build
319 --prefix=%{_prefix} \
320 --libdir=%{_libdir} \
323 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
325 %{?with_tcl:--enable-tcl} \
326 %{?with_tcl:--with-tcl=/usr/lib} \
327 %{?with_java:--enable-java} \
331 %{__make} library_build \
332 TCFLAGS='-I$(builddir) -I%{_includedir}' \
333 LIBSO_LIBS="\$(LIBS)" \
334 LIBTSO_LIBS="\$(LIBS) -ltcl"
337 rm -rf $RPM_BUILD_ROOT
338 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
340 install -d $RPM_BUILD_ROOT%{_javadir}
343 %if %{with static_libs}
344 %{__make} -C build_unix.static library_install \
345 DESTDIR=$RPM_BUILD_ROOT \
346 docdir=%{_docdir}/db-%{version}-docs \
347 includedir=%{_includedir}
350 %{__make} -C build_unix library_install \
351 DESTDIR=$RPM_BUILD_ROOT \
352 LIB_INSTALL_FILE_LIST="" \
353 docdir=%{_docdir}/db-%{version}-docs \
354 includedir=%{_includedir}
356 %if %{with default_db}
357 install -d $RPM_BUILD_ROOT/%{_lib}
358 mv $RPM_BUILD_ROOT%{_libdir}/libdb-4.3.so $RPM_BUILD_ROOT/%{_lib}
361 cd $RPM_BUILD_ROOT%{_libdir}
362 %if %{with static_libs}
363 mv -f libdb.a libdb-4.3.a
364 mv -f libdb_cxx.a libdb_cxx-4.3.a
367 mv -f $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
369 %if %{with default_db}
370 ln -sf /%{_lib}/libdb-4.3.so libdb.so
371 ln -sf /%{_lib}/libdb-4.3.so libdb4.so
372 ln -sf /%{_lib}/libdb-4.3.so libdb-4.3.so
373 ln -sf /%{_lib}/libdb-4.3.so libndbm.so
374 ln -sf libdb-4.3.la libdb.la
375 ln -sf libdb-4.3.la libdb4.la
376 ln -sf libdb-4.3.la libndbm.la
377 ln -sf libdb_cxx-4.3.so libdb_cxx.so
378 ln -sf libdb_cxx-4.3.la libdb_cxx.la
380 ln -sf libdb_java-4.3.la libdb_java.la
383 ln -sf libdb_tcl-4.3.so libdb_tcl.so
384 ln -sf libdb_tcl-4.3.la libdb_tcl.la
386 %if %{with static_libs}
387 ln -sf libdb-4.3.a libdb.a
388 ln -sf libdb-4.3.a libdb4.a
389 ln -sf libdb-4.3.a libndbm.a
390 ln -sf libdb_cxx-4.3.a libdb_cxx.a
394 sed -i "s/old_library=''/old_library='libdb-4.3.a'/" libdb-4.3.la
395 sed -i "s/old_library=''/old_library='libdb_cxx-4.3.a'/" libdb_cxx-4.3.la
398 rm -f examples_c*/tags
399 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
400 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
402 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
403 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
406 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
407 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
409 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java
413 rm -rf $RPM_BUILD_ROOT
415 %post -p /sbin/ldconfig
416 %postun -p /sbin/ldconfig
418 %post tcl -p /sbin/ldconfig
419 %postun tcl -p /sbin/ldconfig
421 %post cxx -p /sbin/ldconfig
422 %postun cxx -p /sbin/ldconfig
425 %defattr(644,root,root,755)
427 %if %{with default_db}
428 %attr(755,root,root) /%{_lib}/libdb-4.3.so
430 %attr(755,root,root) %{_libdir}/libdb-4.3.so
432 %dir %{_docdir}/db-%{version}-docs
433 %{_docdir}/db-%{version}-docs/sleepycat
434 %{_docdir}/db-%{version}-docs/index.html
437 %defattr(644,root,root,755)
438 %{_libdir}/libdb-4.3.la
439 %if %{with default_db}
440 %attr(755,root,root) %{_libdir}/libdb-4.3.so
441 %attr(755,root,root) %{_libdir}/libdb4.so
442 %attr(755,root,root) %{_libdir}/libdb.so
443 %attr(755,root,root) %{_libdir}/libndbm.so
446 %{_libdir}/libndbm.la
451 %{_includedir}/db_185.h
452 %{_docdir}/db-%{version}-docs/api_c
453 %dir %{_docdir}/db-%{version}-docs/gsg
454 %{_docdir}/db-%{version}-docs/gsg/C
455 %{_docdir}/db-%{version}-docs/images
456 %{_docdir}/db-%{version}-docs/ref
457 %{_examplesdir}/db-%{version}
459 %if %{with static_libs}
461 %defattr(644,root,root,755)
462 %{_libdir}/libdb-4.3.a
463 %if %{with default_db}
471 %defattr(644,root,root,755)
472 %attr(755,root,root) %{_libdir}/libdb_cxx-4.3.so
475 %defattr(644,root,root,755)
476 %{_libdir}/libdb_cxx-4.3.la
477 %if %{with default_db}
478 %attr(755,root,root) %{_libdir}/libdb_cxx.so
479 %{_libdir}/libdb_cxx.la
481 %{_includedir}/db_cxx.h
482 %{_docdir}/db-%{version}-docs/api_cxx
483 %{_docdir}/db-%{version}-docs/gsg/CXX
484 %{_examplesdir}/db-cxx-%{version}
486 %if %{with static_libs}
488 %defattr(644,root,root,755)
489 %{_libdir}/libdb_cxx-4.3.a
490 %if %{with default_db}
491 %{_libdir}/libdb_cxx.a
497 %defattr(644,root,root,755)
498 %attr(755,root,root) %{_libdir}/libdb_java-4.3.so
502 %defattr(644,root,root,755)
503 %{_libdir}/libdb_java-4.3.la
504 %if %{with default_db}
505 %attr(755,root,root) %{_libdir}/libdb_java.so
506 %{_libdir}/libdb_java.la
508 %{_docdir}/db-%{version}-docs/collections
509 %{_docdir}/db-%{version}-docs/gsg/JAVA
510 %{_docdir}/db-%{version}-docs/java
511 %{_examplesdir}/db-java-%{version}
516 %defattr(644,root,root,755)
517 %attr(755,root,root) %{_libdir}/libdb_tcl-4.3.so
520 %defattr(644,root,root,755)
521 %{_libdir}/libdb_tcl-4.3.la
522 %if %{with default_db}
523 %attr(755,root,root) %{_libdir}/libdb_tcl.so
524 %{_libdir}/libdb_tcl.la
526 %{_docdir}/db-%{version}-docs/api_tcl
530 %defattr(644,root,root,755)
531 %attr(755,root,root) %{_bindir}/berkeley_db_svc
532 %attr(755,root,root) %{_bindir}/db*_archive
533 %attr(755,root,root) %{_bindir}/db*_checkpoint
534 %attr(755,root,root) %{_bindir}/db*_deadlock
535 %attr(755,root,root) %{_bindir}/db*_dump
536 #%attr(755,root,root) %{_bindir}/db*_dump185
537 %attr(755,root,root) %{_bindir}/db*_load
538 %attr(755,root,root) %{_bindir}/db*_printlog
539 %attr(755,root,root) %{_bindir}/db*_recover
540 %attr(755,root,root) %{_bindir}/db*_stat
541 %attr(755,root,root) %{_bindir}/db*_upgrade
542 %attr(755,root,root) %{_bindir}/db*_verify
543 %{_docdir}/db-%{version}-docs/utility