2010-11-16 16:42:39 +01:00
|
|
|
#
|
2011-05-24 08:59:10 +02:00
|
|
|
# spec file for package libdb_java-4_8
|
2010-11-16 16:42:39 +01:00
|
|
|
#
|
2023-03-10 12:04:33 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2010-11-16 16:42:39 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-20 13:42:12 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-11-16 16:42:39 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define generic_name db
|
|
|
|
%define major 4
|
|
|
|
%define minor 8
|
2011-09-28 20:20:09 +02:00
|
|
|
Name: libdb_java-4_8
|
|
|
|
Version: %{major}.%{minor}.30
|
2011-12-20 14:44:14 +01:00
|
|
|
Release: 0
|
2011-09-28 20:20:09 +02:00
|
|
|
Summary: Java Bindings for the Berkeley DB
|
2023-06-23 12:51:34 +02:00
|
|
|
License: BSD-3-Clause AND Sleepycat
|
2010-11-16 16:42:39 +01:00
|
|
|
Group: Productivity/Databases/Servers
|
2019-08-19 09:32:37 +02:00
|
|
|
URL: https://oracle.com/technetwork/products/berkeleydb/
|
2016-03-31 15:31:58 +02:00
|
|
|
Source: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
|
2012-01-09 13:57:39 +01:00
|
|
|
Source1: %{name}.changes
|
2011-09-28 20:20:09 +02:00
|
|
|
Patch0: db-%{version}.patch
|
2018-01-09 17:10:09 +01:00
|
|
|
# PATCH-FIX-OPENSUSE Fix compilation with Java 10 (10-internal)
|
|
|
|
Patch1: libdb_java-4_8-fix-java10-comp.patch
|
2018-03-13 10:39:19 +01:00
|
|
|
# PATCH-FIX-OPENSUSE Fix build with GCC8, conflict with reserved builtin name
|
|
|
|
Patch2: libdb-fix-atomic.patch
|
2011-12-20 14:44:14 +01:00
|
|
|
BuildRequires: autoconf
|
2011-09-28 20:20:09 +02:00
|
|
|
BuildRequires: gcc-c++
|
2022-04-12 15:24:38 +02:00
|
|
|
BuildRequires: java-sdk >= 1.8
|
2011-09-28 20:20:09 +02:00
|
|
|
BuildRequires: unzip
|
2010-11-16 16:42:39 +01:00
|
|
|
Requires: libdb-%{major}_%{minor} = %{version}
|
2016-03-31 15:31:58 +02:00
|
|
|
Conflicts: libdb_java-4_5
|
2010-11-16 16:42:39 +01:00
|
|
|
Provides: db-java = %{version}
|
|
|
|
|
|
|
|
%description
|
|
|
|
These are the Java bindings for the Berkeley DB. They are needed for
|
|
|
|
the Java support of db and dbxml.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Java Bindings for the Berkeley DB
|
2012-11-17 16:39:03 +01:00
|
|
|
Group: Productivity/Databases/Servers
|
2010-11-16 16:42:39 +01:00
|
|
|
Requires: %{name} = %{version}
|
2011-09-28 20:20:09 +02:00
|
|
|
Requires: glibc-devel
|
2013-06-16 15:28:13 +02:00
|
|
|
Conflicts: libdb_java-4_5-devel
|
2016-03-31 15:31:58 +02:00
|
|
|
Provides: db-java-devel = %{version}
|
2010-11-16 16:42:39 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
These are the Java bindings for the Berkeley DB. They are needed for
|
|
|
|
the Java support of db and dbxml.
|
|
|
|
|
|
|
|
These are the development files.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{generic_name}-%{version}
|
2024-02-29 20:07:28 +01:00
|
|
|
%patch -P 0
|
|
|
|
%patch -P 1 -p1
|
|
|
|
%patch -P 2
|
2010-11-16 16:42:39 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd dist
|
2012-01-09 13:57:39 +01:00
|
|
|
# dist/RELEASE codes the build date into the binary.
|
|
|
|
# Use last change of changes file instead
|
2016-03-31 15:31:58 +02:00
|
|
|
LAST_MOD=`stat --format="%%Y" %{SOURCE1}`
|
|
|
|
DIST_DATE=`date '+%%B %%e, %%Y' --date="@$LAST_MOD"`
|
2012-01-09 13:57:39 +01:00
|
|
|
sed -i -e "s/^DB_RELEASE_DATE=.*$/DB_RELEASE_DATE=\"$DIST_DATE\"/" RELEASE
|
2010-11-16 16:42:39 +01:00
|
|
|
./s_config
|
2011-09-28 20:20:09 +02:00
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing"
|
2010-11-16 16:42:39 +01:00
|
|
|
CC=gcc
|
|
|
|
export CFLAGS CXXFLAGS CC
|
|
|
|
#
|
|
|
|
# Build now the NPTL version
|
|
|
|
#
|
|
|
|
mkdir ../build_nptl
|
|
|
|
cd ../build_nptl
|
2019-08-19 09:32:37 +02:00
|
|
|
%define _configure ../dist/configure
|
|
|
|
%configure \
|
|
|
|
--enable-compat185 --disable-dump185 \
|
|
|
|
--enable-shared --disable-static \
|
|
|
|
--enable-cxx \
|
2011-09-28 20:20:09 +02:00
|
|
|
--with-mutex="POSIX/pthreads/library" \
|
2022-04-12 15:24:38 +02:00
|
|
|
--enable-java JAVACFLAGS="-source 1.8 -target 1.8" \
|
2019-08-19 09:32:37 +02:00
|
|
|
%ifarch %{arm}
|
2011-09-29 15:38:50 +02:00
|
|
|
%{_target_cpu}-suse-linux-gnueabi
|
|
|
|
%else
|
2010-11-16 16:42:39 +01:00
|
|
|
%{_target_cpu}-suse-linux
|
2011-09-29 15:38:50 +02:00
|
|
|
%endif
|
2010-11-16 16:42:39 +01:00
|
|
|
# Make sure O_DIRECT is really disabled (build host could have old kernel)
|
|
|
|
perl -pi -e 's/#define HAVE_O_DIRECT 1/#undef HAVE_O_DIRECT/' db_config.h
|
2011-09-28 20:20:09 +02:00
|
|
|
# Remove libtool predep_objects and postdep_objects wonkiness
|
|
|
|
perl -pi -e 's/^predep_objects=".*$/predep_objects=""/' libtool
|
|
|
|
perl -pi -e 's/^postdep_objects=".*$/postdep_objects=""/' libtool
|
|
|
|
perl -pi -e 's/-shared -nostdlib/-shared/' libtool
|
|
|
|
|
|
|
|
make %{?_smp_mflags} LIBSO_LIBS='$(LIBS)' LIBXSO_LIBS='$(LIBS)'" -L%{_libdir} -lstdc++"
|
2010-11-16 16:42:39 +01:00
|
|
|
|
|
|
|
%install
|
2011-09-28 20:20:09 +02:00
|
|
|
mkdir -p %{buildroot}%{_includedir}/db4
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
2010-11-16 16:42:39 +01:00
|
|
|
cd build_nptl
|
2019-08-19 09:32:37 +02:00
|
|
|
%make_install STRIP=true
|
2010-11-16 16:42:39 +01:00
|
|
|
cd ..
|
|
|
|
# make ldd happy:
|
2011-09-28 20:20:09 +02:00
|
|
|
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
2010-11-16 16:42:39 +01:00
|
|
|
# Fix header file installation
|
2011-09-28 20:20:09 +02:00
|
|
|
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db4
|
|
|
|
echo "#include <db4/db.h>" > %{buildroot}%{_includedir}/db.h
|
|
|
|
echo "#include <db4/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
|
|
|
echo "#include <db4/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
2010-11-16 16:42:39 +01:00
|
|
|
# remove dangling tags symlink from examples.
|
|
|
|
rm -f examples_cxx/tags
|
|
|
|
rm -f examples_c/tags
|
|
|
|
# Move documentation to the right directory
|
2016-03-31 15:31:58 +02:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
|
|
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{_docdir}/%{name}
|
|
|
|
cp -a examples_cxx examples_c %{buildroot}/%{_docdir}/%{name}
|
|
|
|
cp -a LICENSE README %{buildroot}/%{_docdir}/%{name}
|
2011-09-28 20:20:09 +02:00
|
|
|
# Remove api documentation for C++, Java and TCL
|
2016-03-31 15:31:58 +02:00
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/csharp
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/java
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/api_reference/CXX
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/api_reference/STL
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/api_reference/TCL
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/gsg*/CXX
|
|
|
|
rm -rf %{buildroot}/%{_docdir}/%{name}/gsg*/JAVA
|
|
|
|
mv %{buildroot}/%{_docdir}/%{name}/collections/tutorial %{buildroot}/%{_docdir}/%{name}/
|
2010-11-16 16:42:39 +01:00
|
|
|
# Remove crappy *.la files
|
2016-03-31 15:31:58 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2011-09-28 20:20:09 +02:00
|
|
|
pushd %{buildroot}
|
|
|
|
for file in `find | grep -v "\(java\|jar\)"`
|
2010-11-16 16:42:39 +01:00
|
|
|
do
|
2011-09-28 20:20:09 +02:00
|
|
|
rm $file || true
|
2010-11-16 16:42:39 +01:00
|
|
|
done
|
2011-09-28 20:20:09 +02:00
|
|
|
rm -rf %{buildroot}/%{_defaultdocdir}
|
|
|
|
mkdir -p %{buildroot}/%{_javadir}
|
|
|
|
mv %{buildroot}/%{_libdir}/*.jar %{buildroot}/%{_javadir}/db-%{version}.jar
|
|
|
|
ln -sf %{_javadir}/db-%{version}.jar %{buildroot}/%{_javadir}/db.jar
|
2010-11-16 16:42:39 +01:00
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_javadir}/*
|
|
|
|
%{_libdir}/libdb_java-%{major}.%{minor}.so
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/*_g.so
|
|
|
|
%{_libdir}/libdb_java.so
|
2011-09-28 20:20:09 +02:00
|
|
|
%{_libdir}/libdb_java-%{major}.so
|
2010-11-16 16:42:39 +01:00
|
|
|
|
|
|
|
%changelog
|