# # spec file for package unixODBC # # 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/ # # norootforbuild Name: unixODBC BuildRequires: gcc-c++ libtool Version: 2.2.12 Release: 0 Summary: ODBC driver manager with some drivers included License: GPL-2.0+ ; LGPL-2.1+ Url: http://www.unixodbc.org/ Group: Productivity/Databases/Tools # bug437293 %ifarch ppc64 Obsoletes: unixODBC-64bit %endif # Provides: libodbcinst.so, libodbc.so %ifarch ia64 x86_64 s390x ppc64 Provides: libodbcinst.so()(64bit), libodbc.so()(64bit) %endif Source: unixODBC-%{version}.tar.bz2 Source1: README.SuSE Source2: baselibs.conf Patch1: unixODBC-paths.patch Patch4: unixODBC-odbctest.patch Patch5: unixODBC-iaddr.patch Patch6: unixODBC-nonvoid.patch Patch7: unixODBC-gccwarnings.patch Patch8: unixODBC-%{version}-dm.patch Patch10: %{name}-%{version}-libodbcinst-exports.patch Patch11: %{name}-%{version}-flex.patch Patch12: %{name}-%{version}-sqp.patch Patch13: %{name}-%{version}-uninitialized.patch Patch14: unixODBC-2.2.12-CVE-2011-1145.patch Patch15: unixODBC-2.2.12-locking_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel License: GPL-2.0+ ; LGPL-2.1+ Summary: Includes and Static Libraries for ODBC Development Group: Development/Libraries/C and C++ AutoReqProv: on # 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 Nick Gorham %description devel Includes and static libraries for ODBC development (based on unixODBC). Authors: -------- Peter Harvey Nick Gorham %prep %setup -q %patch1 %patch4 %patch5 %patch6 %patch7 #patch8 -p1 %patch10 %patch11 %patch12 %patch13 %patch14 -p1 %patch15 -p1 install -m 644 %{S:1} . %build export -n LANG LINGUAS LC_ALL rm -rf libltdl LIBTOOLIZE="libtoolize --ltdl" autoreconf --force --install export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir}/%{name} \ --enable-gui=no \ --disable-stats make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %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.* %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.GTK 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}/libodbc.so.* #%{_libdir}/libodbcextras.so.* %{_libdir}/libodbcinst.so %{_libdir}/libodbcinst.so.* %{_libdir}/libboundparam.so.* %{_libdir}/libgtrtst.so.* %{_libdir}/libodbccr.so.* %{_libdir}/unixODBC/*.so* %files devel %defattr(-, root, root) %{_includedir}/* %{_libdir}/libboundparam.la %{_libdir}/libgtrtst.la %{_libdir}/libodbc.la %{_libdir}/libodbccr.la #%{_libdir}/libodbcextras.la %{_libdir}/libodbcinst.la %{_libdir}/libboundparam.so %{_libdir}/libgtrtst.so %{_libdir}/libodbccr.so #%{_libdir}/libodbcextras.so %{_libdir}/unixODBC/*.la %changelog