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
Provides:       libodbc.so
Provides:       libodbcinst.so
%ifarch ia64 x86_64 s390x ppc64
Provides:       libodbc.so()(64bit)
Provides:       libodbcinst.so()(64bit)
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
Obsoletes:      libiodbc-devel
Requires:       %{name} = %{version}

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

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

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

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

%setup -q
install -m 644 %{S:1} .

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 \

install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT/%{_libdir}/%{name}
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

rm -rf "$RPM_BUILD_ROOT"

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%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

%files devel
%defattr(-, root, root)