File mingw64-libdbi.spec of Package mingw64-libdbi

#
# spec file for package mingw64-libdbi
#
# 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/
#


%define lname	mingw64-libdbi3
Name:           mingw64-libdbi
Version:        0.9.0.g33
#Snapshot:	libdbi-0.9.0-33-gcdc4479
Release:        0
Summary:        Database Independent Abstraction Layer for C
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
URL:            http://libdbi.sf.net/
#Git-Clone:	git://git.code.sf.net/p/libdbi/libdbi
Source:         libdbi-%version.tar.xz
BuildRequires:  libtool
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-winpthreads-devel
BuildRequires:  xz
%_mingw64_package_header_debug
BuildArch:      noarch
#!BuildIgnore:	post-build-checks

%description
libdbi implements a database-independent abstraction layer in C,
similar to the DBI/DBD layer in Perl. Writing one generic set of
code, programmers can leverage the power of multiple databases and
multiple simultaneous database connections by using this framework.

%package -n %lname
Summary:        Database Independent Abstraction Layer for C
Group:          System/Libraries

%description -n %lname
libdbi implements a database-independent abstraction layer in C,
similar to the DBI/DBD layer in Perl. Writing one generic set of
code, programmers can leverage the power of multiple databases and
multiple simultaneous database connections by using this framework.

%package devel
Summary:        Development files for libdbi/MinGW
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
Provides:       %name-devel-static = %version

%description devel
The libdbi-devel package contains the header files and documentation
needed to develop applications with libdbi for MinGW.

%_mingw64_debug_package

%prep
%setup -q -n libdbi

%build
autoreconf -fi
export CFLAGS="%optflags"
%_mingw64_configure --disable-static --disable-docs \
	--with-driverdir="lib/x86_64-pc/dbd"
make %{?_smp_mflags}

%install
b="%buildroot"
%make_install
# With this symlink, building a 3rd-party program with -static will not
# fail, but silently use dynamic linking (just like how mingw does it for
# all Win32 API libraries, like msvcrt.a)
ln -s libdbi.dll.a "$b/%_mingw64_libdir/libdbi.a"

%files -n %lname
%defattr(-,root,root)
%_mingw64_bindir/libdbi-3.dll

%files devel
%defattr(-,root,root)
%_mingw64_includedir/
%_mingw64_libdir/libdbi.dll.a
%_mingw64_libdir/libdbi.a
%_mingw64_libdir/pkgconfig/dbi.pc

%changelog
openSUSE Build Service is sponsored by