287 lines
9.7 KiB
RPMSpec
287 lines
9.7 KiB
RPMSpec
%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: db51
|
|
Version: 5.1.25
|
|
Release: 5mamba
|
|
Summary: The Berkeley DB database library
|
|
Group: System/Libraries
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://www.oracle.com/technology/products/berkeley-db/index.html
|
|
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
|
|
Patch6: db51-5.1.25-gcc-8.patch
|
|
License: GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libgcc
|
|
## AUTOBUILDREQ-END
|
|
%if "%{stage1}" != "1"
|
|
BuildRequires: javapackages
|
|
%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 libdb%{majvershort}
|
|
Summary: The Berkeley DB database library
|
|
Group: System/Libraries
|
|
|
|
%description -n libdb%{majvershort}
|
|
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 db%{majvershort}-tools
|
|
Summary: Tools for the managing Berkeley DB
|
|
Group: System/Libraries
|
|
Requires: libdb%{majvershort} = %{version}-%{release}
|
|
|
|
%description -n db%{majvershort}-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 libdb%{majvershort}-devel
|
|
Summary: Development files for the Berkeley DB library.
|
|
Group: Development/Libraries
|
|
Requires: libdb%{majvershort} = %{version}-%{release}
|
|
|
|
%description -n libdb%{majvershort}-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 libdb%{majvershort}-static
|
|
Summary: Static library files for the Berkeley DB library.
|
|
Group: Development/Libraries
|
|
Requires: libdb%{majvershort} = %{version}-%{release}
|
|
|
|
%description -n libdb%{majvershort}-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 libdb%{majvershort}-java
|
|
Summary: Java bindings for the Berkeley DB library
|
|
Group: System/Libraries
|
|
Requires: libdb%{majvershort} = %{version}-%{release}
|
|
|
|
%description -n libdb%{majvershort}-java
|
|
Java bindings for the Berkeley DB library.
|
|
|
|
%package apidocs
|
|
Summary: Berkeley DB API documentation
|
|
Group: Documentation
|
|
|
|
%description apidocs
|
|
Berkeley DB API documentation.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -n db-%{version}
|
|
%patch6 -p1
|
|
|
|
%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} \
|
|
--libdir=%{_libdir} \
|
|
--datadir=%{_datadir} \
|
|
--enable-compat185 \
|
|
--includedir=%{_includedir}/db-%{majver} \
|
|
%if "%{stage1}" != "1"
|
|
--enable-java \
|
|
%endif
|
|
--with-mutex="$mutex"
|
|
|
|
# --enable-cxx \
|
|
# --program-suffix=-51
|
|
|
|
%make
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
cd build_unix
|
|
%makeinstall
|
|
# prefix=%{buildroot}%{_prefix} includedir=%{buildroot}%{_includedir}
|
|
|
|
rm -rf %{buildroot}/usr/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 db-%{majver}/$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
|
|
|
|
%posttrans -n libdb%{majvershort}-devel
|
|
if [ $1 -ge 1 ]; then
|
|
[ -d %{_includedir}/db%{majvershort} ] && rm -rf %{_includedir}/db%{majvershort}
|
|
[ -L %{_includedir}/db%{majvershort} ] || ln -s db-%{majver} %{_includedir}/db%{majvershort}
|
|
elif [ $1 -eq 0 ]; then
|
|
rm -f %{_includedir}/db%{majvershort}
|
|
fi
|
|
:
|
|
|
|
%files -n libdb%{majvershort}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libdb-%{majver}.so
|
|
#%{_libdir}/libdb_cxx-%{majver}.so
|
|
%{_libdir}/libdb.so.%{majver}
|
|
|
|
%files -n db%{majvershort}-tools
|
|
%defattr(-,root,root)
|
|
%{_bindir}/*
|
|
|
|
%files -n libdb%{majvershort}-devel
|
|
%defattr(-,root,root)
|
|
%dir %{_includedir}/db-%{majver}
|
|
%{_includedir}/db-%{majver}/*
|
|
%{_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
|
|
|
|
%files -n libdb%{majvershort}-static
|
|
%defattr(-,root,root)
|
|
%{_libdir}/*.a
|
|
|
|
%if "%{stage1}" != "1"
|
|
%files -n libdb%{majvershort}-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
|
|
* Sun Jun 21 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.25-5mamba
|
|
- don't obsolete libdb
|
|
|
|
* Sat Oct 15 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.25-4mamba
|
|
- install headers in more canonical patch %{_includedir}/db-5.1 insted of %{_includedir}/db51; add legacy symlink
|
|
|
|
* Sat Mar 19 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.25-3mamba
|
|
- add libdb.so and libdb_cxx.so symlinks
|
|
|
|
* Mon Mar 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.1.25-2mamba
|
|
- make this the system default Berkeley DB
|
|
|
|
* Thu Feb 03 2011 Automatic Build System <autodist@mambasoft.it> 5.1.25-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Fri Sep 10 2010 Automatic Build System <autodist@mambasoft.it> 5.1.19-1mamba
|
|
- automatic update to 5.1.19 by autodist
|
|
|
|
* Fri Jul 02 2010 Automatic Build System <autodist@mambasoft.it> 5.0.26-1mamba
|
|
- automatic update to 5.0.26 by autodist
|
|
|
|
* Sat May 22 2010 Automatic Build System <autodist@mambasoft.it> 5.0.21-1mamba
|
|
- automatic update to 5.0.21 by autodist
|
|
|
|
* Thu Dec 31 2009 Automatic Build System <autodist@mambasoft.it> 4.8.26-1mamba
|
|
- automatic update to 4.8.26 by autodist
|
|
|
|
* Fri Sep 25 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.24-1mamba
|
|
- update to 4.8.24
|
|
|
|
* Thu Jul 03 2008 gil <puntogil@libero.it> 4.7.25-1mamba
|
|
- update to version 4.7.25
|
|
- removed patches
|
|
|
|
* Wed Jun 04 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.52-8mamba
|
|
- specfile updated
|
|
|
|
* Thu Jul 13 2006 Davide Madrisan <davide.madrisan@qilinux.it> 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 <silvan.calarco@mambasoft.it> 4.2.52-6qilnx
|
|
- add OpenOffice patch
|
|
|
|
* Mon Oct 24 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.52-5qilnx
|
|
- do not link against libpthread
|
|
|
|
* Mon Oct 24 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.52-4qilnx
|
|
- rebuild with gcj
|
|
|
|
* Wed Feb 02 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.52-3qilnx
|
|
- rebuilt with java bindings
|
|
|
|
* Tue Jul 27 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.25-8qilnx
|
|
- new version build
|
|
- source RPM renamed to db42 (should cohexist with libdb4)
|
|
|
|
* Sun May 09 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-8qilnx
|
|
- added libdb.so provides
|
|
|
|
* Fri May 07 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-7qilnx
|
|
- fixed symlinks for compatibility
|
|
|
|
* Fri May 07 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-6qilnx
|
|
- rebuild with --enable-compat185
|
|
|
|
* Mon Sep 15 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-5qilnx
|
|
- Added symlink /usr/include/db.h so that db4 is system default version
|
|
|
|
* Tue Sep 09 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-4qilnx
|
|
- Moved includes to /usr/include/db4 for devel packages co-existence
|
|
|
|
* Fri Jul 25 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.1.25-3qilnx
|
|
- Removed compat185 (it looks broken, I'll try to use db2's compat185)
|
|
|
|
* Thu Jul 24 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.1.25-2qilnx
|
|
- Enabled compatibiliy with version 185
|
|
|
|
* Tue Apr 22 2003 Luca Tinelli <luca.tinelli@qinet.it> 4.1.25-1qilnx
|
|
- Creation of db4 package
|