libdbi-drivers/libdbi-drivers.spec

168 lines
4.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libdbi-drivers
#
# 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-drivers
Version: 0.9.0.g51
#Snapshot: libdbi-drivers-0.9.0-51-gfe23caa
Release: 0
Summary: Database drivers for libdbi
License: LGPL-2.1+
Group: Productivity/Databases/Servers
URL: http://libdbi-drivers.sf.net/
#Git-Clone: git://git.code.sf.net/p/libdbi-drivers/libdbi-drivers
#Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz
Source: %name-%version.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext
BuildRequires: freetds-devel
BuildRequires: libdbi-devel >= 0.9.0.g30
BuildRequires: libtool
BuildRequires: mysql-devel
BuildRequires: openjade
BuildRequires: postgresql-devel
BuildRequires: sqlite2-devel
BuildRequires: sqlite3-devel
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. Drivers are distributed
separately from the library itself.
%package dbd-freetds
Summary: FreeTDS driver for libdbi
Group: System/Libraries
%description dbd-freetds
This driver provides connectivity to FreeTDS database servers
through the libdbi database independent abstraction layer. Switching
a program's driver does not require recompilation or rewriting source
code.
%package dbd-mysql
Summary: MySQL driver for libdbi
Group: System/Libraries
%description dbd-mysql
This driver provides connectivity to MySQL database servers through
the libdbi database independent abstraction layer. Switching a
program's driver does not require recompilation or rewriting source
code.
%package dbd-pgsql
Summary: PostgreSQL driver for libdbi
Group: System/Libraries
%description dbd-pgsql
This driver provides connectivity to PostgreSQL database servers
through the libdbi database independent abstraction layer. Switching
a program's driver does not require recompilation or rewriting source
code.
%package dbd-sqlite
Summary: SQLite2 driver for libdbi
Group: System/Libraries
%description dbd-sqlite
This driver provides connectivity to SQLite database servers through the
libdbi database independent abstraction layer. Switching a program's driver
does not require recompilation or rewriting source code.
%package dbd-sqlite3
Summary: SQLite3 driver for libdbi
Group: System/Libraries
%description dbd-sqlite3
This driver provides connectivity to SQLite 3.x database servers through the
libdbi database independent abstraction layer. Switching a program's driver
does not require recompilation or rewriting source code.
%prep
%setup -qn %name
chmod a-x COPYING
# Fake the __DATE__ so we do not needelessly rebuild
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %_sourcedir/%name.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" drivers/*/*.c
%build
if [ ! -e configure ]; then
autoreconf -fi
fi
export CFLAGS="%optflags -O0 -ggdb3"
%configure \
--with-freetds \
--with-mysql \
--with-pgsql \
--with-sqlite3 --with-sqlite \
--with-dbi-incdir="%_includedir/dbi" \
--with-dbi-libdir="%_libdir" \
--disable-static \
--docdir="%_docdir/%name" --disable-docs
make %{?_smp_mflags}
%install
make install DESTDIR="%buildroot"
find "%buildroot" -type f -name "*.la" -delete
%check
make check || :
%files dbd-freetds
%defattr(-,root,root)
%doc COPYING
%dir %_libdir/dbd
%_libdir/dbd/libdbdfreetds.so
%files dbd-mysql
%defattr(-,root,root)
%doc COPYING
%dir %_libdir/dbd
%_libdir/dbd/libdbdmysql.so
%files dbd-pgsql
%defattr(-,root,root)
%doc COPYING
%dir %_libdir/dbd
%_libdir/dbd/libdbdpgsql.so
%files dbd-sqlite
%defattr(-,root,root)
%dir %_libdir/dbd
%_libdir/dbd/libdbdsqlite.so
%files dbd-sqlite3
%defattr(-,root,root)
%doc COPYING
%dir %_libdir/dbd
%_libdir/dbd/libdbdsqlite3.so
%changelog