3 %bcond_with msdblib # use MS-style dblib instead of SYB-style
4 %bcond_without kerberos5 # Kerberos5 support (via Heimdal)
6 # %%define tdsver - default protocol version; valid versions:
7 # 4.2 (used by Sybase SQLServer <= 10 and MS SQL Server 6.5)
9 # 5.0 (used by Sybase SQLServer >= 11)
10 # 7.0 (used by MS SQL Server 7.0) [spec default]
11 # 7.1 (used by MS SQL Server 2000)
13 %{!?tdsver:%define tdsver 7.0}
15 Summary: Free implementation of Sybase's db-lib
16 Summary(pl.UTF-8): Wolnodostępna implementacja db-lib firmy Sybase
22 Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.gz
23 # Source0-md5: b14db5823980a32f0643d1a84d3ec3ad
24 Patch0: format-security.patch
25 URL: http://www.freetds.org/
26 BuildRequires: autoconf >= 2.53
27 BuildRequires: automake
28 BuildRequires: gettext-tools
29 %{?with_kerberos5:BuildRequires: heimdal-devel}
30 BuildRequires: libltdl-devel
31 BuildRequires: libtool
32 BuildRequires: openssl-devel
33 BuildRequires: unixODBC-devel
34 Requires(post): /sbin/ldconfig
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sysconfdir /etc/tds
40 FreeTDS is a free (open source) implementation of Sybase's db-lib,
41 ct-lib, and ODBC libraries (which can be used also to work with MS SQL
42 databases). Currently, dblib and ctlib are most mature. Both of these
43 libraries have several programs known to compile and run against them.
44 ODBC is not quite as mature, but may work depending on your needs.
46 %description -l pl.UTF-8
47 FreeTDS to wolnodostępna (z otwartymi źródłami) implementacja
48 bibliotek db-lib, ct-lib i ODBC firmy Sybase (których można używać
49 także do pracy z bazami MS SQL). Aktualnie najlepiej działają dblib i
50 ctlib - istnieje trochę programów, o których wiadomo, że kompilują się
51 i działają z tymi bibliotekami. ODBC nie jest jeszcze na tyle
52 skończony, ale może działać w zależności od potrzeb.
55 Summary: FreeTDS header files
56 Summary(pl.UTF-8): Pliki nagłówkowe FreeTDS
57 Group: Development/Libraries
58 Requires: %{name} = %{version}-%{release}
59 %{?with_kerberos5:Requires: heimdal-devel}
60 Requires: openssl-devel
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe FreeTDS.
69 Summary: FreeTDS static libraries
70 Summary(pl.UTF-8): Statyczne biblioteki FreeTDS
71 Group: Development/Libraries
72 Requires: %{name}-devel = %{version}-%{release}
75 FreeTDS static libraries.
77 %description static -l pl.UTF-8
78 Statyczne biblioteki FreeTDS.
81 Summary: FreeTDS ODBC driver for unixODBC
82 Summary(pl.UTF-8): Sterownik ODBC FreeTDS dla unixODBC
84 Requires(post): /sbin/ldconfig
85 Requires(post): /usr/bin/odbcinst
86 Requires: %{name} = %{version}-%{release}
90 FreeTDS ODBC driver for unixODBC.
92 %description odbc -l pl.UTF-8
93 Sterownik ODBC FreeTDS dla unixODBC.
106 %{?with_kerberos5:--enable-krb5=gssapi} \
107 --with-tdsver=%{tdsver} \
108 %{?with_msdblib:--with-msdblib} \
115 rm -rf $RPM_BUILD_ROOT
118 DESTDIR=$RPM_BUILD_ROOT \
119 ETC=$RPM_BUILD_ROOT%{_sysconfdir}
121 cp -a src/pool/BUGS BUGS.pool
122 cp -a src/pool/README README.pool
123 cp -a src/pool/TODO TODO.pool
125 # ODBC driver, dlopen()ed
126 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtdsodbc.{la,a}
128 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
131 rm -rf $RPM_BUILD_ROOT
135 if [ -f /etc/freetds.conf ]; then
136 mv -f /etc/freetds.conf %{_sysconfdir}/freetds.conf
139 %postun -p /sbin/ldconfig
143 /usr/bin/odbcinst -i -d -r <<EOF
145 Description = FreeTDS unixODBC Driver
146 Driver = %{_libdir}/libtdsodbc.so.0
147 Setup = %{_libdir}/libtdsodbc.so.0
149 /usr/bin/odbcinst -i -d -r <<EOF
151 Description = FreeTDS unixODBC Driver
152 Driver = %{_libdir}/libtdsodbc.so.0
153 Setup = %{_libdir}/libtdsodbc.so.0
156 %postun odbc -p /sbin/ldconfig
159 %defattr(644,root,root,755)
160 %doc AUTHORS BUGS* ChangeLog NEWS README* TODO* doc/doc/%{name}-%{version}/userguide
161 %attr(755,root,root) %{_bindir}/bsqldb
162 %attr(755,root,root) %{_bindir}/datacopy
163 %attr(755,root,root) %{_bindir}/defncopy
164 %attr(755,root,root) %{_bindir}/fisql
165 %attr(755,root,root) %{_bindir}/freebcp
166 %attr(755,root,root) %{_bindir}/tdspool
167 %attr(755,root,root) %{_bindir}/tsql
168 %attr(755,root,root) %{_libdir}/libct.so.*.*.*
169 %attr(755,root,root) %ghost %{_libdir}/libct.so.4
170 %attr(755,root,root) %{_libdir}/libsybdb.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libsybdb.so.5
173 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/freetds.conf
174 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locales.conf
175 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pool.conf
176 %{_mandir}/man1/bsqldb.1*
177 %{_mandir}/man1/datacopy.1*
178 %{_mandir}/man1/defncopy.1*
179 %{_mandir}/man1/fisql.1*
180 %{_mandir}/man1/freebcp.1*
181 %{_mandir}/man1/tsql.1*
182 %{_mandir}/man5/freetds.conf.5*
185 %defattr(644,root,root,755)
186 %doc doc/doc/%{name}-%{version}/reference
187 %attr(755,root,root) %{_libdir}/libct.so
188 %attr(755,root,root) %{_libdir}/libsybdb.so
190 %{_libdir}/libsybdb.la
194 %defattr(644,root,root,755)
196 %{_libdir}/libsybdb.a
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/bsqlodbc
201 %attr(755,root,root) %{_bindir}/osql
202 %attr(755,root,root) %{_libdir}/libtdsodbc.so.*.*.*
203 %attr(755,root,root) %ghost %{_libdir}/libtdsodbc.so.0
204 %attr(755,root,root) %{_libdir}/libtdsodbc.so
205 %{_mandir}/man1/bsqlodbc.1*
206 %{_mandir}/man1/osql.1*