File mingw64-libdb.spec of Package mingw64-libdb

#
# spec file for package mingw64-libdb
#
# Copyright (c) 2014 SUSE LINUX Products 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:           mingw64-libdb
Version:        6.0.30
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:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-filesystem >= 23
%_mingw64_package_header_debug
BuildArch:      noarch

%description
The Berkeley DB Database is a programmatic toolkit that provides
database support for applications.

%package -n mingw64-libdb-6_0
Summary:        MinGW Windows port of the Berkeley DB Database Library
Group:          System/Libraries
Obsoletes:      %{name} < %{version}-%{release}
Provides:       %{name} = %{version}-%{release}

%description -n mingw64-libdb-6_0
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 Development Files and Libraries for the Berkeley DB library
Group:          Development/Libraries/C and C++

%description devel
The Berkeley DB Database is a programmatic toolkit that provides
database support for applications.
Requires:       mingw64-libdb-6_0

This package contains the header files and libraries.

%package -n mingw64-db-utils
Summary:        MinGW Windows port of the Command Line tools for Managing Berkeley DB Databases
Group:          Productivity/Databases/Tools

%description -n mingw64-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

%_mingw64_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'" >> %{_mingw64_cache}
%{_mingw64_env};
../dist/configure --cache-file=%{_mingw64_cache} \
	--host=%{_mingw64_host} \
	--build=%{_build} \
	--target=%{_mingw64_target} \
	--prefix=%{_mingw64_prefix} \
	--exec-prefix=%{_mingw64_exec_prefix} \
	--bindir=%{_mingw64_bindir} \
	--sbindir=%{_mingw64_sbindir} \
	--sysconfdir=%{_mingw64_sysconfdir} \
	--datadir=%{_mingw64_datadir} \
	--includedir=%{_mingw64_includedir} \
	--libdir=%{_mingw64_libdir} \
	--libexecdir=%{_mingw64_libexecdir} \
	--localstatedir=%{_mingw64_localstatedir} \
	--sharedstatedir=%{_mingw64_sharedstatedir} \
	--mandir=%{_mingw64_mandir} \
	--infodir=%{_mingw64_infodir} \
	--enable-mingw --enable-cxx \
	--enable-compat185 \
	--enable-shared --disable-static
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}
popd

%install
pushd build_unix
%{_mingw64_makeinstall}
popd

(cd %{buildroot}%{_mingw64_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}%{_mingw64_prefix}/docs

%files -n mingw64-libdb-6_0
%defattr(-,root,root)
%{_mingw64_bindir}/libdb-6.0.dll
%{_mingw64_bindir}/libdb_cxx-6.0.dll

%files devel
%defattr(-,root,root)
%{_mingw64_libdir}/libdb-6.0.dll.a
%{_mingw64_libdir}/libdb-6.dll.a
%{_mingw64_libdir}/libdb.dll.a
%{_mingw64_libdir}/libdb_cxx-6.0.dll.a
%{_mingw64_libdir}/libdb_cxx-6.dll.a
%{_mingw64_libdir}/libdb_cxx.dll.a
%{_mingw64_includedir}/db*.h

%files -n mingw64-db-utils
%defattr(-,root,root)
%{_mingw64_bindir}/db_*.exe

%changelog
openSUSE Build Service is sponsored by