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