LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File unixODBC.spec of Package unixODBC (Project home:flacco:rtk)

#
# spec file for package unixODBC
#
# Copyright (c) 2013 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:           unixODBC
BuildRequires:  bison
BuildRequires:  gcc-c++
BuildRequires:  libtool
Version:        2.3.1
Release:        0
Summary:        ODBC driver manager with some drivers included
License:        GPL-2.0+ and LGPL-2.1+
Group:          Productivity/Databases/Tools
Url:            http://www.unixodbc.org/
# bug437293
%ifarch ppc64
Obsoletes:      unixODBC-64bit
%endif
#
Provides:       libodbc.so
Provides:       libodbcinst.so
%ifarch ia64 x86_64 s390x ppc64
Provides:       libodbc.so()(64bit)
Provides:       libodbcinst.so()(64bit)
%endif
Source:         ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-%{version}.tar.gz
Source1:        README.SuSE
Source2:        baselibs.conf
Patch1:         unixODBC-paths.patch
Patch5:         unixODBC-iaddr.patch
Patch6:         unixODBC-nonvoid.patch
Patch7:         unixODBC-gccwarnings.patch
Patch10:        %{name}-2.3.1-libodbcinst-exports.patch
Patch13:        %{name}-2.3.1-uninitialized.patch
Patch15:        %{name}-2.3.1-bison.patch
Patch16:        %{name}-2.3.1-declarations.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package devel
Summary:        Includes for ODBC Development
Group:          Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes:      unixODBC-devel-64bit
%endif
#
Obsoletes:      libiodbc-devel
Requires:       %{name} = %{version}

%description
UnixODBC aims to provide a complete ODBC solution for the Linux
platform. Further drivers can be found at http://www.unixodbc.org/.



Authors:
--------
    Peter Harvey <pharvey@codebydesigns.com>
    Nick Gorham <nick@easysoft.com>

%description devel
Includes for ODBC development (based on unixODBC).



Authors:
--------
    Peter Harvey <pharvey@codebydesigns.com>
    Nick Gorham <nick@easysoft.com>

%prep
%setup -q
%patch1
%patch5
%patch6
%patch7
%patch10
%patch13
%patch15
%patch16
install -m 644 %{S:1} .

%build
export -n LANG LINGUAS LC_ALL
rm -rf libltdl
libtoolize --ltdl
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \
	    --prefix=%{_prefix} \
	    --mandir=%{_mandir} \
	    --infodir=%{_infodir} \
	    --libdir=%{_libdir} \
	    --sysconfdir=%{_sysconfdir}/%{name} \
	    --enable-gui=no \
	    --disable-stats \
		--enable-drivers \
		--enable-driver-conf
make

%install
install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT/%{_libdir}/%{name}
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT/usr/share/libtool
# packaged in gui-gtk
rm -f $RPM_BUILD_ROOT/%{_libdir}/libmimerS.*
rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la

%clean
rm -rf "$RPM_BUILD_ROOT"

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files 
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README README.SuSE doc/*.html doc/*.gif
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/ODBCDataSources
%dir %{_libdir}/%{name}
%config %{_sysconfdir}/%{name}/odbc.ini
%config %{_sysconfdir}/%{name}/odbcinst.ini
%{_prefix}/bin/dltest
%{_prefix}/bin/isql
%{_prefix}/bin/iusql
%{_prefix}/bin/odbcinst
%{_prefix}/bin/odbc_config
%{_libdir}/libodbc.so.*
%{_libdir}/libodbcinst.so.*
%{_libdir}/libodbccr.so.*
%{_libdir}/%{name}

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libodbc.so
%{_libdir}/libodbcinst.so
%{_libdir}/libodbc.la
%{_libdir}/libodbccr.la
%{_libdir}/libodbcinst.la
%{_libdir}/libodbccr.so

%changelog