2011-08-04 11:43:40 +02:00
|
|
|
#
|
|
|
|
# spec file for package freetds
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: freetds
|
2011-10-12 18:38:05 +02:00
|
|
|
Version: 0.91
|
2011-08-11 13:42:55 +02:00
|
|
|
Release: 1
|
2011-10-12 18:38:05 +02:00
|
|
|
%define dirver 0.91
|
|
|
|
%define filever 0.91
|
2011-08-04 11:43:40 +02:00
|
|
|
License: LGPL
|
|
|
|
Summary: A free re-implementation of the TDS (Tabular DataStream) protocol
|
2011-10-10 17:15:00 +02:00
|
|
|
URL: http://www.freetds.org/
|
2011-08-04 11:43:40 +02:00
|
|
|
Group: Productivity/Databases/Clients
|
|
|
|
Source: %{name}-%{filever}.tar.bz2
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: unixODBC
|
|
|
|
BuildRequires: unixODBC-devel
|
2011-10-02 16:43:33 +02:00
|
|
|
BuildRequires: libtool
|
2011-08-04 11:43:40 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2011-08-03 15:14:03 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-08-04 11:43:40 +02:00
|
|
|
Requires: glibc-locale
|
2011-08-03 15:14:03 +02:00
|
|
|
%endif
|
|
|
|
|
2011-08-04 11:43:40 +02:00
|
|
|
%description
|
|
|
|
FreeTDS is a project to document and implement the TDS (Tabular DataStream)
|
|
|
|
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.
|
|
|
|
|
2011-08-06 16:13:37 +02:00
|
|
|
%package -n libfreetds
|
|
|
|
Summary: A free re-implementation of the TDS (Tabular DataStream) protocol
|
2011-10-10 17:15:00 +02:00
|
|
|
Group: System/Libraries
|
2011-08-06 16:13:37 +02:00
|
|
|
Provides: %{name} = %{version}
|
|
|
|
Obsoletes: %{name} < %{version}
|
|
|
|
|
|
|
|
%description -n libfreetds
|
|
|
|
FreeTDS is a project to document and implement the TDS (Tabular DataStream)
|
|
|
|
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 tools
|
|
|
|
Summary: Applications for working with the TDS (Tabular DataStream) protocol
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
License: GPL, LGPL
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
FreeTDS is a project to document and implement the TDS (Tabular DataStream)
|
|
|
|
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
|
|
|
|
|
2011-08-04 11:43:40 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Include files needed for development with FreeTDS
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-08-06 16:13:37 +02:00
|
|
|
Requires: %{name} = %{version}
|
2011-08-04 11:43:40 +02:00
|
|
|
|
2011-08-03 15:14:03 +02:00
|
|
|
%description devel
|
2011-08-04 11:43:40 +02:00
|
|
|
The freetds-devel package contains the files necessary for development with
|
|
|
|
the FreeTDS libraries.
|
2011-08-03 15:14:03 +02:00
|
|
|
|
|
|
|
%package -n libtdsodbc0
|
2011-08-04 11:43:40 +02:00
|
|
|
Summary: FreeTDS ODBC Driver for unixODBC
|
|
|
|
Group: Productivity/Databases/Clients
|
|
|
|
Requires: unixODBC >= 2.0.0
|
2011-08-03 15:14:03 +02:00
|
|
|
|
|
|
|
%description -n libtdsodbc0
|
|
|
|
The freetds-unixodbc package contains ODBC driver build for unixODBC.
|
|
|
|
|
|
|
|
%package doc
|
2011-08-04 11:43:40 +02:00
|
|
|
Summary: User documentation for FreeTDS
|
|
|
|
Group: Productivity/Databases/Clients
|
2011-08-03 15:14:03 +02:00
|
|
|
|
|
|
|
%description doc
|
2011-08-04 11:43:40 +02:00
|
|
|
The freetds-doc package contains the useguide and reference of FreeTDS
|
2011-08-03 15:14:03 +02:00
|
|
|
and can be installed even if FreeTDS main package is not installed
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n %{name}-%{dirver}
|
2011-08-04 11:43:40 +02:00
|
|
|
|
2011-08-03 15:14:03 +02:00
|
|
|
%build
|
2011-08-04 11:43:40 +02:00
|
|
|
ODBCDIR=$(odbc_config --prefix || true)
|
2011-08-03 15:14:03 +02:00
|
|
|
if test ! -r "$ODBCDIR/include/sql.h"; then
|
|
|
|
ODBCDIR=/usr/local
|
|
|
|
fi
|
|
|
|
if test ! -r "$ODBCDIR/include/sql.h"; then
|
|
|
|
ODBCDIR=/usr
|
|
|
|
fi
|
|
|
|
autoreconf --force --install
|
|
|
|
%configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--with-unixodbc="$ODBCDIR" \
|
|
|
|
--enable-threadsafe \
|
|
|
|
--sysconfdir=%{_sysconfdir} \
|
|
|
|
--with-tdsver=4.2 \
|
|
|
|
--with-docdir=%{_docdir}/freetds \
|
|
|
|
--disable-static \
|
|
|
|
--with-pic
|
2011-08-04 11:43:40 +02:00
|
|
|
make %{?_smp_flags} RPM_OPT_FLAGS="%{optflags}"
|
|
|
|
|
|
|
|
%install
|
2011-10-10 17:15:00 +02:00
|
|
|
%makeinstall
|
2011-08-03 15:14:03 +02:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/freetds/
|
2011-08-04 11:43:40 +02:00
|
|
|
mv %{buildroot}%{_datadir}/doc/freetds-*/* %{buildroot}%{_docdir}/freetds/
|
2011-08-03 15:14:03 +02:00
|
|
|
rm -rf %{buildroot}%{_docdir}/freetds-* %{buildroot}/%{_datadir}/doc/freetds-*
|
|
|
|
%fdupes %{buildroot}/%{_docdir}/freetds/userguide
|
|
|
|
|
2011-08-06 16:13:37 +02:00
|
|
|
%post -n libfreetds -p /sbin/ldconfig
|
2011-08-03 15:14:03 +02:00
|
|
|
|
2011-08-06 16:13:37 +02:00
|
|
|
%postun -n libfreetds -p /sbin/ldconfig
|
2011-08-03 15:14:03 +02:00
|
|
|
|
|
|
|
%post -n libtdsodbc0
|
|
|
|
echo "[FreeTDS]
|
|
|
|
Description = FreeTDS unixODBC Driver
|
|
|
|
Driver = %{_libdir}/libtdsodbc.so.0
|
|
|
|
Setup = %{_libdir}/libtdsodbc.so.0" | odbcinst -i -d -r > /dev/null 2>&1 || true
|
|
|
|
echo "[SQL Server]
|
|
|
|
Description = FreeTDS unixODBC Driver
|
|
|
|
Driver = %{_libdir}/libtdsodbc.so.0
|
|
|
|
Setup = %{_libdir}/libtdsodbc.so.0" | odbcinst -i -d -r > /dev/null 2>&1 || true
|
|
|
|
/sbin/ldconfig 2> /dev/null
|
|
|
|
|
2011-10-10 17:15:00 +02:00
|
|
|
%postun -n libtdsodbc0 -p /sbin/ldconfig
|
2011-08-03 15:14:03 +02:00
|
|
|
|
|
|
|
%preun -n libtdsodbc0
|
|
|
|
odbcinst -u -d -n 'FreeTDS' > /dev/null 2>&1 || true
|
|
|
|
odbcinst -u -d -n 'SQL Server' > /dev/null 2>&1 || true
|
|
|
|
|
2011-08-06 16:13:37 +02:00
|
|
|
%files -n libfreetds
|
2011-08-04 11:43:40 +02:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc AUTHORS BUGS COPYING* ChangeLog INSTALL NEWS README TODO
|
2011-08-03 15:14:03 +02:00
|
|
|
%{_libdir}/libct.so.*
|
|
|
|
%{_libdir}/libsybdb.so.*
|
|
|
|
%config %{_sysconfdir}/*
|
2011-08-06 16:13:37 +02:00
|
|
|
%{_mandir}/man5/*.5.gz
|
|
|
|
|
|
|
|
%files tools
|
|
|
|
%defattr (-,root,root)
|
|
|
|
%{_bindir}/*
|
|
|
|
%{_mandir}/man1/*.1.gz
|
2011-08-04 11:43:40 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr (-,root,root)
|
2011-08-03 15:14:03 +02:00
|
|
|
%exclude %{_libdir}/*.la
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_includedir}/*
|
|
|
|
|
|
|
|
%files -n libtdsodbc0
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libtdsodbc.so.*
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr (-,root,root)
|
2011-08-04 11:43:40 +02:00
|
|
|
%{_datadir}/doc/packages/freetds/
|
|
|
|
|
2011-08-03 15:14:03 +02:00
|
|
|
%changelog
|