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