#
# Conditional build:
-%bcond_with java # build db-java
-%bcond_without tcl # don't build Tcl bindings
-%bcond_with pmutex # use POSIX mutexes (only process-private with linuxthreads)
-%bcond_without nptl # don't use process-shared POSIX mutexes (NPTL provides full interface)
+%bcond_without java # don't build java bindings
+%bcond_without tcl # don't build Tcl bindings
+%bcond_with pmutex # use POSIX mutexes (only process-private with linuxthreads)
+%bcond_without nptl # don't use process-shared POSIX mutexes (NPTL provides full interface)
%bcond_without static_libs # don't build static libraries
+%bcond_with rpm_robustness
#
%{?with_nptl:%define with_pmutex 1}
+%ifnarch i586 i686 athlon pentium3 pentium4 %{x8664}
+%undefine with_java
+%endif
%define mver 4.5
Summary: Berkeley DB database library for C
Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
-Name: db%{mver}
+Name: db4.5
Version: %{mver}.20
-Release: 3
+Release: 8
Epoch: 0
License: Sleepycat public license (GPL-like, see LICENSE)
Group: Libraries
# Source0-md5: b0f1c777708cb8e9d37fb47e7ed3312d
Patch0: patch.4.5.20.1
Patch1: patch.4.5.20.2
+Patch10: db-rpm-robustness.patch
URL: http://www.oracle.com/technology/products/berkeley-db/index.html
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: sed >= 4.0
%{?with_tcl:BuildRequires: tcl-devel >= 8.4.0}
Provides: db = %{version}-%{release}
+%{?with_rpm_robustness:Requires: uname(release) >= 2.6.17}
Obsoletes: db4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%ifarch i586 i686 athlon pentium3 pentium4 %{x8664}
-%define with_java 1
-%endif
-
%description
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
provides embedded database support for both traditional and
Summary: Berkeley database library for Java
Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
Group: Libraries
-Requires: jre
+Requires: jpackage-utils
Provides: db-java = %{version}-%{release}
%description java
%patch0 -p0
%patch1 -p0
+%{?with_rpm_robustness:%patch10 -p1}
+
%if !%{with nptl}
sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' dist/aclocal/mutex.ac
%endif
CXX="%{__cxx}"
CFLAGS="%{rpmcflags}"
CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
-LDFLAGS="%{rpmldflags}"
+LDFLAGS="%{rpmcflags} %{rpmldflags}"
export CC CXX CFLAGS CXXFLAGS LDFLAGS
../dist/%configure \
--%{?with_pmutex:en}%{!?with_pmutex:dis}able-posixmutexes \
--enable-cxx \
%{?with_tcl:--enable-tcl} \
- %{?with_tcl:--with-tcl=/usr/lib} \
+ %{?with_tcl:--with-tcl=%{_libdir}} \
%{?with_java:--enable-java} \
--disable-static \
--enable-shared