File iodbc.spec of Package iodbc

#
# spec file for package iodbc (Version 3.52.6)
#
# Copyright (c) 2009 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:           iodbc
Url:            http://www.iodbc.org/
License:        BSD3c ; LGPLv2.1+
Group:          Development/Libraries/C and C++
Summary:        The iODBC Driver Manager
BuildRequires:  gtk2-devel
Version:        3.52.6
Release:        4
Source:         libiodbc-%{version}.tar.bz2
Patch1:         fix-nonvoid-return.diff
Patch2:         config-h.diff
Requires:       libiodbc3 = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The iODBC Driver Manager is a free implementation of the SAG CLI and
ODBC compliant driver manager which allows developers to write ODBC
compliant applications that can connect to various databases using
appropriate backend drivers.



Authors:
--------
    Ke Jin
    OpenLink Software

%package -n libiodbc-devel
License:        LGPLv2.1+
Group:          Development/Libraries/C and C++
Summary:        Include Files and Libraries mandatory for Development.
Requires:       libiodbc3 = %version
Requires:       %name = %version
Requires:       gtk2-devel

%description -n libiodbc-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Ke Jin <kejin@inprise.com>
    Patrick van Kleef <iodbc@openlinksw.com>

%package -n libiodbc3
License:        BSD3c ; LGPLv2.1+
Group:          Development/Libraries/C and C++
Summary:        The iODBC Driver Manager

%description -n libiodbc3
The iODBC Driver Manager is a free implementation of the SAG CLI and
ODBC compliant driver manager which allows developers to write ODBC
compliant applications that can connect to various databases using
appropriate backend drivers.



Authors:
--------
    Ke Jin
    OpenLink Software

%package -n iodbc-admin
License:        BSD3c ; LGPLv2.1+
Group:          Development/Libraries/C and C++
Summary:        The iODBC Driver Manager

%description -n iodbc-admin
The iODBC Driver Manager is a free implementation of the SAG CLI and
ODBC compliant driver manager which allows developers to write ODBC
compliant applications that can connect to various databases using
appropriate backend drivers.



Authors:
--------
    Ke Jin
    OpenLink Software

%prep
%setup -q -n libiodbc-%version
%patch1
%patch2

%build
  %configure --disable-static --disable-libodbc
  # Don't use rpath!
  sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
  sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
#  make %{?jobs:-j%jobs}
  make

%install
  %makeinstall

%post -n libiodbc3 -p /sbin/ldconfig

%postun -n libiodbc3 -p /sbin/ldconfig

%post -n iodbc-admin -p /sbin/ldconfig

%postun -n iodbc-admin -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE LICENSE.LGPL LICENSE.BSD ChangeLog NEWS README README.CVS
%{_bindir}/iodbctest
%{_bindir}/iodbctestw
%{_mandir}/man1/iodbctest.1*
%{_mandir}/man1/iodbctestw.1*
#%config /etc/odbc.ini
#%config /etc/odbcinst.ini

%files -n libiodbc3
%defattr(-,root,root)
%{_libdir}/libiodbc.so.*
%{_libdir}/libiodbcinst.so.*

%files -n libiodbc-devel
%defattr(-,root,root)
%doc etc/odbc.ini.sample
%doc etc/odbcinst.ini.sample
%{_includedir}/iodbcext.h
%{_includedir}/iodbcinst.h
%{_includedir}/iodbcunix.h
%{_includedir}/isqlext.h
%{_includedir}/isql.h
%{_includedir}/isqltypes.h
%{_includedir}/sql.h
%{_includedir}/sqltypes.h
%{_includedir}/sqlucode.h
%{_includedir}/sqlext.h
%{_includedir}/odbcinst.h
%{_bindir}/iodbc-config
%{_libdir}/libiodbc.la
%{_libdir}/libiodbc.so
%{_libdir}/libiodbcinst.la
%{_libdir}/libiodbcinst.so
%{_mandir}/man1/iodbc-config.1*
%{_datadir}/libiodbc
%{_datadir}/libiodbc/samples
%{_datadir}/libiodbc/samples/Makefile
%{_datadir}/libiodbc/samples/iodbctest.c
%{_libdir}/pkgconfig/libiodbc.pc
%{_libdir}/libdrvproxy.so
%{_libdir}/libdrvproxy.la
%{_libdir}/libiodbcadm.so
%{_libdir}/libiodbcadm.la

%files -n iodbc-admin
%defattr(-,root,root)
%{_bindir}/iodbcadm-gtk
%{_libdir}/libdrvproxy.so.*
%{_libdir}/libiodbcadm.so.*
%{_mandir}/man1/iodbcadm-gtk.1*

%changelog