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)
8 %{?with_nptl:%define with_pmutex 1}
9 Summary: Berkeley DB database library for C
10 Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
14 License: Sleepycat public license (GPL-like, see LICENSE)
16 # alternative site (sometimes working): http://www.berkeleydb.com/
17 #Source0Download: http://dev.sleepycat.com/downloads/releasehistorybdb.html
18 Source0: http://downloads.sleepycat.com/db-%{version}.tar.gz
19 # Source0-md5: cbc77517c9278cdb47613ce8cb55779f
20 Patch0: db-so-suffix.patch
21 Patch1: patch.4.2.52.1
22 Patch2: patch.4.2.52.2
23 Patch3: patch.4.2.52.3
24 Patch4: patch.4.2.52.4
25 Patch5: %{name}-amd64-fastmutex.patch
26 URL: http://www.sleepycat.com/
27 BuildRequires: autoconf
28 BuildRequires: automake
30 %{?with_java:BuildRequires: jdk}
31 BuildRequires: libstdc++-devel
32 BuildRequires: libtool
33 BuildRequires: rpmbuild(macros) >= 1.164
34 BuildRequires: sed >= 4.0
35 %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _includedir %{_prefix}/include/db4.2
41 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
42 provides embedded database support for both traditional and
43 client/server applications. Berkeley DB is used by many applications,
44 including Python and Perl, so this should be installed on all systems.
46 %description -l pl.UTF-8
47 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
48 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
49 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
53 Summary: Header files for Berkeley database library
54 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
55 Group: Development/Libraries
56 Requires: %{name} = %{epoch}:%{version}-%{release}
59 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
60 provides embedded database support for both traditional and
61 client/server applications. Berkeley DB includes B+tree, Extended
62 Linear Hashing, Fixed and Variable-length record access methods,
63 transactions, locking, logging, shared memory caching and database
64 recovery. DB supports C, C++, Java and Perl APIs.
66 This package contains the header files, libraries, and documentation
67 for building programs which use Berkeley DB.
69 %description devel -l pl.UTF-8
70 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
71 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
72 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
73 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
74 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
75 dla C, C++, Javy i Perla.
77 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
78 programów używających Berkeley DB.
81 Summary: Static libraries for Berkeley database library
82 Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
83 Group: Development/Libraries
84 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
87 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
88 provides embedded database support for both traditional and
89 client/server applications. Berkeley DB includes B+tree, Extended
90 Linear Hashing, Fixed and Variable-length record access methods,
91 transactions, locking, logging, shared memory caching and database
92 recovery. DB supports C, C++, Java and Perl APIs.
94 This package contains the static libraries for building programs which
97 %description static -l pl.UTF-8
98 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
99 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
100 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
101 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
102 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
103 dla C, C++, Javy i Perla.
105 Ten pakiet zawiera statyczne biblioteki do budowania programów
106 używających Berkeley DB.
109 Summary: Berkeley database library for C++
110 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
114 Berkeley database library for C++.
116 %description cxx -l pl.UTF-8
117 Biblioteka baz danych Berkeley dla C++.
120 Summary: Header files for db-cxx library
121 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
122 Group: Development/Libraries
123 Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
124 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
125 Conflicts: db-devel < 4.1.25-3
127 %description cxx-devel
128 Header files for db-cxx library.
130 %description cxx-devel -l pl.UTF-8
131 Pliki nagłówkowe biblioteki db-cxx.
134 Summary: Static version of db-cxx library
135 Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
136 Group: Development/Libraries
137 Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
138 Conflicts: db-static < 4.2.50-1
140 %description cxx-static
141 Static version of db-cxx library.
143 %description cxx-static -l pl.UTF-8
144 Statyczna wersja biblioteki db-cxx.
147 Summary: Berkeley database library for Java
148 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
150 Requires: jpackage-utils
153 Berkeley database library for Java.
155 %description java -l pl.UTF-8
156 Biblioteka baz danych Berkeley dla Javy.
159 Summary: Development files for db-java library
160 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
161 Group: Development/Languages/Java
162 Requires: %{name}-java = %{epoch}:%{version}-%{release}
163 Conflicts: db-devel < 4.1.25-3
165 %description java-devel
166 Development files for db-java library.
168 %description java-devel -l pl.UTF-8
169 Pliki programistyczne biblioteki db-java.
172 Summary: Berkeley database library for Tcl
173 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
174 Group: Development/Languages/Tcl
177 Berkeley database library for Tcl.
179 %description tcl -l pl.UTF-8
180 Biblioteka baz danych Berkeley dla Tcl.
183 Summary: Development files for db-tcl library
184 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
185 Group: Development/Languages/Tcl
186 Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
187 Conflicts: db-devel < 4.1.25-3
189 %description tcl-devel
190 Development files for db-tcl library.
192 %description tcl-devel -l pl.UTF-8
193 Pliki programistyczne biblioteki db-tcl.
196 Summary: Command line tools for managing Berkeley DB databases
197 Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
198 Group: Applications/Databases
199 Requires: %{name} = %{epoch}:%{version}-%{release}
202 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
203 provides embedded database support for both traditional and
204 client/server applications. Berkeley DB includes B+tree, Extended
205 Linear Hashing, Fixed and Variable-length record access methods,
206 transactions, locking, logging, shared memory caching and database
207 recovery. DB supports C, C++, Java and Perl APIs.
209 This package contains command line tools for managing Berkeley DB
212 %description utils -l pl.UTF-8
213 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
214 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
215 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
216 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
217 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
218 dla C, C++, Javy i Perla.
220 Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
224 %setup -q -n db-%{version}
233 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
238 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
239 cp -f /usr/share/automake/config.sub .
240 cp -f /usr/share/libtool/ltmain.sh .
244 cp -a build_unix build_unix.static
250 CFLAGS="%{rpmcflags}"
251 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
252 LDFLAGS="%{rpmldflags}"
253 export CC CXX CFLAGS CXXFLAGS LDFLAGS
260 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
263 # (temporarily?) disabled because of compilation errors:
266 %{__make} library_build
271 --prefix=%{_prefix} \
272 --libdir=%{_libdir} \
275 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
277 %{?with_tcl:--enable-tcl} \
278 %{?with_tcl:--with-tcl=/usr/lib} \
279 %{?with_java:--enable-java} \
283 %{__make} library_build \
284 TCFLAGS='-I$(builddir) -I%{_includedir}' \
285 LIBSO_LIBS="\$(LIBS)" \
286 LIBTSO_LIBS="\$(LIBS) -ltcl"
289 rm -rf $RPM_BUILD_ROOT
290 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
292 install -d $RPM_BUILD_ROOT%{_javadir}
295 %{__make} -C build_unix.static library_install \
296 DESTDIR=$RPM_BUILD_ROOT \
297 docdir=%{_docdir}/db-%{version}-docs \
298 includedir=%{_includedir}
300 %{__make} -C build_unix library_install \
301 DESTDIR=$RPM_BUILD_ROOT \
302 LIB_INSTALL_FILE_LIST="" \
303 docdir=%{_docdir}/db-%{version}-docs \
304 includedir=%{_includedir}
306 cd $RPM_BUILD_ROOT%{_libdir}
307 mv -f libdb.a libdb-4.2.a
308 mv -f libdb_cxx.a libdb_cxx-4.2.a
311 sed -i "s/old_library=''/old_library='libdb-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb-4.2.la
312 sed -i "s/old_library=''/old_library='libdb_cxx-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb_cxx-4.2.la
314 rm -f examples_c*/tags
315 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
316 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
318 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
319 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
322 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
323 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
324 mv $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}
328 rm -rf $RPM_BUILD_ROOT
330 %post -p /sbin/ldconfig
331 %postun -p /sbin/ldconfig
333 %post tcl -p /sbin/ldconfig
334 %postun tcl -p /sbin/ldconfig
336 %post cxx -p /sbin/ldconfig
337 %postun cxx -p /sbin/ldconfig
340 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_libdir}/libdb-4.2.so
343 %dir %{_docdir}/db-%{version}-docs
344 %{_docdir}/db-%{version}-docs/sleepycat
345 %{_docdir}/db-%{version}-docs/index.html
348 %defattr(644,root,root,755)
349 %{_libdir}/libdb-4.2.la
352 %{_includedir}/db_185.h
353 %{_docdir}/db-%{version}-docs/api_c
354 %{_docdir}/db-%{version}-docs/images
355 %{_docdir}/db-%{version}-docs/ref
356 %{_examplesdir}/db-%{version}
359 %defattr(644,root,root,755)
360 %{_libdir}/libdb-4.2.a
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_libdir}/libdb_cxx-4.2.so
367 %defattr(644,root,root,755)
368 %{_includedir}/db_cxx.h
369 %{_libdir}/libdb_cxx-4.2.la
370 %{_docdir}/db-%{version}-docs/api_cxx
371 %{_examplesdir}/db-cxx-%{version}
374 %defattr(644,root,root,755)
375 %{_libdir}/libdb_cxx-4.2.a
379 %defattr(644,root,root,755)
380 %attr(755,root,root) %{_libdir}/libdb_java-4.2.so
384 %defattr(644,root,root,755)
385 %{_libdir}/libdb_java-4.2.la
386 %{_docdir}/db-%{version}-docs/java
387 %{_examplesdir}/db-java-%{version}
392 %defattr(644,root,root,755)
393 %attr(755,root,root) %{_libdir}/libdb_tcl-4.2.so
396 %defattr(644,root,root,755)
397 %{_libdir}/libdb_tcl-4.2.la
398 %{_docdir}/db-%{version}-docs/api_tcl
402 %defattr(644,root,root,755)
403 %attr(755,root,root) %{_bindir}/berkeley_db_svc
404 %attr(755,root,root) %{_bindir}/db*_archive
405 %attr(755,root,root) %{_bindir}/db*_checkpoint
406 %attr(755,root,root) %{_bindir}/db*_deadlock
407 %attr(755,root,root) %{_bindir}/db*_dump
408 #%attr(755,root,root) %{_bindir}/db*_dump185
409 %attr(755,root,root) %{_bindir}/db*_load
410 %attr(755,root,root) %{_bindir}/db*_printlog
411 %attr(755,root,root) %{_bindir}/db*_recover
412 %attr(755,root,root) %{_bindir}/db*_stat
413 %attr(755,root,root) %{_bindir}/db*_upgrade
414 %attr(755,root,root) %{_bindir}/db*_verify
415 %{_docdir}/db-%{version}-docs/utility