# # spec file for package libdbi-drivers # # Copyright (c) 2011 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 special -1 Summary: Database drivers for libdbi Name: libdbi-drivers Version: 0.8.3 Release: 1 Group: Development/Libraries License: LGPL Url: http://libdbi-drivers.sourceforge.net/ Source: %{name}-%{version}%{special}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gettext libdbi-devel mysql-devel openjade postgresql-devel sqlite-devel %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. _Original_Vendor: Neon Goat Productions _Original_Packager: David A. Parker %package dbd-mysql License: LGPL Summary: MySQL driver for libdbi Group: Development/Libraries Requires: libdbi0 = %{version} %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 License: LGPL Summary: PostgreSQL driver for libdbi Group: Development/Libraries Requires: libdbi0 = %{version}, postgresql >= 7.0.3 %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. %if 0%{?suse_version} == 910 # SLES 9 %package dbd-sqlite License: LGPL Summary: SQLite driver for libdbi Group: Development/Libraries Requires: libdbi0 = %{version}, sqlite %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. %else %package dbd-sqlite3 Summary: SQLite3 driver for libdbi Group: Development/Libraries Requires: libdbi0 = %{version}, sqlite %description dbd-sqlite3 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. %endif %prep %setup -q -n %{name}-%{version}%{special} %build CFLAGS="$RPM_OPT_FLAGS" %configure \ --with-mysql \ --with-mysql-incdir=/usr/include/mysql \ --with-mysql-libdir=%{_libdir}/mysql \ --with-pgsql \ --with-pgsql-incdir=/usr/include/pgsql \ --with-pgsql-libdir=%{_libdir} \ %if 0%{?suse_version} == 910 --with-sqlite \ --with-sqlite-incdir=/usr/include \ --with-sqlite-libdir=%{_libdir} \ %else --with-sqlite3 \ --with-sqlite3-incdir=/usr/include \ --with-sqlite3-libdir=%{_libdir} \ %endif --with-dbi-incdir=/usr/include/dbi \ --with-dbi-libdir=%{_libdir} \ --disable-static \ --disable-docs make AM_CFLAGS="$RPM_OPT_FLAGS" %install make DESTDIR=$RPM_BUILD_ROOT install %files dbd-mysql %defattr(-,root,root) %dir %{_libdir}/dbd %{_libdir}/dbd/libdbdmysql.so %{_libdir}/dbd/libdbdmysql.la %files dbd-pgsql %defattr(-,root,root) %dir %{_libdir}/dbd %{_libdir}/dbd/libdbdpgsql.so %{_libdir}/dbd/libdbdpgsql.la %if 0%{?suse_version} == 910 %defattr(-,root,root) # SLES 9 %files dbd-sqlite %defattr(-,root,root) %dir %{_libdir}/dbd %{_libdir}/dbd/libdbdsqlite.so %{_libdir}/dbd/libdbdsqlite.la %else %files dbd-sqlite3 %defattr(-,root,root) %dir %{_libdir}/dbd %{_libdir}/dbd/libdbdsqlite3.so %{_libdir}/dbd/libdbdsqlite3.la %endif %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog