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)
11 %{?with_nptl:%define with_pmutex 1}
12 Summary: Berkeley DB database library for C
13 Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
15 Version: %{ver}.%{patchlevel}
17 License: Sleepycat public license (GPL-like, see LICENSE)
19 #Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
20 Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
21 # Source0-md5: cbc77517c9278cdb47613ce8cb55779f
22 %patchset_source -f http://download.oracle.com/berkeley-db/patches/db/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
23 Patch0: db-so-suffix.patch
24 Patch1: %{name}-amd64-fastmutex.patch
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
32 BuildRequires: rpmbuild(macros) >= 1.426
33 BuildRequires: sed >= 4.0
34 %{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _includedir %{_prefix}/include/db4.2
40 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
41 provides embedded database support for both traditional and
42 client/server applications. Berkeley DB is used by many applications,
43 including Python and Perl, so this should be installed on all systems.
45 %description -l pl.UTF-8
46 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
47 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
48 klient-serwer. Berkeley db jest używana w wielu aplikacjach, w tym w
52 Summary: Header files for Berkeley database library
53 Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
54 Group: Development/Libraries
55 Requires: %{name} = %{epoch}:%{version}-%{release}
58 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
59 provides embedded database support for both traditional and
60 client/server applications. Berkeley DB includes B+tree, Extended
61 Linear Hashing, Fixed and Variable-length record access methods,
62 transactions, locking, logging, shared memory caching and database
63 recovery. DB supports C, C++, Java and Perl APIs.
65 This package contains the header files, libraries, and documentation
66 for building programs which use Berkeley DB.
68 %description devel -l pl.UTF-8
69 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
70 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
71 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
72 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
73 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
74 dla C, C++, Javy i Perla.
76 Ten pakiet zawiera pliki nagłówkowe i dokumentację do budowania
77 programów używających Berkeley DB.
80 Summary: Static libraries for Berkeley database library
81 Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
86 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
87 provides embedded database support for both traditional and
88 client/server applications. Berkeley DB includes B+tree, Extended
89 Linear Hashing, Fixed and Variable-length record access methods,
90 transactions, locking, logging, shared memory caching and database
91 recovery. DB supports C, C++, Java and Perl APIs.
93 This package contains the static libraries for building programs which
96 %description static -l pl.UTF-8
97 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
98 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
99 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
100 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
101 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
102 dla C, C++, Javy i Perla.
104 Ten pakiet zawiera statyczne biblioteki do budowania programów
105 używających Berkeley DB.
108 Summary: Berkeley database library for C++
109 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
113 Berkeley database library for C++.
115 %description cxx -l pl.UTF-8
116 Biblioteka baz danych Berkeley dla C++.
119 Summary: Header files for db-cxx library
120 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
121 Group: Development/Libraries
122 Requires: %{name}-cxx = %{epoch}:%{version}-%{release}
123 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
124 Conflicts: db-devel < 4.1.25-3
126 %description cxx-devel
127 Header files for db-cxx library.
129 %description cxx-devel -l pl.UTF-8
130 Pliki nagłówkowe biblioteki db-cxx.
133 Summary: Static version of db-cxx library
134 Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
135 Group: Development/Libraries
136 Requires: %{name}-cxx-devel = %{epoch}:%{version}-%{release}
137 Conflicts: db-static < 4.2.50-1
139 %description cxx-static
140 Static version of db-cxx library.
142 %description cxx-static -l pl.UTF-8
143 Statyczna wersja biblioteki db-cxx.
146 Summary: Berkeley database library for Java
147 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
149 Requires: jpackage-utils
152 Berkeley database library for Java.
154 %description java -l pl.UTF-8
155 Biblioteka baz danych Berkeley dla Javy.
158 Summary: Development files for db-java library
159 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
160 Group: Development/Languages/Java
161 Requires: %{name}-java = %{epoch}:%{version}-%{release}
162 Conflicts: db-devel < 4.1.25-3
164 %description java-devel
165 Development files for db-java library.
167 %description java-devel -l pl.UTF-8
168 Pliki programistyczne biblioteki db-java.
171 Summary: Berkeley database library for Tcl
172 Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
173 Group: Development/Languages/Tcl
176 Berkeley database library for Tcl.
178 %description tcl -l pl.UTF-8
179 Biblioteka baz danych Berkeley dla Tcl.
182 Summary: Development files for db-tcl library
183 Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
184 Group: Development/Languages/Tcl
185 Requires: %{name}-tcl = %{epoch}:%{version}-%{release}
186 Conflicts: db-devel < 4.1.25-3
188 %description tcl-devel
189 Development files for db-tcl library.
191 %description tcl-devel -l pl.UTF-8
192 Pliki programistyczne biblioteki db-tcl.
195 Summary: Command line tools for managing Berkeley DB databases
196 Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
197 Group: Applications/Databases
198 Requires: %{name} = %{epoch}:%{version}-%{release}
201 The Berkeley Database (Berkeley DB) is a programmatic toolkit that
202 provides embedded database support for both traditional and
203 client/server applications. Berkeley DB includes B+tree, Extended
204 Linear Hashing, Fixed and Variable-length record access methods,
205 transactions, locking, logging, shared memory caching and database
206 recovery. DB supports C, C++, Java and Perl APIs.
208 This package contains command line tools for managing Berkeley DB
211 %description utils -l pl.UTF-8
212 Berkeley Database (Berkeley DB) to zestaw narzędzi programistycznych
213 zapewniających obsługę baz danych w aplikacjach tradycyjnych jak i
214 klient-serwer. Berkeley DB obsługuje dostęp do bazy przez B-drzewa i
215 funkcje mieszające ze stałą lub zmienną wielkością rekordu,
216 transakcje, kroniki, pamięć dzieloną i odtwarzanie baz. Ma wsparcie
217 dla C, C++, Javy i Perla.
219 Ten pakiet zawiera narzędzia do obsługi baz Berkeley DB z linii
223 %setup -q -n db-%{ver}
226 %patchset_patch 1 %{patchlevel}
232 sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
237 cp -f /usr/share/aclocal/libtool.m4 aclocal/libtool.ac
238 cp -f /usr/share/automake/config.sub .
239 cp -f /usr/share/libtool/ltmain.sh .
243 cp -a build_unix build_unix.static
249 CFLAGS="%{rpmcflags}"
250 CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
251 LDFLAGS="%{rpmldflags}"
252 export CC CXX CFLAGS CXXFLAGS LDFLAGS
259 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
262 # (temporarily?) disabled because of compilation errors:
265 %{__make} library_build
270 --prefix=%{_prefix} \
271 --libdir=%{_libdir} \
274 --%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
276 %{?with_tcl:--enable-tcl} \
277 %{?with_tcl:--with-tcl=/usr/lib} \
278 %{?with_java:--enable-java} \
282 %{__make} library_build \
283 TCFLAGS='-I$(builddir) -I%{_includedir}' \
284 LIBSO_LIBS="\$(LIBS)" \
285 LIBTSO_LIBS="\$(LIBS) -ltcl"
288 rm -rf $RPM_BUILD_ROOT
289 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
291 install -d $RPM_BUILD_ROOT%{_javadir}
294 %{__make} -C build_unix.static library_install \
295 DESTDIR=$RPM_BUILD_ROOT \
296 docdir=%{_docdir}/db-%{version}-docs \
297 includedir=%{_includedir}
299 %{__make} -C build_unix library_install \
300 DESTDIR=$RPM_BUILD_ROOT \
301 LIB_INSTALL_FILE_LIST="" \
302 docdir=%{_docdir}/db-%{version}-docs \
303 includedir=%{_includedir}
305 cd $RPM_BUILD_ROOT%{_libdir}
306 mv -f libdb.a libdb-4.2.a
307 mv -f libdb_cxx.a libdb_cxx-4.2.a
310 sed -i "s/old_library=''/old_library='libdb-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb-4.2.la
311 sed -i "s/old_library=''/old_library='libdb_cxx-4.2.a'/" $RPM_BUILD_ROOT%{_libdir}/libdb_cxx-4.2.la
313 rm -f examples_c*/tags
314 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
315 cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
317 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
318 cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
321 install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
322 cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
323 mv $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}
325 rm -rf $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/java
329 rm -rf $RPM_BUILD_ROOT
331 %post -p /sbin/ldconfig
332 %postun -p /sbin/ldconfig
334 %post tcl -p /sbin/ldconfig
335 %postun tcl -p /sbin/ldconfig
337 %post cxx -p /sbin/ldconfig
338 %postun cxx -p /sbin/ldconfig
341 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_libdir}/libdb-4.2.so
344 %dir %{_docdir}/db-%{version}-docs
345 %{_docdir}/db-%{version}-docs/sleepycat
346 %{_docdir}/db-%{version}-docs/index.html
349 %defattr(644,root,root,755)
350 %{_libdir}/libdb-4.2.la
353 %{_includedir}/db_185.h
354 %{_docdir}/db-%{version}-docs/api_c
355 %{_docdir}/db-%{version}-docs/images
356 %{_docdir}/db-%{version}-docs/ref
357 %{_examplesdir}/db-%{version}
360 %defattr(644,root,root,755)
361 %{_libdir}/libdb-4.2.a
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/libdb_cxx-4.2.so
368 %defattr(644,root,root,755)
369 %{_includedir}/db_cxx.h
370 %{_libdir}/libdb_cxx-4.2.la
371 %{_docdir}/db-%{version}-docs/api_cxx
372 %{_examplesdir}/db-cxx-%{version}
375 %defattr(644,root,root,755)
376 %{_libdir}/libdb_cxx-4.2.a
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/libdb_java-4.2.so
385 %defattr(644,root,root,755)
386 %{_libdir}/libdb_java-4.2.la
387 %{_docdir}/db-%{version}-docs/java
388 %{_examplesdir}/db-java-%{version}
393 %defattr(644,root,root,755)
394 %attr(755,root,root) %{_libdir}/libdb_tcl-4.2.so
397 %defattr(644,root,root,755)
398 %{_libdir}/libdb_tcl-4.2.la
399 %{_docdir}/db-%{version}-docs/api_tcl
403 %defattr(644,root,root,755)
404 %attr(755,root,root) %{_bindir}/berkeley_db_svc
405 %attr(755,root,root) %{_bindir}/db*_archive
406 %attr(755,root,root) %{_bindir}/db*_checkpoint
407 %attr(755,root,root) %{_bindir}/db*_deadlock
408 %attr(755,root,root) %{_bindir}/db*_dump
409 #%attr(755,root,root) %{_bindir}/db*_dump185
410 %attr(755,root,root) %{_bindir}/db*_load
411 %attr(755,root,root) %{_bindir}/db*_printlog
412 %attr(755,root,root) %{_bindir}/db*_recover
413 %attr(755,root,root) %{_bindir}/db*_stat
414 %attr(755,root,root) %{_bindir}/db*_upgrade
415 %attr(755,root,root) %{_bindir}/db*_verify
416 %{_docdir}/db-%{version}-docs/utility