provide libdb-5.3.so(DB5_3)(64bit) for mailspring-bin, remove -java and -static subpackages [release 5.3.28-2mamba;Tue Oct 10 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 21:39:52 +01:00
parent 49e6e85444
commit 4afe745506

197
db53.spec
View File

@ -3,13 +3,13 @@
%define majvershort %(echo %version | cut -d . -f1-2 | tr -d .) %define majvershort %(echo %version | cut -d . -f1-2 | tr -d .)
Name: db53 Name: db53
Version: 5.3.28 Version: 5.3.28
Release: 1mamba Release: 2mamba
Summary: The Berkeley DB database library Summary: The Berkeley DB database library
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.oracle.com/technology/products/berkeley-db/index.html 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
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
# For mt19937db.c # For mt19937db.c
@ -82,6 +82,12 @@ It is used by many applications, including Python and Perl, so this should be in
%package -n libdb53 %package -n libdb53
Summary: The Berkeley DB database library Summary: The Berkeley DB database library
Group: System/Libraries Group: System/Libraries
Obsoletes: libdb53-java <= 5.3.28-1mamba
%ifarch x86_64 aarch64
Provides: libdb-5.3.so(DB5_3)(64bit)
%else
Provides: libdb-5.3.so(DB5_3)
%endif
%description -n libdb53 %description -n libdb53
The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications.
@ -135,35 +141,15 @@ Requires: libdb53 = %{version}-%{release}
Requires: libdb53-cxx = %{version}-%{release} Requires: libdb53-cxx = %{version}-%{release}
Requires: libdb53-tcl = %{version}-%{release} Requires: libdb53-tcl = %{version}-%{release}
Requires: libdb53-sql = %{version}-%{release} Requires: libdb53-sql = %{version}-%{release}
Obsoletes: libdb53-java-devel <= 5.3.28-1mamba
Provides: libdb53-static
Obsoletes: libdb53-static <= 5.3.28-1mamba
%description -n libdb53-devel %description -n libdb53-devel
The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. 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. This package contains the header files, libraries, and documentation for building programs which use the Berkeley DB.
%package -n libdb53-static %debug_package
Summary: Static library files for the Berkeley DB library.
Group: Development/Libraries
Requires: libdb53 = %{version}-%{release}
%description -n libdb53-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 libdb53-java
Summary: Java bindings for the Berkeley DB library
Group: System/Libraries
Requires: libdb53 = %{version}-%{release}
%description -n libdb53-java
Java bindings for the Berkeley DB library.
%package -n libdb53-java-devel
Summary: Java bindings for the Berkeley DB library
Group: Development/Libraries
Requires: libdb53-java = %{version}-%{release}
%description -n libdb53-java-devel
Java bindings for the Berkeley DB library.
%prep %prep
%setup -q -n db-%{version} -a1 %setup -q -n db-%{version} -a1
@ -172,37 +158,42 @@ Java bindings for the Berkeley DB library.
cp %{SOURCE2} . cp %{SOURCE2} .
#tar -xf %{SOURCE3} #tar -xf %{SOURCE3}
%patch0 -p1 %patch 0 -p1
pushd db.1.85/PORT/linux pushd db.1.85/PORT/linux
%patch10 -p0 %patch 10 -p0
popd popd
pushd db.1.85 pushd db.1.85
%patch11 -p0 %patch 11 -p0
%patch12 -p0 %patch 12 -p0
%patch13 -p0 %patch 13 -p0
%patch20 -p1 %patch 20 -p1
popd popd
%patch22 -p1 %patch 22 -p1
%patch24 -p1 %patch 24 -p1
%patch25 -p1 %patch 25 -p1
%patch26 -p1 %patch 26 -p1
%patch27 -p1 %patch 27 -p1
%patch28 -p1 %patch 28 -p1
%patch29 -p1 %patch 29 -p1
%patch30 -p1 %patch 30 -p1
%patch31 -p1 %patch 31 -p1
%patch32 -p1 %patch 32 -p1
%patch33 -p1 %patch 33 -p1
%patch34 -p1 %patch 34 -p1
%patch35 -p1 %patch 35 -p1
%patch36 -p1 %patch 36 -p1
%patch37 -p1 %patch 37 -p1
%patch38 -p1 %patch 38 -p1
%patch39 -p1 %patch 39 -p1
# Update config files to understand aarch64
for dir in dist lang/sql/sqlite lang/sql/jdbc lang/sql/odbc; do
sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," $dir/config.{sub,guess}
done
%build %build
#:<< _EOF #:<< _EOF
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CFLAGS="%{optflags} -fno-strict-aliasing"
CFLAGS="$CFLAGS -DSHAREDSTATEDIR='\"%{_sharedstatedir}\"' -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -I../../../lang/sql/sqlite/ext/fts3/" CFLAGS="$CFLAGS -DSHAREDSTATEDIR='\"%{_sharedstatedir}\"' -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -I../../../lang/sql/sqlite/ext/fts3/"
export CFLAGS export CFLAGS
@ -214,11 +205,6 @@ test -d dist/dist-tls || mkdir dist/dist-tls
/bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo /bin/sh libtool --tag=CC --mode=compile %{__cc} $RPM_OPT_FLAGS -Idb.1.85/PORT/%{_os}/include -D_REENTRANT -c util/db_dump185.c -o dist/dist-tls/db_dump185.lo
/bin/sh libtool --tag=LD --mode=link %{__cc} -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a /bin/sh libtool --tag=LD --mode=link %{__cc} -o dist/dist-tls/db_dump185 dist/dist-tls/db_dump185.lo db.1.85/PORT/%{_os}/libdb.a
# Update config files to understand aarch64
#for dir in dist lang/sql/sqlite lang/sql/jdbc lang/sql/odbc; do
# cp /usr/lib/rpm/redhat/config.{guess,sub} "$dir"
#done
pushd dist/dist-tls pushd dist/dist-tls
ln -s ../configure . ln -s ../configure .
%configure -C \ %configure -C \
@ -230,12 +216,13 @@ ln -s ../configure .
--with-tcl=%{_libdir} \ --with-tcl=%{_libdir} \
--enable-cxx \ --enable-cxx \
--enable-sql \ --enable-sql \
--enable-java \
--enable-test \ --enable-test \
--disable-rpath \ --disable-rpath \
--program-suffix=-53 \ --program-suffix=-53 \
--with-tcl=%{_prefix}/lib/tcl8.6 --with-tcl=%{_prefix}/lib/tcl8.6
# --enable-java \
# Remove libtool predep_objects and postdep_objects wonkiness so that # Remove libtool predep_objects and postdep_objects wonkiness so that
# building without -nostdlib doesn't include them twice. Because we # building without -nostdlib doesn't include them twice. Because we
# already link with g++, weird stuff happens if you don't let the # already link with g++, weird stuff happens if you don't let the
@ -256,32 +243,6 @@ fi
echo "source ../../test/tcl/test.tcl; r env; r mut; r memp" | tclsh echo "source ../../test/tcl/test.tcl; r env; r mut; r memp" | tclsh
popd popd
:<< ___OLD
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} \
--datadir=%{_datadir} \
--includedir=%{_includedir}/db53 \
--enable-cxx \
--enable-compat185 \
%if "%{stage1}" != "1"
--enable-java \
%endif
--with-mutex="$mutex" \
--program-suffix=-53
___OLD
%install %install
%makeinstall STRIP=/bin/true -C dist/dist-tls %makeinstall STRIP=/bin/true -C dist/dist-tls
@ -300,10 +261,10 @@ for i in db.h db_cxx.h db_185.h; do
ln -s %{name}/$i ${RPM_BUILD_ROOT}%{_includedir} ln -s %{name}/$i ${RPM_BUILD_ROOT}%{_includedir}
done done
# Move java jar file to the correct place ## Move java jar file to the correct place
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/java #mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/java
mv ${RPM_BUILD_ROOT}%{_libdir}/*.jar ${RPM_BUILD_ROOT}%{_datadir}/java #mv ${RPM_BUILD_ROOT}%{_libdir}/*.jar ${RPM_BUILD_ROOT}%{_datadir}/java
# Eliminate installed doco # Eliminate installed doco
rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs rm -rf ${RPM_BUILD_ROOT}%{_prefix}/docs
@ -323,38 +284,6 @@ chrpath -d ${RPM_BUILD_ROOT}%{_libdir}/*.so ${RPM_BUILD_ROOT}%{_bindir}/*
#mv examples docs #mv examples docs
#mv man/* ${RPM_BUILD_ROOT}%{_mandir}/man1 #mv man/* ${RPM_BUILD_ROOT}%{_mandir}/man1
:<< ___OLD
# 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 db53/$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
___OLD
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -370,23 +299,23 @@ ___OLD
%post -n libdb53-sql -p /sbin/ldconfig %post -n libdb53-sql -p /sbin/ldconfig
%postun -n libdb53-sql -p /sbin/ldconfig %postun -n libdb53-sql -p /sbin/ldconfig
%post -n libdb53-java -p /sbin/ldconfig
%postun -n libdb53-java -p /sbin/ldconfig
%files -n libdb53 %files -n libdb53
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libdb-%{MAJver}.so %{_libdir}/libdb-%{MAJver}.so
%{_libdir}/libdb-%{majver}.so %{_libdir}/libdb-%{majver}.so
%files -n libdb53-cxx %files -n libdb53-cxx
%defattr(-,root,root)
%{_libdir}/libdb_cxx-%{MAJver}.so %{_libdir}/libdb_cxx-%{MAJver}.so
%{_libdir}/libdb_cxx-%{majver}.so %{_libdir}/libdb_cxx-%{majver}.so
%files -n libdb53-tcl %files -n libdb53-tcl
%defattr(-,root,root)
%{_libdir}/libdb_tcl-%{MAJver}.so %{_libdir}/libdb_tcl-%{MAJver}.so
%{_libdir}/libdb_tcl-%{majver}.so %{_libdir}/libdb_tcl-%{majver}.so
%files -n libdb53-sql %files -n libdb53-sql
%defattr(-,root,root)
%{_libdir}/libdb_sql-%{MAJver}.so %{_libdir}/libdb_sql-%{MAJver}.so
%{_libdir}/libdb_sql-%{majver}.so %{_libdir}/libdb_sql-%{majver}.so
@ -401,6 +330,7 @@ ___OLD
%{_includedir}/db.h %{_includedir}/db.h
%{_includedir}/db_185.h %{_includedir}/db_185.h
%{_includedir}/db_cxx.h %{_includedir}/db_cxx.h
%{_libdir}/*.a
%{_libdir}/libdb.so %{_libdir}/libdb.so
%{_libdir}/libdb_cxx.so %{_libdir}/libdb_cxx.so
%{_libdir}/libdb_sql.so %{_libdir}/libdb_sql.so
@ -408,25 +338,10 @@ ___OLD
%doc docs examples %doc docs examples
#%{_docdir}/libdb4-%{version}/* #%{_docdir}/libdb4-%{version}/*
%files -n libdb53-static
%defattr(-,root,root)
%{_libdir}/*.a
%if "%{stage1}" != "1"
%files -n libdb53-java
%defattr(-,root,root)
%{_libdir}/libdb_java-%{MAJver}.so
%{_libdir}/libdb_java-%{majver}.so
%{_libdir}/libdb_java-%{majver}_g.so
%{_datadir}/java/db.jar
%files -n libdb53-java-devel
%defattr(-,root,root)
%{_libdir}/libdb_java.so
%endif
%changelog %changelog
* Tue Oct 10 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 5.3.28-2mamba
- provide libdb-5.3.so(DB5_3)(64bit) for mailspring-bin, remove -java and -static subpackages
* Sat Jun 22 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.3.28-1mamba * Sat Jun 22 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 5.3.28-1mamba
- update to 5.3.28 - update to 5.3.28
@ -503,7 +418,7 @@ ___OLD
* Fri May 07 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-6qilnx * Fri May 07 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-6qilnx
- rebuild with --enable-compat185 - rebuild with --enable-compat185
* Tue Sep 15 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-5qilnx * 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 - 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 * Tue Sep 09 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.25-4qilnx