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: d84dff288a19186b136b0daf7067ade3
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
29 %{?with_java:BuildRequires: jdk}
30 BuildRequires: libstdc++-devel
31 BuildRequires: libtool >= 2:2.2
32 BuildRequires: sed >= 4.0
33 %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
34 %if %{with default_db}
35 Provides: db = %{version}-%{release}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %if %{without default_db}
41 %define _includedir %{_prefix}/include/db4.4
45 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
46 provides embedded database support for both traditional and
47 client/server applications. Berkeley DB is used by many applications,
48 including Python and Perl, so this should be installed on all systems.
50 %description -l pl.UTF-8
51 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
52 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
53 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
57 Summary: Header files for Berkeley database library
58 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
59 Group: Development/Libraries
60 Requires: %{name} = %{epoch}:%{version}-%{release}
61 %if %{with default_db}
62 Provides: db-devel = %{version}-%{release}
68 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
69 provides embedded database support for both traditional and
70 client/server applications. Berkeley DB includes B+tree, Extended
71 Linear Hashing, Fixed and Variable-length record access methods,
72 transactions, locking, logging, shared memory caching and database
73 recovery. DB supports C, C++, Java and Perl APIs.
75 This package contains the header files, libraries, and documentation
76 for building programs which use Berkeley DB.
78 %description devel -l pl.UTF-8
79 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
80 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
81 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
82 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
83 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
84 dla C, C++, Javy i Perla.
86 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
87 programów używających Berkeley DB.
90 Summary: Static libraries for Berkeley database library
91 Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
92 Group: Development/Libraries
93 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
94 %if %{with default_db}
95 Provides: db-static = %{version}-%{release}
101 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
102 provides embedded database support for both traditional and
103 client/server applications. Berkeley DB includes B+tree, Extended
104 Linear Hashing, Fixed and Variable-length record access methods,
105 transactions, locking, logging, shared memory caching and database
106 recovery. DB supports C, C++, Java and Perl APIs.
108 This package contains the static libraries for building programs which
111 %description static -l pl.UTF-8
112 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
113 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
114 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
115 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
116 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
117 dla C, C++, Javy i Perla.
119 Ten pakiet zawiera statyczne biblioteki do budowania programów
120 używających Berkeley DB.
123 Summary: Berkeley database library for C++
124 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
126 %if %{with default_db}
127 Provides: db-cxx = %{version}-%{release}
132 Berkeley database library for C++.
134 %description cxx -l pl.UTF-8
135 Biblioteka baz danych Berkeley dla C++.
138 Summary: Header files for db-cxx library
139 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
140 Group: Development/Libraries
141 Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
142 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
143 %if %{with default_db}
144 Provides: db-cxx-devel = %{version}-%{release}
146 Conflicts: db-devel < 4.1.25-3
148 %description cxx-devel
149 Header files for db-cxx library.
151 %description cxx-devel -l pl.UTF-8
152 Pliki nagłówkowe biblioteki db-cxx.
155 Summary: Static version of db-cxx library
156 Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
157 Group: Development/Libraries
158 Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
159 %if %{with default_db}
160 Provides: db-cxx-static = %{version}-%{release}
162 Conflicts: db-static < 4.2.50-1
164 %description cxx-static
165 Static version of db-cxx library.
167 %description cxx-static -l pl.UTF-8
168 Statyczna wersja biblioteki db-cxx.
171 Summary: Berkeley database library for Java
172 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
174 Requires: jpackage-utils
175 %if %{with default_db}
176 Provides: db-java = %{version}-%{release}
180 Berkeley database library for Java.
182 %description java -l pl.UTF-8
183 Biblioteka baz danych Berkeley dla Javy.
186 Summary: Development files for db-java library
187 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
188 Group: Development/Languages/Java
189 Requires: %{name}-java = %{epoch}:%{version}-%{release}
190 %if %{with default_db}
191 Provides: db-java-devel = %{version}-%{release}
193 Conflicts: db-devel < 4.1.25-3
195 %description java-devel
196 Development files for db-java library.
198 %description java-devel -l pl.UTF-8
199 Pliki programistyczne biblioteki db-java.
202 Summary: Berkeley database library for Tcl
203 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
204 Group: Development/Languages/Tcl
206 %if %{with default_db}
207 Provides: db-tcl = %{version}-%{release}
212 Berkeley database library for Tcl.
214 %description tcl -l pl.UTF-8
215 Biblioteka baz danych Berkeley dla Tcl.
218 Summary: Development files for db-tcl library
219 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
220 Group: Development/Languages/Tcl
221 Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
222 %if %{with default_db}
223 Provides: db-tcl-devel = %{version}-%{release}
225 Conflicts: db-devel < 4.1.25-3
227 %description tcl-devel
228 Development files for db-tcl library.
230 %description tcl-devel -l pl.UTF-8
231 Pliki programistyczne biblioteki db-tcl.
234 Summary: Command line tools for managing Berkeley DB databases
235 Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
236 Group: Applications/Databases
237 Requires: %{name} = %{epoch}:%{version}-%{release}
238 %if %{with default_db}
239 Provides: db-utils = %{version}-%{release}
241 # obsolete Ra package
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}
270 %patchset_patch 1 %{patchlevel}
273 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
276 sed -i -e '/AC_PROG_LIBTOOL/aLT_OUTPUT' dist/configure.ac
280 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
281 cp -f /usr/share/aclocal/ltoptions.m4 aclocal/ltoptions.ac
282 cp -f /usr/share/aclocal/ltsugar.m4 aclocal/ltsugar.ac
283 cp -f /usr/share/aclocal/ltversion.m4 aclocal/ltversion.ac
284 cp -f /usr/share/aclocal/lt~obsolete.m4 aclocal/lt~obsolete.ac
285 cp -f /usr/share/automake/config.sub .
286 cp -f /usr/share/libtool/config/ltmain.sh .
290 %if %{with static_libs}
291 cp -a build_unix build_unix.static
297 CFLAGS="%{rpmcflags}"
298 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
299 LDFLAGS="%{rpmldflags}"
300 export CC CXX CFLAGS CXXFLAGS LDFLAGS
307 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
310 # (temporarily?) disabled because of compilation errors:
313 %{__make} library_build
320 --prefix=%{_prefix} \
321 --libdir=%{_libdir} \
324 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
326 %{?with_tcl:--enable-tcl} \
327 %{?with_tcl:--with-tcl=/usr/lib} \
328 %{?with_java:--enable-java} \
332 %{__make} library_build \
333 TCFLAGS='-I$(builddir) -I%{_includedir}' \
334 LIBSO_LIBS="\$(LIBS)" \
335 LIBTSO_LIBS="\$(LIBS) -ltcl"
338 rm -rf $RPM_BUILD_ROOT
339 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
341 install -d $RPM_BUILD_ROOT%{_javadir}
344 %if %{with static_libs}
345 %{__make} -C build_unix.static library_install \
346 DESTDIR=$RPM_BUILD_ROOT \
347 docdir=%{_docdir}/db-%{version}-docs \
348 includedir=%{_includedir}
351 %{__make} -C build_unix library_install \
352 DESTDIR=$RPM_BUILD_ROOT \
353 LIB_INSTALL_FILE_LIST="" \
354 docdir=%{_docdir}/db-%{version}-docs \
355 includedir=%{_includedir}
357 %if %{with default_db}
358 install -d $RPM_BUILD_ROOT/%{_lib}
359 mv $RPM_BUILD_ROOT%{_libdir}/libdb-4.4.so $RPM_BUILD_ROOT/%{_lib}
362 cd $RPM_BUILD_ROOT%{_libdir}
363 %if %{with static_libs}
364 mv -f libdb.a libdb-4.4.a
365 mv -f libdb_cxx.a libdb_cxx-4.4.a
368 mv -f $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
370 %if %{with default_db}
371 ln -sf /%{_lib}/libdb-4.4.so libdb.so
372 ln -sf /%{_lib}/libdb-4.4.so libdb4.so
373 ln -sf /%{_lib}/libdb-4.4.so libdb-4.4.so
374 ln -sf /%{_lib}/libdb-4.4.so libndbm.so
375 ln -sf libdb-4.4.la libdb.la
376 ln -sf libdb-4.4.la libdb4.la
377 ln -sf libdb-4.4.la libndbm.la
378 ln -sf libdb_cxx-4.4.so libdb_cxx.so
379 ln -sf libdb_cxx-4.4.la libdb_cxx.la
381 ln -sf libdb_java-4.4.la libdb_java.la
384 ln -sf libdb_tcl-4.4.so libdb_tcl.so
385 ln -sf libdb_tcl-4.4.la libdb_tcl.la
387 %if %{with static_libs}
388 ln -sf libdb-4.4.a libdb.a
389 ln -sf libdb-4.4.a libdb4.a
390 ln -sf libdb-4.4.a libndbm.a
391 ln -sf libdb_cxx-4.4.a libdb_cxx.a
395 sed -i "s/old_library=''/old_library='libdb-4.4.a'/" libdb-4.4.la
396 sed -i "s/old_library=''/old_library='libdb_cxx-4.4.a'/" libdb_cxx-4.4.la
399 rm -f examples_c*/tags
400 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
401 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
403 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
404 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
407 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
408 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
410 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java
414 rm -rf $RPM_BUILD_ROOT
416 %post -p /sbin/ldconfig
417 %postun -p /sbin/ldconfig
419 %post tcl -p /sbin/ldconfig
420 %postun tcl -p /sbin/ldconfig
422 %post cxx -p /sbin/ldconfig
423 %postun cxx -p /sbin/ldconfig
426 %defattr(644,root,root,755)
428 %if %{with default_db}
429 %attr(755,root,root) /%{_lib}/libdb-4.4.so
431 %attr(755,root,root) %{_libdir}/libdb-4.4.so
433 %dir %{_docdir}/db-%{version}-docs
434 %{_docdir}/db-%{version}-docs/sleepycat
435 %{_docdir}/db-%{version}-docs/index.html
438 %defattr(644,root,root,755)
439 %{_libdir}/libdb-4.4.la
440 %if %{with default_db}
441 %attr(755,root,root) %{_libdir}/libdb-4.4.so
442 %attr(755,root,root) %{_libdir}/libdb4.so
443 %attr(755,root,root) %{_libdir}/libdb.so
444 %attr(755,root,root) %{_libdir}/libndbm.so
447 %{_libdir}/libndbm.la
452 %{_includedir}/db_185.h
453 %{_docdir}/db-%{version}-docs/api_c
454 %dir %{_docdir}/db-%{version}-docs/gsg
455 %{_docdir}/db-%{version}-docs/gsg/C
456 %dir %{_docdir}/db-%{version}-docs/gsg_txn
457 %{_docdir}/db-%{version}-docs/gsg_txn/C
458 %{_docdir}/db-%{version}-docs/images
459 %{_docdir}/db-%{version}-docs/ref
460 %{_examplesdir}/db-%{version}
462 %if %{with static_libs}
464 %defattr(644,root,root,755)
465 %{_libdir}/libdb-4.4.a
466 %if %{with default_db}
474 %defattr(644,root,root,755)
475 %attr(755,root,root) %{_libdir}/libdb_cxx-4.4.so
478 %defattr(644,root,root,755)
479 %{_libdir}/libdb_cxx-4.4.la
480 %if %{with default_db}
481 %attr(755,root,root) %{_libdir}/libdb_cxx.so
482 %{_libdir}/libdb_cxx.la
484 %{_includedir}/db_cxx.h
485 %{_docdir}/db-%{version}-docs/api_cxx
486 %{_docdir}/db-%{version}-docs/gsg/CXX
487 %{_docdir}/db-%{version}-docs/gsg_txn/CXX
488 %{_examplesdir}/db-cxx-%{version}
490 %if %{with static_libs}
492 %defattr(644,root,root,755)
493 %{_libdir}/libdb_cxx-4.4.a
494 %if %{with default_db}
495 %{_libdir}/libdb_cxx.a
501 %defattr(644,root,root,755)
502 %attr(755,root,root) %{_libdir}/libdb_java-4.4.so
506 %defattr(644,root,root,755)
507 %{_libdir}/libdb_java-4.4.la
508 %if %{with default_db}
509 %attr(755,root,root) %{_libdir}/libdb_java.so
510 %{_libdir}/libdb_java.la
512 %{_docdir}/db-%{version}-docs/collections
513 %{_docdir}/db-%{version}-docs/gsg/JAVA
514 %{_docdir}/db-%{version}-docs/gsg_txn/JAVA
515 %{_docdir}/db-%{version}-docs/java
516 %{_examplesdir}/db-java-%{version}
521 %defattr(644,root,root,755)
522 %attr(755,root,root) %{_libdir}/libdb_tcl-4.4.so
525 %defattr(644,root,root,755)
526 %{_libdir}/libdb_tcl-4.4.la
527 %if %{with default_db}
528 %attr(755,root,root) %{_libdir}/libdb_tcl.so
529 %{_libdir}/libdb_tcl.la
531 %{_docdir}/db-%{version}-docs/api_tcl
535 %defattr(644,root,root,755)
536 %attr(755,root,root) %{_bindir}/berkeley_db_svc
537 %attr(755,root,root) %{_bindir}/db*_archive
538 %attr(755,root,root) %{_bindir}/db*_checkpoint
539 %attr(755,root,root) %{_bindir}/db*_deadlock
540 %attr(755,root,root) %{_bindir}/db*_dump
541 #%attr(755,root,root) %{_bindir}/db*_dump185
542 %attr(755,root,root) %{_bindir}/db*_hotbackup
543 %attr(755,root,root) %{_bindir}/db*_load
544 %attr(755,root,root) %{_bindir}/db*_printlog
545 %attr(755,root,root) %{_bindir}/db*_recover
546 %attr(755,root,root) %{_bindir}/db*_stat
547 %attr(755,root,root) %{_bindir}/db*_upgrade
548 %attr(755,root,root) %{_bindir}/db*_verify
549 %{_docdir}/db-%{version}-docs/utility