File mingw32-libdb.spec of Package mingw32-libdb
#
# spec file for package mingw32-libdb
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#
Name: mingw32-libdb
Version: 6.2.23
Release: 0
Summary: MinGW Windows port of the Berkeley DB Database Library
License: AGPL-3.0-only
Group: Development/Libraries/C and C++
Url: http://www.oracle.com/technology/products/berkeley-db/db/index.html
Source0: db-%{version}.tar.gz
Source1000: %{name}-rpmlintrc
Patch0: db-6.0.30-exeext.patch
Patch1: db-6.0.30-mingw.patch
#!BuildIgnore: post-build-checks
BuildRequires: mingw32-cross-gcc-c++
%_mingw32_package_header_debug
BuildArch: noarch
%description
The Berkeley DB Database is a programmatic toolkit that provides
database support for applications.
%package -n mingw32-libdb-6_2
Summary: MinGW Windows port of the Berkeley DB Database Library
Group: System/Libraries
Obsoletes: %{name} < %{version}-%{release}
Provides: %{name} = %{version}-%{release}
%description -n mingw32-libdb-6_2
The Berkeley DB Database is a programmatic toolkit that provides
database support for applications.
This package contains the necessary runtime libraries.
%package devel
Summary: MinGW Windows port of the Berkeley DB library
Group: Development/Libraries/C and C++
Requires: mingw32-libdb-6_2
%description devel
The Berkeley DB Database is a programmatic toolkit that provides
database support for applications.
This package contains the header files and libraries.
%package -n mingw32-db-utils
Summary: MinGW Windows port of the Command Line tools for Managing Berkeley DB Databases
Group: Productivity/Databases/Tools
%description -n mingw32-db-utils
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
%_mingw32_debug_package
%prep
%setup -q -n db-%{version}
%patch -P 0 -p1 -b .install_utilities
%patch -P 1 -p1 -b .mingw
%build
pushd build_unix
echo "lt_cv_deplibs_check_method='pass_all'" >> %{_mingw32_cache}
%{_mingw32_env};
../dist/configure --cache-file=%{_mingw32_cache} \
--host=%{_mingw32_host} \
--build=%{_build} \
--target=%{_mingw32_target} \
--prefix=%{_mingw32_prefix} \
--exec-prefix=%{_mingw32_exec_prefix} \
--bindir=%{_mingw32_bindir} \
--sbindir=%{_mingw32_sbindir} \
--sysconfdir=%{_mingw32_sysconfdir} \
--datadir=%{_mingw32_datadir} \
--includedir=%{_mingw32_includedir} \
--libdir=%{_mingw32_libdir} \
--libexecdir=%{_mingw32_libexecdir} \
--localstatedir=%{_mingw32_localstatedir} \
--sharedstatedir=%{_mingw32_sharedstatedir} \
--mandir=%{_mingw32_mandir} \
--infodir=%{_mingw32_infodir} \
--enable-mingw --enable-cxx \
--enable-compat185 \
--enable-shared --disable-static
%{_mingw32_make} %{?_smp_mflags} || %{_mingw32_make}
popd
%install
pushd build_unix
%{_mingw32_makeinstall}
popd
(cd %{buildroot}%{_mingw32_libdir} && \
ln -s libdb-6.?.dll.a libdb.dll.a && \
ln -s libdb-6.?.dll.a libdb-6.dll.a && \
ln -s libdb_cxx-6.?.dll.a libdb_cxx.dll.a && \
ln -s libdb_cxx-6.?.dll.a libdb_cxx-6.dll.a)
rm -rf %{buildroot}%{_mingw32_prefix}/docs
%files -n mingw32-libdb-6_2
%defattr(-,root,root)
%{_mingw32_bindir}/libdb-6.2.dll
%{_mingw32_bindir}/libdb_cxx-6.2.dll
%files devel
%defattr(-,root,root)
%{_mingw32_libdir}/libdb-6.2.dll.a
%{_mingw32_libdir}/libdb-6.dll.a
%{_mingw32_libdir}/libdb.dll.a
%{_mingw32_libdir}/libdb_cxx-6.2.dll.a
%{_mingw32_libdir}/libdb_cxx-6.dll.a
%{_mingw32_libdir}/libdb_cxx.dll.a
%{_mingw32_includedir}/db*.h
%files -n mingw32-db-utils
%defattr(-,root,root)
%{_mingw32_bindir}/db_*.exe
%changelog