%define majver %(echo %version | cut -d . -f1-2) %define MAJver %(echo %version | cut -d . -f1) %define majvershort %(echo %version | cut -d . -f1-2 | tr -d .) Name: db Version: 18.1.40 Release: 1mamba Summary: The Berkeley DB database library Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://www.oracle.com/database/technologies/related/berkeleydb-downloads.html Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz #Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz Patch2: db4-jni-casting.diff # from http://www.stanford.edu/services/directory/openldap/configuration/patches/db/ Patch3: bdb-transactions.diff Patch4: btree.diff Patch5: java.diff License: Affero GNU Public License ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libopenssl-devel BuildRequires: libstdc++6-devel ## AUTOBUILDREQ-END %if "%{stage1}" != "1" BuildRequires: jpackage-utils BuildRequires: jdk %endif BuildRequires: sharutils %description The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is used by many applications, including Python and Perl, so this should be installed on all systems. %package -n lib%{name} Summary: The Berkeley DB database library Group: System/Libraries %description -n lib%{name} The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. The Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching, and database recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is used by many applications, including Python and Perl, so this should be installed on all systems. %package -n %{name}-tools Summary: Tools for the managing Berkeley DB Group: System/Libraries Requires: lib%{name} = %{version}-%{release} %description -n %{name}-tools The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. This package contains the tools for managing Berkeley DB. %package -n lib%{name}-devel Summary: Development files for the Berkeley DB library. Group: Development/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-devel The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. This package contains the header files, libraries, and documentation for building programs which use the Berkeley DB. %package -n lib%{name}-static Summary: Static library files for the Berkeley DB library. Group: Development/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-static The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. This package contains the static library files for the Berkeley DB library. %package -n lib%{name}-java Summary: Java bindings for the Berkeley DB library Group: System/Libraries Requires: lib%{name} = %{version}-%{release} %description -n lib%{name}-java Java bindings for the Berkeley DB library. %debug_package %prep %setup -q -n db-%{version} mkdir docs/{bdb-sql,gsg_db_server} %build cd build_unix case "%{_target_cpu}" in i586) mutex="x86/gcc-assembly" ;; ppc) mutex="PPC/gcc-assembly" ;; arm) mutex="ARM/gcc-assembly" ;; x86_64) mutex="x86_64/gcc-assembly" ;; *) mutex="UNIX/fcntl" ;; esac JAVA_HOME=%{_jvmdir}/jdk/ \ ../dist/configure \ --prefix=%{_prefix} \ --docdir=%{_docdir}/db \ --libdir=%{_libdir} \ --datadir=%{_datadir} \ --includedir=%{_includedir}/%{name} \ --enable-cxx \ --enable-compat185 \ %if "%{stage1}" != "1" --enable-java \ %endif --with-mutex="$mutex" %make %install cd build_unix %makeinstall # prefix=%{buildroot}%{_prefix} includedir=%{buildroot}%{_includedir} mkdir -p %{buildroot}%{_datadir}/doc/libdb4-%{version} mv %{buildroot}%{_prefix}/docs/* \ %{buildroot}%{_datadir}/doc/libdb4-%{version} rmdir %{buildroot}%{_prefix}/docs # make this version thre system default pushd %{buildroot}%{_bindir} find * -exec ln -s {} {}-%{majvershort} \; popd #for f in db.h db_185.h db_cxx.h; do # ln -s %{name}/$f %{buildroot}%{_includedir}/$f #done # fix strange permissions chmod 755 %{buildroot}%{_bindir}/* ln -s libdb-%{majver}.so %{buildroot}%{_libdir}/libdb.so.%{majver} %if "%{stage1}" != "1" ln -s libdb_java-%{majver}.so %{buildroot}%{_libdir}/libdb_java.so.%{majver} mkdir -p %{buildroot}%{_datadir}/java mv %{buildroot}%{_libdir}/*.jar %{buildroot}%{_datadir}/java/ %endif #rm -f %{buildroot}%{_libdir}/libdb.so #rm -f %{buildroot}%{_libdir}/libdb_cxx.so %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -n lib%{name} %defattr(-,root,root) %{_libdir}/libdb-%{majver}.so %{_libdir}/libdb_cxx-%{majver}.so %{_libdir}/libdb.so.%{majver} %files -n %{name}-tools %defattr(-,root,root) %{_bindir}/* %files -n lib%{name}-devel %defattr(-,root,root) %dir %{_includedir}/%{name} %{_includedir}/%{name}/* #%{_includedir}/db.h #%{_includedir}/db_185.h #%{_includedir}/db_cxx.h %{_libdir}/*.la %{_libdir}/libdb-%{MAJver}.so %{_libdir}/libdb_cxx.so %{_libdir}/libdb_cxx-%{MAJver}.so %{_libdir}/libdb.so %{_docdir}/libdb4-%{version}/* %files -n lib%{name}-static %defattr(-,root,root) %{_libdir}/*.a %if "%{stage1}" != "1" %files -n lib%{name}-java %defattr(-,root,root) %{_libdir}/libdb_java.so %{_libdir}/libdb_java-%{MAJver}.so %{_libdir}/libdb_java-%{majver}.so %{_libdir}/libdb_java-%{majver}_g.so %{_libdir}/libdb_java.so.%{majver} %{_datadir}/java/*.jar %endif %changelog * Thu Jun 02 2022 Silvan Calarco 18.1.40-1mamba - update to 18.1.40 * Wed Dec 20 2017 Automatic Build System 6.2.32-1mamba - automatic version update by autodist * Fri Apr 15 2016 Automatic Build System 6.2.23-1mamba - automatic version update by autodist * Wed Jun 24 2015 Automatic Build System 6.1.26-1mamba - automatic version update by autodist * Mon Apr 27 2015 Automatic Build System 6.1.23-1mamba - automatic version update by autodist * Wed Jul 09 2014 Silvan Calarco 6.1.19-2mamba - rename from db60 to db * Wed Jul 09 2014 Automatic Build System 6.1.19-1mamba - automatic version update by autodist * Sat Mar 08 2014 Automatic Build System 6.0.30-1mamba - automatic version update by autodist * Tue Jul 09 2013 Silvan Calarco 6.0.20-2mamba - renamed from db53 to db60 * Sun Jul 07 2013 Automatic Build System 6.0.20-1mamba - automatic version update by autodist * Tue Jun 11 2013 Automatic Build System 6.0.19-1mamba - automatic version update by autodist * Tue May 28 2013 Silvan Calarco 5.3.21-1mamba - update to 5.3.21 * Tue Sep 20 2011 Automatic Build System 5.2.36-1mamba - automatic version update by autodist * Wed Aug 31 2011 Silvan Calarco 5.2.28-2mamba - renamed from db51 to db52 using --program-suffix=-52 to keep 5.1 still the default * Tue Jun 14 2011 Automatic Build System 5.2.28-1mamba - automatic update by autodist * Sat Mar 19 2011 Silvan Calarco 5.1.25-3mamba - add libdb.so and libdb_cxx.so symlinks * Mon Mar 07 2011 Silvan Calarco 5.1.25-2mamba - make this the system default Berkeley DB * Thu Feb 03 2011 Automatic Build System 5.1.25-1mamba - automatic update by autodist * Fri Sep 10 2010 Automatic Build System 5.1.19-1mamba - automatic update to 5.1.19 by autodist * Fri Jul 02 2010 Automatic Build System 5.0.26-1mamba - automatic update to 5.0.26 by autodist * Sat May 22 2010 Automatic Build System 5.0.21-1mamba - automatic update to 5.0.21 by autodist * Thu Dec 31 2009 Automatic Build System 4.8.26-1mamba - automatic update to 4.8.26 by autodist * Fri Sep 25 2009 Silvan Calarco 4.8.24-1mamba - update to 4.8.24 * Thu Jul 03 2008 gil 4.7.25-1mamba - update to version 4.7.25 - removed patches * Wed Jun 04 2008 Silvan Calarco 4.2.52-8mamba - specfile updated * Thu Jul 13 2006 Davide Madrisan 4.2.52-7qilnx - fixed openldap warning: "BerkeleyDB 4.2.52 library needs TXN patch!" - official patches applied - fixed permissions of binary files * Wed Oct 26 2005 Silvan Calarco 4.2.52-6qilnx - add OpenOffice patch * Mon Oct 24 2005 Silvan Calarco 4.2.52-5qilnx - do not link against libpthread * Mon Oct 24 2005 Silvan Calarco 4.2.52-4qilnx - rebuild with gcj * Wed Feb 02 2005 Silvan Calarco 4.2.52-3qilnx - rebuilt with java bindings * Tue Jul 27 2004 Silvan Calarco 4.2.25-8qilnx - new version build - source RPM renamed to db42 (should cohexist with libdb4) * Sun May 09 2004 Silvan Calarco 4.1.25-8qilnx - added libdb.so provides * Fri May 07 2004 Silvan Calarco 4.1.25-7qilnx - fixed symlinks for compatibility * Fri May 07 2004 Silvan Calarco 4.1.25-6qilnx - rebuild with --enable-compat185 * Mon Sep 15 2003 Silvan Calarco 4.1.25-5qilnx - Added symlink /usr/include/db.h so that db4 is system default version * Tue Sep 09 2003 Silvan Calarco 4.1.25-4qilnx - Moved includes to /usr/include/db4 for devel packages co-existence * Fri Jul 25 2003 Silvan Calarco 4.1.25-3qilnx - Removed compat185 (it looks broken, I'll try to use db2's compat185) * Thu Jul 24 2003 Silvan Calarco 4.1.25-2qilnx - Enabled compatibiliy with version 185 * Tue Apr 22 2003 Luca Tinelli 4.1.25-1qilnx - Creation of db4 package