# # spec file for package freetds # # Copyright (c) 2017 SUSE LINUX 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: freetds Version: 1.00.39 Release: 1.4 Summary: A free re-implementation of the TDS (Tabular Data Stream) protocol License: LGPL-2.1+ and GPL-2.0+ Group: Productivity/Databases/Clients Url: http://www.freetds.org/ Source: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.gz BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: unixODBC-devel BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(nettle) Requires: glibc-locale %description FreeTDS is a project to document and implement the TDS (Tabular Data Stream) protocol. TDS is used by Sybase and Microsoft for client to database server communications. FreeTDS includes call level interfaces for DB-Lib, CT-Lib, and ODBC. %package config Summary: A free re-implementation of the TDS (Tabular Data Stream) protocol License: LGPL-2.1+ Group: Productivity/Databases/Clients Obsoletes: libfreetds < %{version} Provides: %{name} = %{version} Provides: libfreetds = %{version} Obsoletes: %{name} < %{version} %description config FreeTDS is a project to document and implement the TDS (Tabular Data Stream) protocol. TDS is used by Sybase and Microsoft for client to database server communications. This subpackage contains default configuration files and documentation for them. %package tools Summary: Applications for working with the TDS (Tabular Data Stream) protocol License: LGPL-2.1+ and GPL-2.0+ Group: Productivity/Databases/Clients %description tools FreeTDS is a project to document and implement the TDS (Tabular Data Stream) protocol. TDS is used by Sybase and Microsoft for client to database server communications. FreeTDS includes call level interfaces for DB-Lib, CT-Lib, and ODBC. This package provides application to allow users to make use of the protocol. %package devel Summary: Include files needed for development with FreeTDS License: LGPL-2.1+ Group: Development/Libraries/C and C++ Requires: libct4 = %{version} Requires: libsybdb5 = %{version} Requires: libtdsodbc0 = %{version} %description devel The freetds-devel package contains the files necessary for development with the FreeTDS libraries. %package -n libct4 Summary: FreeTDS standalone driver with modern API License: LGPL-2.1+ Group: System/Libraries %description -n libct4 ct-lib refers to Sybase's second-generation API, which fixes a number of implementation and conceptual gaps in db-lib (libsybdb). libct is not the most complete implementation yet. %package -n libsybdb5 Summary: FreeTDS standalone driver with classic API License: LGPL-2.1+ Group: System/Libraries %description -n libsybdb5 db-lib is the oldest and simplest API, and the only API supported by both vendors, which has some relevance when porting applications that use the vendors' libraries. db-lib was the first API implemented by FreeTDS, and is still the best one supported. Anything that can be done in FreeTDS can be done through db-lib. %package -n libtdsodbc0 Summary: FreeTDS ODBC Driver for unixODBC License: LGPL-2.1+ Group: Productivity/Databases/Clients Requires: unixODBC >= 2.0.0 %description -n libtdsodbc0 The ODBC drivers is the FreeTDS's project most recent addition. Its chief advantage is that it makes FreeTDS servers look like other ODBC servers, a big help to people who know ODBC and/or write applications for several kinds of servers. %package doc Summary: User documentation for FreeTDS License: LGPL-2.1+ and GPL-2.0+ Group: Documentation/HTML %description doc The freetds-doc package contains the useguide and reference of FreeTDS and can be installed even if FreeTDS main package is not installed %prep %setup -q %build %configure \ --with-unixodbc=%{_prefix} \ --enable-threadsafe \ --sysconfdir=%{_sysconfdir}/freetds \ --with-tdsver=4.2 \ --disable-static \ %if 0%{?suse_version} >= 1310 --with-gnutls \ %endif --with-pic make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}" V=1 %install %make_install find %{buildroot} -type f -name "*.la" -delete -print # Fix docu location install -d %{buildroot}%{_docdir}/freetds #mv %{buildroot}%{_datadir}/doc/freetds/* %{buildroot}%{_docdir}/freetds/ #rm -rf %{buildroot}%{_docdir}/freetds* %{buildroot}%{_datadir}/doc/freetds-* install -D AUTHORS %{buildroot}%{_defaultdocdir}/%{name}/AUTHORS # Fix permissions find %{buildroot}%{_datadir} -type f -print0 | xargs -0 chmod -x find %{buildroot}%{_sysconfdir} -type f -print0 | xargs -0 chmod -x #cd %{buildroot}%{_sysconfdir}/freetds for i in %{buildroot}%{_sysconfdir}/freetds/* do mv $i $i-new done %fdupes %{buildroot}/%{_prefix} %post -n libct4 -p /sbin/ldconfig %postun -n libct4 -p /sbin/ldconfig %post -n libsybdb5 -p /sbin/ldconfig %postun -n libsybdb5 -p /sbin/ldconfig %post -n libtdsodbc0 echo "[FreeTDS] Description = FreeTDS unixODBC Driver Driver = %{_libdir}/libtdsodbc.so.0 Setup = %{_libdir}/libtdsodbc.so.0" | odbcinst -i -d -r || true echo "[SQL Server] Description = FreeTDS unixODBC Driver Driver = %{_libdir}/libtdsodbc.so.0 Setup = %{_libdir}/libtdsodbc.so.0" | odbcinst -i -d -r || true /sbin/ldconfig %postun -n libtdsodbc0 -p /sbin/ldconfig %preun -n libtdsodbc0 odbcinst -u -d -n 'FreeTDS' odbcinst -u -d -n 'SQL Server' %files config %defattr(-,root,root) %config %{_sysconfdir}/* %{_mandir}/man5/*.5%{ext_man} %files tools %defattr (-,root,root) %{_bindir}/* %{_mandir}/man1/*.1%{ext_man} %files devel %defattr (-,root,root) %doc BUGS COPYING* NEWS README TODO %{_libdir}/*.so %{_includedir}/* %files -n libct4 %defattr(-,root,root) %{_libdir}/libct.so.4* %files -n libsybdb5 %defattr(-,root,root) %{_libdir}/libsybdb.so.5* %files -n libtdsodbc0 %defattr(-,root,root) %{_libdir}/libtdsodbc.so.* %files doc %defattr (-,root,root) %{_defaultdocdir}/freetds/ %changelog * Thu May 18 2017 vsistek@suse.com - Update to version 1.0.39 * See NEWS for a complete list of changes * Sat Mar 25 2017 mpluskal@suse.com - Update to version 1.0.27 * See NEWS for a complete list of changes * Thu Jan 5 2017 mpluskal@suse.com - Update to version 1.00.24 * See NEWS for a complete list of changes * Sun May 1 2016 mpluskal@suse.com - Update to 0.95.95 * See NEWS for a complete list of changes * Tue Apr 19 2016 mpluskal@suse.com - Update to 0.95.94 * See NEWS for a complete list of changes * Wed Mar 2 2016 tabraham@suse.com - Update to 0.95.87 * See NEWS for a complete list of changes * Thu Feb 11 2016 mpluskal@suse.com - Update to 0.95.82 * See NEWS for complete list of changes * Sun Jan 17 2016 mpluskal@suse.com - Update to 0.95.80 * See NEWS for complete list of changes * Fri Jan 8 2016 tchvatal@suse.com - Version update to 0.95.79: * See NEWS file for in-depth changes list * Sun Dec 20 2015 mpluskal@suse.com - Update to 0.95.76 - See NEWS for complete list of changes * Mon Nov 16 2015 mpluskal@suse.com - Update to 0.95.67 - See NEWS for complete list of changes * Sat Oct 31 2015 mpluskal@suse.com - Update to 0.95.65 - See NEWS for complete list of changes - Make building more verbose * Fri Sep 11 2015 mpluskal@suse.com - Update to 0.95.8 - See NEWS for complete list of changes - Update dependencies - Enable gnutls support * Sat Apr 11 2015 tchvatal@suse.com - Drop autoreconf call which was pointless. Seems to build without and thus fixes build on sle11. * Fri Mar 13 2015 tchvatal@suse.com - Version bump to 0.91.112: * No obvious changelog - Various spec-cleaner sorting * Sat Dec 6 2014 jengelh@inai.de - Update to new upstream release 0.91.103 * fix memleak when using REALM option in freetds.conf * ODBC driver did not return parameters as rows - freetds-devel had a dangling symlink due to lack of Require on libtdsodbc0 - Shlib packaging guideline: put libct and libsybdb in separate subpackages. - Improve description for the different API libraries. - Do not ignore output from odbcinst or ldconfig. * Tue Feb 7 2012 coolo@suse.com - there is a GPL copying too, so add GPL-2.0+ too * Sun Feb 5 2012 jengelh@medozas.de - Remove redundant tags/sections - Resolve dependency indirection * Wed Oct 12 2011 tabraham@novell.com - updated to 0.91 * Sun Oct 9 2011 jengelh@medozas.de - Add missing "Group" for libfreetds and change %%make_install, resolving build failure for SLE11 - Remove redundant sections (cf. specfile guidelines) * Sat Oct 1 2011 coolo@suse.com - add libtool as buildrequire to make the spec file more reliable * Sat Aug 6 2011 toddrme2178@gmail.com - Split into library and tools (binary) packages - Fixed license labeling. * Thu Aug 4 2011 coolo@novell.com - ran format_spec source service * Fri Jul 15 2011 toddrme2178@gmail.com - Updated to 0.91 rc2 - Various spec file style cleanups - Changed to valid groups (fix for rpmlint warning) - Check for duplicate files (fix for rpmlint warning) - Move %%changes contents to existing .changes file * Fri Jul 15 2011 crrodriguez@opensuse.org - Update to version 0.9.2 * Thu May 13 2010 Matthias Eckermann - update to 0.83.dev.20100512 * Fri Feb 19 2010 Matthias Eckermann - update to 0.82.1.dev.20091223 * Thu May 8 2008 Matthias Eckermann - adopted for openSUSE buildservice * Wed Mar 28 2007 Frediano Ziglio - removed libtdssrv * Thu Sep 9 2004 Frediano Ziglio - remove dependency from freetds-unixodbc - fix field name (Copyright instead of License) - updated URL * Sun Mar 30 2003 Frediano Ziglio - add reference to doc package * Wed Feb 5 2003 Ian Grant - 0.61 tweaked. Added libtdssrv libraries and tools in /usr/bin + man pages * Mon Dec 30 2002 David Hollis - 0.60 tweaked. Move .a & .la files to -devel package * Thu Dec 20 2001 Brian Bruns - Modifications for 0.53 ver and removing interfaces file * Thu Jun 28 2001 Brian Bruns - Modifications for 0.52 ver and ODBC drivers * Wed Feb 14 2001 David Hollis - First stab at RPM for 0.51 ver