File libdbi.spec of Package libdbi

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


Name:           libdbi
%define lname	libdbi3
Version:        0.9.0.g33
#Snapshot:	libdbi-0.9.0-33-gcdc4479
Release:        1.1
Summary:        Database Independent Abstraction Layer for C
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
URL:            http://libdbi.sf.net/

#Git-Clone:	git://git.code.sf.net/p/libdbi/libdbi
#Source:         http://downloads.sf.net/libdbi/%name-%version.tar.gz
Source:         %name-%version.tar.gz
Source2:        baselibs.conf
BuildRoot:      %_tmppath/%name-%version-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  xz
%define build_doc 0
%if %build_doc
# Only needed when doc is not already prebuilt
BuildRequires:  docbook-dsssl-stylesheets
BuildRequires:  openjade
BuildRequires:  texlive-collection-fontsrecommended
BuildRequires:  texlive-jadetex
BuildRequires:  texlive-pdftex-bin
%endif

%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 (Database Independent Abstraction Layer for C)
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

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

%prep
%setup -qn %name

%build
autoreconf -fi
sed -i s,\-O20,\-O2,g configure
%configure \
%if !%build_doc
	--disable-docs \
%endif
	--disable-static --docdir="%_docdir/%name"
make %{?_smp_mflags}

%install
make install DESTDIR="%buildroot"
rm README.win32 "%buildroot/%_libdir/libdbi.la"

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README*
%_libdir/libdbi.so.3*

%files devel
%defattr(-,root,root)
%_includedir/dbi/
%_libdir/libdbi.so
%_libdir/pkgconfig/dbi.pc
%if %build_doc
%_docdir/%name/
%endif

%changelog
* Tue Nov 11 2014 jengelh@inai.de
- Update to git snapshot 0.9.0+git33
  * Fix crash when calling dbi_conn_close() on a valid object with
  a closed connection (e.g. when login failed). [boo#904873]
* Wed Aug 27 2014 jengelh@inai.de
- Update to git snapshot 0.9.0+git32
  * dbi: an unintialized variable (rightfully flagged by valgrind)
  was fixed
* Mon Jun 30 2014 jengelh@inai.de
- Update to git snapshot 0.9.0+git30
  * dbi: make a distinction between SQL strings and decimals
  (add new type DBI_TYPE_XDECIMAL)
* Thu May  8 2014 jengelh@inai.de
- Update to git snapshot 0.9.0+git27
  * dbi: resolve bogus seeking into dbd
* Thu Apr 17 2014 jengelh@inai.de
- Update to git snapshot 0.9.0+git23
  * api: offer DATETIME fields also as a "struct tm"
* Tue Sep  3 2013 jengelh@inai.de
- Update to new upstream release 0.9.0
  * libdbi now supports multiple independent "instances", which
  permit programs to use several dlopen()ed modules which are
  linked against libdbi. Support for transactions and savepoints
  has been added, and drivers now receive additional hints to
  optimize sequential reads from result sets.
- Wrap description at 70 cols
* Mon Sep 24 2012 andreas.stieger@gmx.de
- update to 0.8.4, soname libdbi1
- now using automake 1.10.1
* Thu Dec 15 2011 jengelh@medozas.de
- Remove redundant/unwanted tags/section (cf. specfile guidelines)
- Use %%_smp_mflags for parallel building
* Tue Dec 13 2011 idonmez@suse.com
- Optimization level 20 doesn't really exist, fix it to -O3
- Fix license to be LGPL-2.1+
* Fri Sep 16 2011 jengelh@medozas.de
- Add baselibs configuration
* Wed Dec 15 2010 meissner@suse.de
- cleanup, use RPM_OPT_FLAGS, --disable-static, no .la files
* Wed Dec 15 2010 meissner@suse.de
- initial import if libdbi, a database-independent abstraction layer in C,
  similar to the DBI/DBD layer in Perl.
openSUSE Build Service is sponsored by