|
@@ -1,43 +1,41 @@
|
|
|
%define __libtoolize true
|
|
|
-%define vine26 0
|
|
|
|
|
|
-%define kde 1
|
|
|
-# disable -kde subpackage on Vine Linux 2.5,2.6/alpha
|
|
|
-%if %{vine26}
|
|
|
-%ifarch alpha
|
|
|
-%define kde 0
|
|
|
-%endif
|
|
|
-%endif
|
|
|
+%define _qt4_version %(pkg-config --modversion --silence-errors Qt 2>/dev/null || echo 4.7.2)
|
|
|
+%define _qt4_bindir %(pkg-config --variable bindir --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{_qt4_version}/bin)
|
|
|
|
|
|
-Summary: A complete ODBC Driver Manager for Linux
|
|
|
Name: unixODBC
|
|
|
-Version: 2.2.12
|
|
|
+Summary: A complete ODBC Driver Manager for Linux
|
|
|
+Version: 2.2.14
|
|
|
Release: 1%{?_dist_release}
|
|
|
-License: LGPL
|
|
|
+
|
|
|
Group: System Environment/Libraries
|
|
|
+# Programs are GPL, libraries are LGPL, except News Server library is GPL.
|
|
|
+License: GPLv2+ and LGPLv2+
|
|
|
+URL: http://www.unixODBC.org/
|
|
|
+
|
|
|
Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz
|
|
|
Source1: odbcinst.ini
|
|
|
Source2: ODBCConfig.desktop
|
|
|
Source3: DataManager.desktop
|
|
|
-
|
|
|
-Patch1: unixODBC-2.2.11-symbols.patch
|
|
|
-Patch2: nortldglobal.patch
|
|
|
-Patch100: unixODBC-2.2.5-backslash-typo.patch
|
|
|
-URL: http://www.unixODBC.org/
|
|
|
+Source4: conffile.h
|
|
|
+
|
|
|
+Patch1: depcomp.patch
|
|
|
+Patch2: multilib-config.patch
|
|
|
+Patch3: warning-cleanup.patch
|
|
|
+Patch6: export-symbols.patch
|
|
|
+Patch7: libtool-config.patch
|
|
|
+Patch8: so-version-bump.patch
|
|
|
+Patch9: keep-typedefs.patch
|
|
|
+Patch10: odbcint64-config.patch
|
|
|
+Patch11: enable-items.patch
|
|
|
+Patch12: isql-fixes.patch
|
|
|
Conflicts: iodbc
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
-%if %{vine26}
|
|
|
-BuildRequires: autoconf253 automake15
|
|
|
-%else
|
|
|
-BuildRequires: autoconf >= 2.53
|
|
|
-BuildRequires: automake >= 1.5
|
|
|
-%endif
|
|
|
-%if %{kde}
|
|
|
-BuildRequires: kdelibs-devel
|
|
|
-BuildRequires: qt-devel
|
|
|
-BuildRequires: libmng-devel
|
|
|
-%endif
|
|
|
+BuildRequires: libX11-devel libXt-devel libXext-devel
|
|
|
+BuildRequires: qt4-devel qt-assistant-adp-devel readline-devel
|
|
|
+BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex
|
|
|
+BuildRequires: desktop-file-utils
|
|
|
|
|
|
%description
|
|
|
The unixODBC Project goals are to develop and promote unixODBC to
|
|
@@ -53,7 +51,7 @@ you'll also need to have the unixODBC package installed.
|
|
|
%package devel
|
|
|
Summary: Development files for programs which will use the unixODBC library.
|
|
|
Group: Development/Libraries
|
|
|
-Requires: unixODBC = %{version}
|
|
|
+Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description devel
|
|
|
Install unixODBC if you'd like to access databases through ODBC drivers.
|
|
@@ -64,80 +62,103 @@ you'll also need to install the unixODBC-devel (this) package.
|
|
|
%package kde
|
|
|
Summary: KDE DriverManager components for ODBC
|
|
|
Group: System Environment/Libraries
|
|
|
-Requires: unixODBC = %{version}
|
|
|
-#Requires: XFree86-libs qt freetype2 libjpeg libmng libpng zlib
|
|
|
+Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description kde
|
|
|
Components for the ODBCConfig and DataManager (KDE) Components of unixODBC.
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
-
|
|
|
%patch1 -p1
|
|
|
-
|
|
|
-# 2.2.8 includes a libtool that is too old for some of our architectures.
|
|
|
-# Blow it away and replace with build system's libtool. (We intend to use
|
|
|
-# the installed libtool anyway, but this makes sure they match.)
|
|
|
-rm -rf config.guess config.sub ltmain.sh libltdl
|
|
|
-cp -r /usr/share/libtool/* .
|
|
|
-
|
|
|
-# Use newer install-sh and mkinstalldirs, too
|
|
|
-if [ -f libltdl/install-sh ]; then
|
|
|
- cp -f libltdl/install-sh .
|
|
|
-fi
|
|
|
-if [ -f libltdl/mkinstalldirs ]; then
|
|
|
- cp -f libltdl/mkinstalldirs .
|
|
|
-fi
|
|
|
-
|
|
|
-# libltdl patch has to be applied after the above
|
|
|
%patch2 -p1
|
|
|
+%patch3 -p1
|
|
|
+%patch6 -p1
|
|
|
+%patch7 -p1
|
|
|
+%patch8 -p1
|
|
|
+%patch9 -p1
|
|
|
+%patch10 -p1
|
|
|
+%patch11 -p1
|
|
|
+%patch12 -p1
|
|
|
+
|
|
|
+chmod 0644 Drivers/MiniSQL/*.c
|
|
|
+chmod 0644 Drivers/nn/*.c
|
|
|
+chmod 0644 Drivers/template/*.c
|
|
|
+chmod 0644 doc/ProgrammerManual/Tutorial/*.html
|
|
|
+chmod 0644 doc/lst/*
|
|
|
+chmod 0644 include/odbcinst.h
|
|
|
+
|
|
|
+# Blow away the embedded libtool and replace with build system's libtool.
|
|
|
+# (We will use the installed libtool anyway, but this makes sure they match.)
|
|
|
+rm -rf config.guess config.sub install-sh ltmain.sh libltdl
|
|
|
+# this hack is so we can build with either libtool 2.2 or 1.5
|
|
|
+libtoolize --install || libtoolize
|
|
|
|
|
|
%build
|
|
|
-%if %{vine26}
|
|
|
-[ -x /usr/bin/autoconf-2.5? ] && ln -s /usr/bin/autoconf-2.5? autoconf
|
|
|
-[ -x /usr/bin/autoheader-2.5? ] && ln -s /usr/bin/autoheader-2.5? autoheader
|
|
|
-[ -x /usr/bin/aclocal-1.5 ] && ln -s /usr/bin/aclocal-1.5 aclocal
|
|
|
-[ -x /usr/bin/automake-1.5 ] && ln -s /usr/bin/automake-1.5 automake
|
|
|
-export PATH=`pwd`:$PATH
|
|
|
-%endif
|
|
|
-
|
|
|
-%if %{kde}
|
|
|
# pick up qt path
|
|
|
-export QTDIR=
|
|
|
-. /etc/profile.d/qt.sh
|
|
|
-%endif
|
|
|
+export PATH="%{_qt4_bindir}:$PATH"
|
|
|
+# clean up old moc files
|
|
|
+(cd odbcinstQ4 && rm -f mC*.cpp)
|
|
|
|
|
|
aclocal
|
|
|
automake --add-missing
|
|
|
autoconf
|
|
|
-pushd libltdl
|
|
|
-aclocal
|
|
|
-automake
|
|
|
-autoconf
|
|
|
-popd
|
|
|
|
|
|
-%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-static=yes --enable-drivers
|
|
|
+# unixODBC 2.2.14 is not aliasing-safe
|
|
|
+CFLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
+CXXFLAGS="$CFLAGS"
|
|
|
+export CFLAGS CXXFLAGS
|
|
|
+
|
|
|
+%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-drivers --enable-ltdllib --with-qt-programs="%{_qt4_bindir}" --with-qt-libraries="%{_qt4_libdir}"
|
|
|
make all
|
|
|
|
|
|
%install
|
|
|
-%if %{kde}
|
|
|
# pick up qt path
|
|
|
-unset QTDIR || : ; . /etc/profile.d/qt.sh
|
|
|
-%endif
|
|
|
+export PATH="%{_qt4_bindir}:$PATH"
|
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
|
|
|
|
|
-%makeinstall
|
|
|
+make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
|
|
|
-#cp DataManager/LinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/icons
|
|
|
-#cp odbcinstQ/smallLinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/icons
|
|
|
|
|
|
-#install -m755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System
|
|
|
-#install -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System
|
|
|
+# install *.desktop files
|
|
|
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE2}
|
|
|
+
|
|
|
+# package doesn't supply an icon for ODBCConfig, so use the one for DataManager
|
|
|
+cp DataManager/LinuxODBC.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
|
|
+
|
|
|
+# multilib header hacks
|
|
|
+# we only apply this to known Red Hat multilib arches, per bug #181335
|
|
|
+case `uname -i` in
|
|
|
+ i386 | x86_64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 )
|
|
|
+ mv $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf_`uname -i`.h
|
|
|
+ rm -f unixodbc_conf.h
|
|
|
+ sed s/CONFFILE/unixodbc_conf/ %{SOURCE4} >unixodbc_conf.h
|
|
|
+ install -m 644 unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}
|
|
|
+ ;;
|
|
|
+ *)
|
|
|
+ ;;
|
|
|
+esac
|
|
|
+
|
|
|
+# remove obsolete Postgres drivers from the package (but not the setup code)
|
|
|
+rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
|
|
|
|
|
|
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
|
|
|
+# copy text driver documentation into main doc directory
|
|
|
+# currently disabled because upstream no longer includes text driver
|
|
|
+# mkdir -p doc/Drivers/txt
|
|
|
+# cp -pr Drivers/txt/doc/* doc/Drivers/txt
|
|
|
+
|
|
|
+# don't want to install doc Makefiles as docs
|
|
|
+#find doc -name 'Makefile*' | xargs rm
|
|
|
+
|
|
|
+# we do not want to ship static libraries
|
|
|
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
|
|
|
+
|
|
|
+# remove unpackaged files from the buildroot
|
|
|
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
+rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.*
|
|
|
+rm -rf $RPM_BUILD_ROOT%{_datadir}/libtool
|
|
|
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
@@ -146,11 +167,9 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
-%if %{kde}
|
|
|
%post kde -p /sbin/ldconfig
|
|
|
|
|
|
%postun kde -p /sbin/ldconfig
|
|
|
-%endif
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
@@ -174,9 +193,9 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%{_libdir}/libodbcminiS.so.*
|
|
|
%{_libdir}/libodbcmyS.so.*
|
|
|
%{_libdir}/libodbcnnS.so.*
|
|
|
-%{_libdir}/libodbcpsql.so.*
|
|
|
+#%{_libdir}/libodbcpsql.so.*
|
|
|
%{_libdir}/libodbcpsqlS.so.*
|
|
|
-%{_libdir}/libodbctxt.so.*
|
|
|
+#%{_libdir}/libodbctxt.so.*
|
|
|
%{_libdir}/libodbctxtS.so.*
|
|
|
%{_libdir}/liboplodbcS.so.*
|
|
|
%{_libdir}/liboraodbcS.so.*
|
|
@@ -202,30 +221,30 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
%{_libdir}/libodbcminiS.so
|
|
|
%{_libdir}/libodbcmyS.so
|
|
|
%{_libdir}/libodbcnnS.so
|
|
|
-%{_libdir}/libodbcpsql.so
|
|
|
+#%{_libdir}/libodbcpsql.so
|
|
|
%{_libdir}/libodbcpsqlS.so
|
|
|
-%{_libdir}/libodbctxt.so
|
|
|
+#%{_libdir}/libodbctxt.so
|
|
|
%{_libdir}/libodbctxtS.so
|
|
|
%{_libdir}/liboplodbcS.so
|
|
|
%{_libdir}/liboraodbcS.so
|
|
|
%{_libdir}/libsapdbS.so
|
|
|
%{_libdir}/libtdsS.so
|
|
|
%{_libdir}/libtemplate.so
|
|
|
-%{_libdir}/*.a
|
|
|
+#{_libdir}/*.a
|
|
|
#{_libdir}/*.la
|
|
|
|
|
|
-%if %{kde}
|
|
|
%files kde
|
|
|
%defattr(-,root,root)
|
|
|
-%{_bindir}/DataManager
|
|
|
-%{_bindir}/DataManagerII
|
|
|
%{_bindir}/ODBCConfig
|
|
|
-%{_bindir}/odbctest
|
|
|
-%{_libdir}/libodbcinstQ.so*
|
|
|
-#%{_sysconfdir}/X11/applnk/System/*
|
|
|
-%endif
|
|
|
+%{_datadir}/applications/ODBCConfig.desktop
|
|
|
+%{_datadir}/pixmaps/LinuxODBC.xpm
|
|
|
+%{_libdir}/libodbcinstQ*so
|
|
|
+%{_libdir}/libodbcinstQ*so.*
|
|
|
|
|
|
%changelog
|
|
|
+* Sat Apr 09 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.14-1
|
|
|
+- updated to 2.2.14
|
|
|
+
|
|
|
* Sat Sep 20 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.12-1
|
|
|
- applied new versioning policy
|
|
|
- removed *.la files from devel package
|