--- /dev/null
+--- freetds-0.95.8/configure.ac.orig 2015-06-22 11:00:49.000000000 +0200
++++ freetds-0.95.8/configure.ac 2015-06-25 21:14:01.183204149 +0200
+@@ -568,12 +568,10 @@
+ if test -f "$with_unixodbc/bin/odbc_config"; then
+ ODBC_CONFIG="$with_unixodbc/bin/odbc_config"
+ ODBC_INC=`$ODBC_CONFIG --include-prefix`
+- LDFLAGS="$LDFLAGS -L`$ODBC_CONFIG --lib-prefix`"
+ else
+ # if not available do not use system default
+ ODBC_CONFIG=""
+ ODBC_INC="$with_unixodbc/include"
+- LDFLAGS="$LDFLAGS -L$with_unixodbc/lib"
+ fi
+ test -r "$ODBC_INC/sql.h" || AC_ERROR([sql.h not found])
+ test -r "$ODBC_INC/sqlext.h" || AC_ERROR([sqlext.h not found])
+--- freetds-0.95.8/m4/check_openssl.m4.orig 2015-05-05 19:54:59.000000000 +0200
++++ freetds-0.95.8/m4/check_openssl.m4 2015-06-25 21:13:31.026538747 +0200
+@@ -18,7 +18,6 @@
+ else
+ echo "OpenSSL found in $ssldir"
+ NETWORK_LIBS="$NETWORK_LIBS -lssl -lcrypto"
+- LDFLAGS="$LDFLAGS -L$ssldir/lib"
+ HAVE_OPENSSL=yes
+ AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have the OpenSSL.])
+ fi
--- /dev/null
+--- freetds-0.95.8/include/freetds/tds.h.orig 2015-05-21 06:34:59.000000000 +0200
++++ freetds-0.95.8/include/freetds/tds.h 2015-06-25 20:25:33.893326156 +0200
+@@ -144,7 +144,7 @@
+ TDS_INT date; /**< date, 0 = 1900-01-01 */
+ TDS_SMALLINT offset; /**< time offset */
+ TDS_USMALLINT time_prec:3;
+- TDS_USMALLINT _res:10;
++ TDS_USMALLINT res_:10;
+ TDS_USMALLINT has_time:1;
+ TDS_USMALLINT has_date:1;
+ TDS_USMALLINT has_offset:1;
# 5.0 (used by Sybase SQLServer >= 11)
# 7.0 (used by MS SQL Server 7.0) [spec default]
# 7.1 (used by MS SQL Server 2000)
+# 7.2 (used by MS SQL Server 2005)
+# 7.3 (used by MS SQL Server 2008)
+# [7.4 (used by MS SQL Server 2012/2014) not supported yet]
%{!?tdsver:%define tdsver 7.0}
Summary: Free implementation of Sybase's db-lib
Summary(pl.UTF-8): Wolnodostępna implementacja db-lib firmy Sybase
Name: freetds
-Version: 0.91
-Release: 3
+Version: 0.95.8
+Release: 1
License: LGPL v2+
Group: Libraries
-Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.gz
-# Source0-md5: b14db5823980a32f0643d1a84d3ec3ad
-Patch0: format-security.patch
+Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.bz2
+# Source0-md5: 44b28f2ee1236c47de395193f9ee4810
+Patch0: %{name}-reserved.patch
+Patch1: %{name}-no-Llibdir.patch
URL: http://www.freetds.org/
BuildRequires: autoconf >= 2.53
BuildRequires: automake
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__libtoolize}
%{__automake}
%configure \
%{?with_kerberos5:--enable-krb5=gssapi} \
- --with-tdsver=%{tdsver} \
+ --disable-silent-rules \
%{?with_msdblib:--with-msdblib} \
--with-openssl \
+ --with-tdsver=%{tdsver} \
--with-unixodbc=/usr
%{__make}
# ODBC driver, dlopen()ed
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libtdsodbc.{la,a}
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS BUGS* ChangeLog NEWS README* TODO* doc/doc/%{name}-%{version}/userguide
+%doc AUTHORS BUGS* ChangeLog NEWS README* TODO* doc/userguide
%attr(755,root,root) %{_bindir}/bsqldb
%attr(755,root,root) %{_bindir}/datacopy
%attr(755,root,root) %{_bindir}/defncopy
%files devel
%defattr(644,root,root,755)
-%doc doc/doc/%{name}-%{version}/reference
+%doc doc/reference
%attr(755,root,root) %{_libdir}/libct.so
%attr(755,root,root) %{_libdir}/libsybdb.so
%{_libdir}/libct.la
%{_libdir}/libsybdb.la
-%{_includedir}/*.h
+%{_includedir}/bkpublic.h
+%{_includedir}/cspublic.h
+%{_includedir}/cstypes.h
+%{_includedir}/ctpublic.h
+%{_includedir}/odbcss.h
+%{_includedir}/sqldb.h
+%{_includedir}/sqlfront.h
+%{_includedir}/sybdb.h
+%{_includedir}/syberror*.h
+%{_includedir}/sybfront.h
+%{_includedir}/tds_sysdep_public.h
%files static
%defattr(644,root,root,755)