2013-06-16 13:28:24 +00:00
|
|
|
#
|
|
|
|
# spec file for package libdb-6_0
|
|
|
|
#
|
2015-11-06 06:57:35 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2013-06-16 13:28:24 +00: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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define generic_name db
|
|
|
|
%define docdir %{_defaultdocdir}/%{name}
|
|
|
|
%define major 6
|
|
|
|
%define minor 0
|
|
|
|
Name: libdb-6_0
|
2015-11-06 06:57:35 +00:00
|
|
|
Version: %{major}.%{minor}.35
|
2013-06-16 13:28:24 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Berkeley DB Database Library Version 6.0
|
2013-07-23 07:51:19 +00:00
|
|
|
License: AGPL-3.0
|
2013-06-16 13:28:24 +00:00
|
|
|
Group: System/Libraries
|
|
|
|
Url: http://oracle.com/technetwork/products/berkeleydb/
|
2015-11-06 06:57:35 +00:00
|
|
|
Source: http://download.oracle.com/otn/berkeley-db/db-%{version}.tar.gz
|
2013-06-16 13:28:24 +00:00
|
|
|
Source1: %{name}.changes
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: xz
|
|
|
|
Provides: db = %{version}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Berkeley DB Database is a programmatic toolkit that provides
|
|
|
|
database support for applications.
|
|
|
|
|
|
|
|
This package contains the necessary runtime libraries.
|
|
|
|
|
2015-11-06 06:58:46 +00:00
|
|
|
%package -n db60-utils
|
2013-06-16 13:28:24 +00:00
|
|
|
Summary: Command Line tools for Managing Berkeley DB Databases
|
|
|
|
Group: Productivity/Databases/Tools
|
|
|
|
|
2015-11-06 06:58:46 +00:00
|
|
|
%description -n db60-utils
|
2013-06-16 13:28:24 +00:00
|
|
|
The Berkeley DB Database is a programmatic toolkit that provides
|
|
|
|
database support for applications.
|
|
|
|
|
|
|
|
This package contains the command line tools for managing Berkeley DB
|
|
|
|
databases.
|
|
|
|
|
2013-07-23 07:46:43 +00:00
|
|
|
%package -n db60-doc
|
2013-06-16 13:28:24 +00:00
|
|
|
Summary: Documentation for Berkeley DB
|
|
|
|
Group: Development/Libraries/C and C++
|
2013-07-23 07:51:19 +00:00
|
|
|
Provides: db-doc = %{version}
|
2013-06-16 13:28:24 +00:00
|
|
|
Provides: db-utils-doc = %{version}
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2013-07-24 13:37:52 +00:00
|
|
|
%description -n db60-doc
|
2013-06-16 13:28:24 +00:00
|
|
|
The Berkeley DB Database is a programmatic toolkit that provides
|
|
|
|
database support for applications.
|
|
|
|
|
|
|
|
This package contains the documentation.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development Files and Libraries for the Berkeley DB library Version 5.3
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: glibc-devel
|
2015-11-06 06:57:35 +00:00
|
|
|
Conflicts: libdb-4_5-devel
|
|
|
|
Conflicts: libdb-4_8-devel
|
2013-07-23 07:51:19 +00:00
|
|
|
Provides: db-devel = %{version}
|
2013-07-23 07:46:43 +00:00
|
|
|
# do not add obsoletes, our default is db48-devel for now
|
2013-06-16 13:28:24 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The Berkeley DB Database is a programmatic toolkit that provides
|
|
|
|
database support for applications.
|
|
|
|
|
|
|
|
This package contains the header files and libraries.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{generic_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
cd dist
|
|
|
|
# dist/RELEASE codes the build date into the binary.
|
|
|
|
# Use last change of changes file instead
|
2015-11-06 06:57:35 +00:00
|
|
|
LAST_MOD=`stat --format="%%Y" %{SOURCE1}`
|
|
|
|
DIST_DATE=`date '+%%B %%e, %%Y' --date="@$LAST_MOD"`
|
2013-06-16 13:28:24 +00:00
|
|
|
sed -i -e "s/^DB_RELEASE_DATE=.*$/DB_RELEASE_DATE=\"$DIST_DATE\"/" RELEASE
|
|
|
|
./s_config
|
|
|
|
CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
CC=gcc
|
|
|
|
export CFLAGS CXXFLAGS CC
|
|
|
|
#
|
|
|
|
# Build now the NPTL version
|
|
|
|
#
|
|
|
|
mkdir ../build_nptl
|
|
|
|
cd ../build_nptl
|
|
|
|
../dist/configure --prefix=%{_prefix} \
|
|
|
|
--libdir=%{_libdir} --enable-compat185 --disable-dump185 \
|
|
|
|
--enable-shared --disable-static --enable-cxx --enable-dbm \
|
|
|
|
--with-mutex="POSIX/pthreads/library" \
|
|
|
|
%ifarch %arm
|
|
|
|
%{_target_cpu}-suse-linux-gnueabi
|
|
|
|
%else
|
|
|
|
%{_target_cpu}-suse-linux
|
|
|
|
%endif
|
|
|
|
# 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
|
|
|
|
# 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++"
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_includedir}/db6
|
|
|
|
CONFIG_ARGS=$(find . -name "config.log" -exec grep "\$ \.\./dist\/configure" {} \; | sed 's/.*configure\( --.*\)/\1/g')
|
|
|
|
if [ -z "$CONFIG_ARGS" ]
|
|
|
|
then
|
|
|
|
echo "could not find configure arguments ... exiting"
|
|
|
|
exit 42
|
|
|
|
fi
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
cd build_nptl
|
|
|
|
make prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} strip=true install
|
|
|
|
cd ..
|
|
|
|
# make ldd happy:
|
|
|
|
chmod 755 %{buildroot}%{_libdir}/libdb*.so
|
|
|
|
# Fix header file installation
|
|
|
|
mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/db6
|
|
|
|
echo "#include <db6/db.h>" > %{buildroot}%{_includedir}/db.h
|
|
|
|
echo "#include <db6/db_185.h>" > %{buildroot}%{_includedir}/db_185.h
|
|
|
|
echo "#include <db6/db_cxx.h>" > %{buildroot}%{_includedir}/db_cxx.h
|
|
|
|
# Move documentation to the right directory
|
|
|
|
mkdir -p %{buildroot}%{docdir}
|
|
|
|
mv %{buildroot}%{_prefix}/docs/* %{buildroot}/%{docdir}
|
|
|
|
cp -a examples %{buildroot}/%{docdir}
|
|
|
|
cp -a LICENSE README %{buildroot}/%{docdir}
|
|
|
|
# Remove api documentation for C++, Java and TCL
|
|
|
|
rm -rf %{buildroot}/%{docdir}/csharp
|
|
|
|
rm -rf %{buildroot}/%{docdir}/java
|
|
|
|
rm -rf %{buildroot}/%{docdir}/api_reference/CXX
|
|
|
|
rm -rf %{buildroot}/%{docdir}/api_reference/STL
|
|
|
|
rm -rf %{buildroot}/%{docdir}/api_reference/TCL
|
|
|
|
rm -rf %{buildroot}/%{docdir}/gsg*/CXX
|
|
|
|
rm -rf %{buildroot}/%{docdir}/gsg*/JAVA
|
|
|
|
mv %{buildroot}/%{docdir}/collections/tutorial %{buildroot}/%{docdir}/
|
|
|
|
# Remove crappy *.la files
|
2015-11-06 06:57:35 +00:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
|
|
# Lineending:
|
|
|
|
sed -i 's/\r//g' %{buildroot}%{docdir}/examples/csharp/excs_getting_started/Properties/AssemblyInfo.cs
|
2013-06-16 13:28:24 +00:00
|
|
|
%fdupes %{buildroot}%{_libdir}
|
|
|
|
%fdupes %{buildroot}%{docdir}
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libdb-%{major}.%{minor}.so
|
|
|
|
%{_libdir}/libdb_cxx-%{major}.%{minor}.so
|
|
|
|
|
2013-07-23 07:46:43 +00:00
|
|
|
%files -n db60-doc
|
2013-06-16 13:28:24 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{docdir}
|
|
|
|
%doc %{docdir}/LICENSE
|
|
|
|
%doc %{docdir}/README
|
|
|
|
%doc %{docdir}/index.html
|
|
|
|
%doc %{docdir}/license
|
|
|
|
%doc %{docdir}/articles
|
|
|
|
%doc %{docdir}/api_reference
|
|
|
|
%doc %{docdir}/examples
|
|
|
|
%doc %{docdir}/gsg*
|
|
|
|
%doc %{docdir}/porting
|
|
|
|
%doc %{docdir}/programmer_reference
|
|
|
|
%doc %{docdir}/tutorial
|
|
|
|
%doc %{docdir}/bdb-sql
|
|
|
|
%doc %{docdir}/installation
|
|
|
|
%doc %{docdir}/upgrading
|
|
|
|
|
2015-11-06 06:58:46 +00:00
|
|
|
%files -n db60-utils
|
2013-06-16 13:28:24 +00:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/db_*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/db6/
|
|
|
|
%{_includedir}/db.h
|
|
|
|
%{_includedir}/db_185.h
|
|
|
|
%{_includedir}/db_cxx.h
|
|
|
|
%{_libdir}/libdb.so
|
|
|
|
%{_libdir}/libdb-%{major}.so
|
|
|
|
%{_libdir}/libdb_cxx.so
|
|
|
|
%{_libdir}/libdb_cxx-%{major}.so
|
|
|
|
|
|
|
|
%changelog
|