]>
Commit | Line | Data |
---|---|---|
bff0c498 | 1 | # |
8ce0c8b5 | 2 | # Conditional build: |
5e5f7b99 | 3 | %bcond_with gnutls # GnuTLS instead of OpenSSL |
bde04e5c | 4 | %bcond_with msdblib # use MS-style dblib instead of SYB-style |
f7cbf8ea | 5 | %bcond_without kerberos5 # Kerberos5 support (via Heimdal) |
8ce0c8b5 | 6 | # |
bde04e5c | 7 | # %%define tdsver - default protocol version; valid versions: |
9b575fab | 8 | # auto (default) |
5e5f7b99 JB |
9 | # 4.2 (obsolete; used by Sybase SQLServer <= 10 and MS SQL Server 6.5) |
10 | # 4.6 (obsolete) | |
9eb0d0b4 | 11 | # 5.0 (used by Sybase SQLServer >= 11) |
5e5f7b99 | 12 | # 7.0 (too insecure; used by MS SQL Server 7.0) |
f7cbf8ea | 13 | # 7.1 (used by MS SQL Server 2000) |
9ed90430 JB |
14 | # 7.2 (used by MS SQL Server 2005) |
15 | # 7.3 (used by MS SQL Server 2008) | |
9b575fab | 16 | # 7.4 (used by MS SQL Server 2012/2014) |
8ce0c8b5 JB |
17 | |
18 | Summary: Free implementation of Sybase's db-lib | |
dbb092a7 | 19 | Summary(pl.UTF-8): Wolnodostępna implementacja db-lib firmy Sybase |
8ce0c8b5 | 20 | Name: freetds |
49a2910b JB |
21 | Version: 1.2.21 |
22 | Release: 1 | |
f7cbf8ea | 23 | License: LGPL v2+ |
8ce0c8b5 | 24 | Group: Libraries |
9ed90430 | 25 | Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.bz2 |
49a2910b | 26 | # Source0-md5: f7aa1f544f16056538f3dbda5214a17b |
de913ab7 | 27 | Patch0: %{name}-no-Llibdir.patch |
8ce0c8b5 | 28 | URL: http://www.freetds.org/ |
8aede280 | 29 | BuildRequires: autoconf >= 2.53 |
bff0c498 | 30 | BuildRequires: automake |
9b575fab | 31 | BuildRequires: doxygen |
d119a539 | 32 | BuildRequires: gettext-tools |
5e5f7b99 JB |
33 | BuildRequires: gmp-devel |
34 | %{?with_gnutls:BuildRequires: gnutls-devel} | |
f7cbf8ea | 35 | %{?with_kerberos5:BuildRequires: heimdal-devel} |
9b575fab JB |
36 | BuildRequires: libltdl-devel >= 2:2 |
37 | BuildRequires: libtool >= 2:2 | |
5e5f7b99 | 38 | %{!?with_gnutls:BuildRequires: openssl-devel} |
9b575fab | 39 | BuildRequires: readline-devel |
8ce0c8b5 | 40 | BuildRequires: unixODBC-devel |
9eb0d0b4 | 41 | Requires(post): /sbin/ldconfig |
8ce0c8b5 JB |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
9eb0d0b4 JB |
44 | %define _sysconfdir /etc/tds |
45 | ||
8ce0c8b5 JB |
46 | %description |
47 | FreeTDS is a free (open source) implementation of Sybase's db-lib, | |
48 | ct-lib, and ODBC libraries (which can be used also to work with MS SQL | |
49 | databases). Currently, dblib and ctlib are most mature. Both of these | |
50 | libraries have several programs known to compile and run against them. | |
51 | ODBC is not quite as mature, but may work depending on your needs. | |
52 | ||
fe90d866 JR |
53 | %description -l pl.UTF-8 |
54 | FreeTDS to wolnodostępna (z otwartymi źródłami) implementacja | |
55 | bibliotek db-lib, ct-lib i ODBC firmy Sybase (których można używać | |
56 | także do pracy z bazami MS SQL). Aktualnie najlepiej działają dblib i | |
57 | ctlib - istnieje trochę programów, o których wiadomo, że kompilują się | |
58 | i działają z tymi bibliotekami. ODBC nie jest jeszcze na tyle | |
59 | skończony, ale może działać w zależności od potrzeb. | |
8ce0c8b5 JB |
60 | |
61 | %package devel | |
62 | Summary: FreeTDS header files | |
dbb092a7 | 63 | Summary(pl.UTF-8): Pliki nagłówkowe FreeTDS |
8ce0c8b5 | 64 | Group: Development/Libraries |
08350ff5 | 65 | Requires: %{name} = %{version}-%{release} |
5e5f7b99 JB |
66 | Requires: gmp-devel |
67 | %{?with_gnutls:Requires: gnutls-devel} | |
f7cbf8ea | 68 | %{?with_kerberos5:Requires: heimdal-devel} |
5e5f7b99 | 69 | %{!?with_gnutls:Requires: openssl-devel} |
8ce0c8b5 JB |
70 | |
71 | %description devel | |
72 | FreeTDS header files. | |
73 | ||
fe90d866 JR |
74 | %description devel -l pl.UTF-8 |
75 | Pliki nagłówkowe FreeTDS. | |
8ce0c8b5 JB |
76 | |
77 | %package static | |
78 | Summary: FreeTDS static libraries | |
dbb092a7 | 79 | Summary(pl.UTF-8): Statyczne biblioteki FreeTDS |
8ce0c8b5 | 80 | Group: Development/Libraries |
08350ff5 | 81 | Requires: %{name}-devel = %{version}-%{release} |
8ce0c8b5 JB |
82 | |
83 | %description static | |
84 | FreeTDS static libraries. | |
85 | ||
fe90d866 | 86 | %description static -l pl.UTF-8 |
8ce0c8b5 JB |
87 | Statyczne biblioteki FreeTDS. |
88 | ||
bde04e5c JB |
89 | %package odbc |
90 | Summary: FreeTDS ODBC driver for unixODBC | |
dbb092a7 | 91 | Summary(pl.UTF-8): Sterownik ODBC FreeTDS dla unixODBC |
bde04e5c JB |
92 | Group: Libraries |
93 | Requires(post): /sbin/ldconfig | |
94 | Requires(post): /usr/bin/odbcinst | |
95 | Requires: %{name} = %{version}-%{release} | |
96 | Requires: unixODBC | |
97 | ||
98 | %description odbc | |
99 | FreeTDS ODBC driver for unixODBC. | |
100 | ||
fe90d866 | 101 | %description odbc -l pl.UTF-8 |
bde04e5c JB |
102 | Sterownik ODBC FreeTDS dla unixODBC. |
103 | ||
8ce0c8b5 JB |
104 | %prep |
105 | %setup -q | |
33c6f7cd | 106 | %patch0 -p1 |
8ce0c8b5 JB |
107 | |
108 | %build | |
bff0c498 | 109 | %{__libtoolize} |
8aede280 | 110 | %{__aclocal} -I m4 |
993c5eb0 | 111 | %{__autoconf} |
8aede280 | 112 | %{__autoheader} |
bff0c498 | 113 | %{__automake} |
8ce0c8b5 | 114 | %configure \ |
f7cbf8ea | 115 | %{?with_kerberos5:--enable-krb5=gssapi} \ |
9ed90430 | 116 | --disable-silent-rules \ |
5e5f7b99 | 117 | %{?with_gnutls:--with-gnutls} \ |
08350ff5 | 118 | %{?with_msdblib:--with-msdblib} \ |
5e5f7b99 | 119 | %{!?with_gnutls:--with-openssl} \ |
9b575fab | 120 | %{?tdsver:--with-tdsver=%{tdsver}} \ |
fdafe96c | 121 | --with-unixodbc=/usr |
8ce0c8b5 JB |
122 | |
123 | %{__make} | |
124 | ||
125 | %install | |
126 | rm -rf $RPM_BUILD_ROOT | |
bde04e5c | 127 | |
8ce0c8b5 JB |
128 | %{__make} install \ |
129 | DESTDIR=$RPM_BUILD_ROOT \ | |
130 | ETC=$RPM_BUILD_ROOT%{_sysconfdir} | |
131 | ||
33c6f7cd JR |
132 | cp -a src/pool/BUGS BUGS.pool |
133 | cp -a src/pool/README README.pool | |
134 | cp -a src/pool/TODO TODO.pool | |
70398db6 | 135 | |
bde04e5c | 136 | # ODBC driver, dlopen()ed |
f7cbf8ea | 137 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtdsodbc.{la,a} |
bde04e5c | 138 | |
9ed90430 JB |
139 | # packaged as %doc |
140 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} | |
33c6f7cd | 141 | |
8ce0c8b5 JB |
142 | %clean |
143 | rm -rf $RPM_BUILD_ROOT | |
144 | ||
9eb0d0b4 JB |
145 | %post |
146 | /sbin/ldconfig | |
147 | if [ -f /etc/freetds.conf ]; then | |
148 | mv -f /etc/freetds.conf %{_sysconfdir}/freetds.conf | |
149 | fi | |
150 | ||
8ce0c8b5 JB |
151 | %postun -p /sbin/ldconfig |
152 | ||
bde04e5c JB |
153 | %post odbc |
154 | /sbin/ldconfig | |
155 | /usr/bin/odbcinst -i -d -r <<EOF | |
156 | [FreeTDS] | |
157 | Description = FreeTDS unixODBC Driver | |
158 | Driver = %{_libdir}/libtdsodbc.so.0 | |
159 | Setup = %{_libdir}/libtdsodbc.so.0 | |
160 | EOF | |
161 | /usr/bin/odbcinst -i -d -r <<EOF | |
162 | [SQL Server] | |
163 | Description = FreeTDS unixODBC Driver | |
164 | Driver = %{_libdir}/libtdsodbc.so.0 | |
165 | Setup = %{_libdir}/libtdsodbc.so.0 | |
166 | EOF | |
167 | ||
168 | %postun odbc -p /sbin/ldconfig | |
169 | ||
8ce0c8b5 JB |
170 | %files |
171 | %defattr(644,root,root,755) | |
5e5f7b99 | 172 | %doc AUTHORS.md BUGS.* ChangeLog NEWS.md README.* TODO.* doc/userguide |
8aede280 JB |
173 | %attr(755,root,root) %{_bindir}/bsqldb |
174 | %attr(755,root,root) %{_bindir}/datacopy | |
175 | %attr(755,root,root) %{_bindir}/defncopy | |
176 | %attr(755,root,root) %{_bindir}/fisql | |
177 | %attr(755,root,root) %{_bindir}/freebcp | |
178 | %attr(755,root,root) %{_bindir}/tdspool | |
179 | %attr(755,root,root) %{_bindir}/tsql | |
bde04e5c | 180 | %attr(755,root,root) %{_libdir}/libct.so.*.*.* |
8aede280 | 181 | %attr(755,root,root) %ghost %{_libdir}/libct.so.4 |
bde04e5c | 182 | %attr(755,root,root) %{_libdir}/libsybdb.so.*.*.* |
8aede280 | 183 | %attr(755,root,root) %ghost %{_libdir}/libsybdb.so.5 |
9eb0d0b4 | 184 | %dir %{_sysconfdir} |
c12462d0 ER |
185 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/freetds.conf |
186 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/locales.conf | |
187 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pool.conf | |
8aede280 JB |
188 | %{_mandir}/man1/bsqldb.1* |
189 | %{_mandir}/man1/datacopy.1* | |
190 | %{_mandir}/man1/defncopy.1* | |
191 | %{_mandir}/man1/fisql.1* | |
192 | %{_mandir}/man1/freebcp.1* | |
193 | %{_mandir}/man1/tsql.1* | |
194 | %{_mandir}/man5/freetds.conf.5* | |
8ce0c8b5 JB |
195 | |
196 | %files devel | |
197 | %defattr(644,root,root,755) | |
9ed90430 | 198 | %doc doc/reference |
bde04e5c JB |
199 | %attr(755,root,root) %{_libdir}/libct.so |
200 | %attr(755,root,root) %{_libdir}/libsybdb.so | |
bde04e5c JB |
201 | %{_libdir}/libct.la |
202 | %{_libdir}/libsybdb.la | |
9ed90430 JB |
203 | %{_includedir}/bkpublic.h |
204 | %{_includedir}/cspublic.h | |
205 | %{_includedir}/cstypes.h | |
206 | %{_includedir}/ctpublic.h | |
207 | %{_includedir}/odbcss.h | |
208 | %{_includedir}/sqldb.h | |
209 | %{_includedir}/sqlfront.h | |
210 | %{_includedir}/sybdb.h | |
211 | %{_includedir}/syberror*.h | |
212 | %{_includedir}/sybfront.h | |
213 | %{_includedir}/tds_sysdep_public.h | |
8ce0c8b5 JB |
214 | |
215 | %files static | |
216 | %defattr(644,root,root,755) | |
bde04e5c JB |
217 | %{_libdir}/libct.a |
218 | %{_libdir}/libsybdb.a | |
bde04e5c JB |
219 | |
220 | %files odbc | |
221 | %defattr(644,root,root,755) | |
8aede280 JB |
222 | %attr(755,root,root) %{_bindir}/bsqlodbc |
223 | %attr(755,root,root) %{_bindir}/osql | |
bde04e5c | 224 | %attr(755,root,root) %{_libdir}/libtdsodbc.so.*.*.* |
8aede280 | 225 | %attr(755,root,root) %ghost %{_libdir}/libtdsodbc.so.0 |
bde04e5c | 226 | %attr(755,root,root) %{_libdir}/libtdsodbc.so |
8aede280 JB |
227 | %{_mandir}/man1/bsqlodbc.1* |
228 | %{_mandir}/man1/osql.1* |