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