packages: db4.1/db4.1.spec, db4.1/patch.4.1.25.2 (NEW), db4.1/patch.4.1.25....
qboosh
qboosh at pld-linux.org
Thu Dec 15 21:10:00 CET 2011
Author: qboosh Date: Thu Dec 15 20:10:00 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- added 4.1.25.[23] patches
- unified, added default_db,static_libs,tcl bconds and cxx-static,java-devel subpackages
---- Files affected:
packages/db4.1:
db4.1.spec (1.15 -> 1.16) , patch.4.1.25.2 (NONE -> 1.1) (NEW), patch.4.1.25.3 (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/db4.1/db4.1.spec
diff -u packages/db4.1/db4.1.spec:1.15 packages/db4.1/db4.1.spec:1.16
--- packages/db4.1/db4.1.spec:1.15 Mon Feb 12 22:23:52 2007
+++ packages/db4.1/db4.1.spec Thu Dec 15 21:09:55 2011
@@ -1,32 +1,42 @@
# $Revision$, $Date$
#
# Conditional build:
-%bcond_with java # build db-java
+%bcond_with java # build Java library (Java 1.4 source with no option specified)
+%bcond_without tcl # don't build Tcl bindings
+%bcond_without static_libs # don't build static libraries
+%bcond_with default_db # use this db as default system db
#
-Summary: BSD database library for C
+%define ver 4.1.25
+%define patchlevel 3
+Summary: Berkeley DB database library for C
Summary(pl.UTF-8): Biblioteka C do obsługi baz Berkeley DB
Name: db4.1
-Version: 4.1.25
+Version: %{ver}.%{patchlevel}
Release: 1
License: BSD
Group: Libraries
-# alternative site (sometimes working): http://www.berkeleydb.com/
-#Source0Download: http://dev.sleepycat.com/downloads/releasehistorybdb.html
-Source0: http://downloads.sleepycat.com/db-%{version}.tar.gz
+#Source0Download: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html
+Source0: http://download.oracle.com/berkeley-db/db-%{ver}.tar.gz
# Source0-md5: df71961002b552c0e72c6e4e358f27e1
+%patchset_source -f http://download.oracle.com/berkeley-db/patches/db/%{ver}/patch.%{ver}.%g 1 %{patchlevel}
Patch0: db-o_direct.patch
-Patch1: http://www.sleepycat.com/update/4.1.25/patch.4.1.25.1
-URL: http://www.sleepycat.com/
+URL: http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html
BuildRequires: autoconf
BuildRequires: ed
-%{?with_java:BuildRequires: gcc-java}
+%{?with_java:BuildRequires: jdk}
BuildRequires: libstdc++-devel
-BuildRequires: tcl-devel >= 8.3.2
+BuildRequires: rpmbuild(macros) >= 1.426
+BuildRequires: sed >= 4.0
+%{?with_tcl:BuildRequires: tcl-devel >= 8.3.2}
+%if %{with default_db}
Provides: db = %{version}-%{release}
Obsoletes: db4
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%if %{without default_db}
%define _includedir %{_prefix}/include/db4.1
+%endif
%description
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -45,7 +55,12 @@
Summary(pl.UTF-8): Pliki nagłówkowe do biblioteki Berkeley Database
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+%if %{with default_db}
+Provides: db-devel = %{version}-%{release}
+Obsoletes: db-devel
+Obsoletes: db3-devel
Obsoletes: db4-devel
+%endif
%description devel
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -74,7 +89,12 @@
Summary(pl.UTF-8): Statyczne biblioteki Berkeley Database
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
+%if %{with default_db}
+Provides: db-static = %{version}-%{release}
+Obsoletes: db-static
+Obsoletes: db3-static
Obsoletes: db4-static
+%endif
%description static
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -102,8 +122,10 @@
Summary: Berkeley database library for C++
Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
Group: Libraries
+%if %{with default_db}
Provides: db-cxx = %{version}-%{release}
Obsoletes: db4-cxx
+%endif
%description cxx
Berkeley database library for C++.
@@ -112,25 +134,49 @@
Biblioteka baz danych Berkeley dla C++.
%package cxx-devel
-Summary: Berkeley database library for C++
-Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla C++
-Group: Libraries
+Summary: Header files for db-cxx library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki db-cxx
+Group: Development/Libraries
Requires: %{name}-cxx = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
-Obsoletes: db4-cxx
-Conflicts: db-devel < 4.1.25-3
+%if %{with default_db}
+Provides: db-cxx-devel = %{version}-%{release}
+Obsoletes: db-cxx-devel
+%endif
+Conflicts: db4.1-devel < 4.1.25-3
%description cxx-devel
-Berkeley database library for C++.
+Header files for db-cxx library.
%description cxx-devel -l pl.UTF-8
-Biblioteka baz danych Berkeley dla C++.
+Pliki nagłówkowe biblioteki db-cxx.
+
+%package cxx-static
+Summary: Static version of db-cxx library
+Summary(pl.UTF-8): Statyczna wersja biblioteki db-cxx
+Group: Development/Libraries
+Requires: %{name}-cxx-devel = %{version}-%{release}
+%if %{with default_db}
+Provides: db-cxx-static = %{version}-%{release}
+Obsoletes: db-cxx-static
+%endif
+Conflicts: db-static < 4.1.25.3
+
+%description cxx-static
+Static version of db-cxx library.
+
+%description cxx-static -l pl.UTF-8
+Statyczna wersja biblioteki db-cxx.
%package java
Summary: Berkeley database library for Java
Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Javy
Group: Libraries
+Requires: jpackage-utils
+%if %{with default_db}
Provides: db-java = %{version}-%{release}
+Obsoletes: db-java
+%endif
%description java
Berkeley database library for Java.
@@ -138,13 +184,32 @@
%description java -l pl.UTF-8
Biblioteka baz danych Berkeley dla Javy.
+%package java-devel
+Summary: Development files for db-java library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki db-java
+Group: Development/Languages/Java
+Requires: %{name}-java = %{version}-%{release}
+%if %{with default_db}
+Provides: db-java-devel = %{version}-%{release}
+Obsoletes: db-java-devel
+%endif
+Conflicts: db4.1-devel < 4.1.25.3
+
+%description java-devel
+Development files for db-java library.
+
+%description java-devel -l pl.UTF-8
+Pliki programistyczne biblioteki db-java.
+
%package tcl
Summary: Berkeley database library for Tcl
Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
Group: Development/Languages/Tcl
Requires: tcl
+%if %{with default_db}
Provides: db-tcl = %{version}-%{release}
Obsoletes: db4-tcl
+%endif
%description tcl
Berkeley database library for Tcl.
@@ -153,28 +218,33 @@
Biblioteka baz danych Berkeley dla Tcl.
%package tcl-devel
-Summary: Berkeley database library for Tcl
-Summary(pl.UTF-8): Biblioteka baz danych Berkeley dla Tcl
+Summary: Development files for db-tcl library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki db-tcl
Group: Development/Languages/Tcl
Requires: %{name}-tcl = %{version}-%{release}
-Requires: tcl
-Obsoletes: db4-tcl
+%if %{with default_db}
+Provides: db-tcl-devel = %{version}-%{release}
+Obsoletes: db-tcl-devel
+%endif
Conflicts: db-devel < 4.1.25-3
%description tcl-devel
-Berkeley database library for Tcl.
+Development files for db-tcl library.
%description tcl-devel -l pl.UTF-8
-Biblioteka baz danych Berkeley dla Tcl.
+Pliki programistyczne biblioteki db-tcl.
%package utils
Summary: Command line tools for managing Berkeley DB databases
Summary(pl.UTF-8): Narzędzia do obsługi baz Berkeley DB z linii poleceń
Group: Applications/Databases
Requires: %{name} = %{version}-%{release}
+%if %{with default_db}
Provides: db-utils = %{version}-%{release}
-Obsoletes: db-utils < 4.2
+Obsoletes: db-utils
+Obsoletes: db3-utils
Obsoletes: db4-utils
+%endif
%description utils
The Berkeley Database (Berkeley DB) is a programmatic toolkit that
@@ -199,15 +269,18 @@
poleceń.
%prep
-%setup -q -n db-%{version}
+%setup -q -n db-%{ver}
+# official patches
+%patchset_patch 1 %{patchlevel}
+
%patch0 -p1
-%patch1 -p0
%build
cd dist
sh s_config
cd ..
+%if %{with static_libs}
cp -a build_unix build_unix.static
cd build_unix.static
@@ -216,68 +289,129 @@
CXX="%{__cxx}"
CFLAGS="%{rpmcflags}"
CXXFLAGS="%{rpmcflags} -fno-implicit-templates"
-export CC CXX CFLAGS CXXFLAGS
+LDFLAGS="%{rpmcflags} %{rpmldflags}"
+export CC CXX CFLAGS CXXFLAGS LDFLAGS
../dist/%configure \
- --enable-compat185 \
--disable-shared \
--enable-static \
- --enable-rpc \
- --enable-cxx
+ --enable-compat185 \
+ --enable-cxx \
+ --enable-rpc
# (temporarily?) disabled because of compilation errors:
# --enable-dump185 \
%{__make} library_build
+cd ..
+%endif
-cd ../build_unix
+cd build_unix
../dist/%configure \
- --enable-compat185 \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
--enable-shared \
--disable-static \
- --enable-rpc \
+ --enable-compat185 \
--enable-cxx \
- --enable-tcl \
- --with-tcl=/usr/lib \
- %{?with_java:--enable-java}
+ --enable-rpc \
+ %{?with_java:--enable-java} \
+ %{?with_tcl:--enable-tcl --with-tcl=/usr/lib}
-%{__make} library_build \
+%{__make} -j1 library_build \
TCFLAGS='-I$(builddir) -I%{_includedir}'
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_bindir}}
+%if %{with java}
+install -d $RPM_BUILD_ROOT%{_javadir}
+%endif
-cd build_unix.static
-
-%{__make} library_install \
+%if %{with static_libs}
+%{__make} -C build_unix.static library_install \
bindir=$RPM_BUILD_ROOT%{_bindir} \
+ docdir=$RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs \
prefix=$RPM_BUILD_ROOT%{_prefix} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
includedir=$RPM_BUILD_ROOT%{_includedir}
+%endif
-cd ../build_unix
-
-%{__make} library_install \
+%{__make} -C build_unix library_install \
+ LIB_INSTALL_FILE_LIST="" \
bindir=$RPM_BUILD_ROOT%{_bindir} \
+ docdir=$RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs \
prefix=$RPM_BUILD_ROOT%{_prefix} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
- includedir=$RPM_BUILD_ROOT%{_includedir} \
- LIB_INSTALL_FILE_LIST=""
+ includedir=$RPM_BUILD_ROOT%{_includedir}
-#rm -rf examples_java
-#cp -a java/src/com/sleepycat/examples examples_java
+%if %{with default_db}
+install -d $RPM_BUILD_ROOT/%{_lib}
+mv $RPM_BUILD_ROOT%{_libdir}/libdb-4.1.so $RPM_BUILD_ROOT/%{_lib}
+%endif
cd $RPM_BUILD_ROOT%{_libdir}
+%if %{with static_libs}
mv -f libdb.a libdb-4.1.a
mv -f libdb_cxx.a libdb_cxx-4.1.a
+%endif
+%if %{with java}
+mv -f $RPM_BUILD_ROOT%{_libdir}/db.jar $RPM_BUILD_ROOT%{_javadir}/db-4.1.jar
+%endif
+%if %{with default_db}
+ln -sf /%{_lib}/libdb-4.1.so libdb.so
+ln -sf /%{_lib}/libdb-4.1.so libdb4.so
+ln -sf /%{_lib}/libdb-4.1.so libdb-4.1.so
+ln -sf /%{_lib}/libdb-4.1.so libndbm.so
+ln -sf libdb-4.1.la libdb.la
+ln -sf libdb-4.1.la libdb4.la
+ln -sf libdb-4.1.la libndbm.la
+ln -sf libdb_cxx-4.1.so libdb_cxx.so
+ln -sf libdb_cxx-4.1.la libdb_cxx.la
+%if %{with java}
+ln -sf libdb_java-4.1.la libdb_java.la
+ln -sf db-4.1.jar $RPM_BUILD_ROOT%{_javadir}/db.jar
+%endif
+%if %{with tcl}
+ln -sf libdb_tcl-4.1.so libdb_tcl.so
+ln -sf libdb_tcl-4.1.la libdb_tcl.la
+%endif
+%if %{with static_libs}
+ln -sf libdb-4.1.a libdb.a
+ln -sf libdb-4.1.a libdb4.a
+ln -sf libdb-4.1.a libndbm.a
+ln -sf libdb_cxx-4.1.a libdb_cxx.a
+%endif
+%endif
+
+sed -i "s/old_library=''/old_library='libdb-4.1.a'/" libdb-4.1.la
+sed -i "s/old_library=''/old_library='libdb_cxx-4.1.a'/" libdb_cxx-4.1.la
+
+cd -
+
+cd $RPM_BUILD_ROOT%{_bindir}
+mv -f berkeley_db_svc berkeley_db_svc-4.1
+%{?with_default_db:ln -sf berkeley_db_svc-4.1 berkeley_db_svc}
+for F in db_*; do
+ Fver=$(echo $F|sed 's/db_/db4.1_/')
+ mv $F $Fver
+ %{?with_default_db:ln -sf $Fver $F}
+done
+cd -
+rm -f examples_c*/tags
+install -d $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
+cp -rf examples_c/* $RPM_BUILD_ROOT%{_examplesdir}/db-%{version}
-mv -f libdb-4.1.la libdb-4.1.la.tmp
-mv -f libdb_cxx-4.1.la libdb_cxx-4.1.la.tmp
-sed -e "s/old_library=''/old_library='libdb-4.1.a'/" libdb-4.1.la.tmp > libdb-4.1.la
-sed -e "s/old_library=''/old_library='libdb_cxx-4.1.a'/" libdb_cxx-4.1.la.tmp > libdb_cxx-4.1.la
-rm -f libdb*.la.tmp
+install -d $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
+cp -rf examples_cxx/* $RPM_BUILD_ROOT%{_examplesdir}/db-cxx-%{version}
+
+%if %{with java}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
+cp -rf examples_java/* $RPM_BUILD_ROOT%{_examplesdir}/db-java-%{version}
+%else
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/db-%{version}-docs/api_java
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -294,19 +428,47 @@
%files
%defattr(644,root,root,755)
%doc LICENSE README
+%if %{with default_db}
+%attr(755,root,root) /%{_lib}/libdb-4.1.so
+%else
%attr(755,root,root) %{_libdir}/libdb-4.1.so
+%endif
+%dir %{_docdir}/db-%{version}-docs
+%{_docdir}/db-%{version}-docs/sleepycat
+%{_docdir}/db-%{version}-docs/index.html
%files devel
%defattr(644,root,root,755)
-%doc docs/{api*,ref,index.html,sleepycat,images} examples_c*
%{_libdir}/libdb-4.1.la
+%if %{with default_db}
+%attr(755,root,root) %{_libdir}/libdb-4.1.so
+%attr(755,root,root) %{_libdir}/libdb4.so
+%attr(755,root,root) %{_libdir}/libdb.so
+%attr(755,root,root) %{_libdir}/libndbm.so
+%{_libdir}/libdb4.la
+%{_libdir}/libdb.la
+%{_libdir}/libndbm.la
+%else
%dir %{_includedir}
+%endif
%{_includedir}/db.h
%{_includedir}/db_185.h
+%{_docdir}/db-%{version}-docs/api_c
+%{_docdir}/db-%{version}-docs/images
+%{_docdir}/db-%{version}-docs/ref
+%{_docdir}/db-%{version}-docs/reftoc.html
+%{_examplesdir}/db-%{version}
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*-4.1.a
+%{_libdir}/libdb-4.1.a
+%if %{with default_db}
+%{_libdir}/libdb4.a
+%{_libdir}/libdb.a
+%{_libdir}/libndbm.a
+%endif
+%endif
%files cxx
%defattr(644,root,root,755)
@@ -315,17 +477,46 @@
%files cxx-devel
%defattr(644,root,root,755)
%{_libdir}/libdb_cxx-4.1.la
+%if %{with default_db}
+%attr(755,root,root) %{_libdir}/libdb_cxx.so
+%{_libdir}/libdb_cxx.la
+%endif
%{_includedir}/cxx_common.h
%{_includedir}/cxx_except.h
%{_includedir}/db_cxx.h
+%{_docdir}/db-%{version}-docs/api_cxx
+%{_examplesdir}/db-cxx-%{version}
+
+%if %{with static_libs}
+%files cxx-static
+%defattr(644,root,root,755)
+%{_libdir}/libdb_cxx-4.1.a
+%if %{with default_db}
+%{_libdir}/libdb_cxx.a
+%endif
+%endif
%if %{with java}
%files java
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libdb_java*.so
-%{_libdir}/db.jar
+%attr(755,root,root) %{_libdir}/libdb_java-4.1.so
+%{_javadir}/db-4.1.jar
+%if %{with default_db}
+%{_javadir}/db.jar
+%endif
+
+%files java-devel
+%defattr(644,root,root,755)
+%{_libdir}/libdb_java-4.1.la
+%if %{with default_db}
+%attr(755,root,root) %{_libdir}/libdb_java.so
+%{_libdir}/libdb_java.la
+%endif
+%{_docdir}/db-%{version}-docs/java
+%{_examplesdir}/db-java-%{version}
%endif
+%if %{with tcl}
%files tcl
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libdb_tcl-4.1.so
@@ -333,22 +524,42 @@
%files tcl-devel
%defattr(644,root,root,755)
%{_libdir}/libdb_tcl-4.1.la
+%if %{with default_db}
+%attr(755,root,root) %{_libdir}/libdb_tcl.so
+%{_libdir}/libdb_tcl.la
+%endif
+%{_docdir}/db-%{version}-docs/api_tcl
+%endif
%files utils
%defattr(644,root,root,755)
-%doc docs/utility/*
+%attr(755,root,root) %{_bindir}/berkeley_db_svc-4.1
+%attr(755,root,root) %{_bindir}/db4.1_archive
+%attr(755,root,root) %{_bindir}/db4.1_checkpoint
+%attr(755,root,root) %{_bindir}/db4.1_deadlock
+%attr(755,root,root) %{_bindir}/db4.1_dump
+#%attr(755,root,root) %{_bindir}/db4.1_dump185
+%attr(755,root,root) %{_bindir}/db4.1_load
+%attr(755,root,root) %{_bindir}/db4.1_printlog
+%attr(755,root,root) %{_bindir}/db4.1_recover
+%attr(755,root,root) %{_bindir}/db4.1_stat
+%attr(755,root,root) %{_bindir}/db4.1_upgrade
+%attr(755,root,root) %{_bindir}/db4.1_verify
+%if %{with default_db}
%attr(755,root,root) %{_bindir}/berkeley_db_svc
-%attr(755,root,root) %{_bindir}/db*_archive
-%attr(755,root,root) %{_bindir}/db*_checkpoint
-%attr(755,root,root) %{_bindir}/db*_deadlock
-%attr(755,root,root) %{_bindir}/db*_dump
-#%attr(755,root,root) %{_bindir}/db*_dump185
-%attr(755,root,root) %{_bindir}/db*_load
-%attr(755,root,root) %{_bindir}/db*_printlog
-%attr(755,root,root) %{_bindir}/db*_recover
-%attr(755,root,root) %{_bindir}/db*_stat
-%attr(755,root,root) %{_bindir}/db*_upgrade
-%attr(755,root,root) %{_bindir}/db*_verify
+%attr(755,root,root) %{_bindir}/db_archive
+%attr(755,root,root) %{_bindir}/db_checkpoint
+%attr(755,root,root) %{_bindir}/db_deadlock
+%attr(755,root,root) %{_bindir}/db_dump
+#%attr(755,root,root) %{_bindir}/db_dump185
+%attr(755,root,root) %{_bindir}/db_load
+%attr(755,root,root) %{_bindir}/db_printlog
+%attr(755,root,root) %{_bindir}/db_recover
+%attr(755,root,root) %{_bindir}/db_stat
+%attr(755,root,root) %{_bindir}/db_upgrade
+%attr(755,root,root) %{_bindir}/db_verify
+%endif
+%{_docdir}/db-%{version}-docs/utility
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -356,6 +567,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.16 2011/12/15 20:09:55 qboosh
+- added 4.1.25.[23] patches
+- unified, added default_db,static_libs,tcl bconds and cxx-static,java-devel subpackages
+
Revision 1.15 2007/02/12 21:23:52 glen
- tabs in preamble
================================================================
Index: packages/db4.1/patch.4.1.25.2
diff -u /dev/null packages/db4.1/patch.4.1.25.2:1.1
--- /dev/null Thu Dec 15 21:10:00 2011
+++ packages/db4.1/patch.4.1.25.2 Thu Dec 15 21:09:55 2011
@@ -0,0 +1,617 @@
+*** dbinc/mp.h.orig 2004-02-02 10:24:53.000000000 -0800
+--- dbinc/mp.h 2004-02-02 10:26:27.000000000 -0800
+***************
+*** 149,154 ****
+--- 149,161 ----
+ * region lock).
+ */
+ DB_MPOOL_STAT stat; /* Per-cache mpool statistics. */
++
++ /*
++ * We track page puts so that we can decide when allocation is never
++ * going to succeed. We don't lock the field, all we care about is
++ * if it changes.
++ */
++ u_int32_t put_counter; /* Count of page put calls. */
+ };
+
+ struct __db_mpool_hash {
+*** mp/mp_fput.c.orig 2002-08-13 06:26:41.000000000 -0700
+--- mp/mp_fput.c 2004-02-02 10:22:35.000000000 -0800
+***************
+*** 19,24 ****
+--- 19,26 ----
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/db4.1/db4.1.spec?r1=1.15&r2=1.16&f=u
More information about the pld-cvs-commit
mailing list