]>
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 | 18 | Version: 0.91 |
f1b48755 | 19 | Release: 3 |
f7cbf8ea | 20 | License: LGPL v2+ |
8ce0c8b5 | 21 | Group: Libraries |
9b0c092a | 22 | Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.gz |
f7cbf8ea | 23 | # Source0-md5: b14db5823980a32f0643d1a84d3ec3ad |
33c6f7cd | 24 | Patch0: format-security.patch |
8ce0c8b5 | 25 | URL: http://www.freetds.org/ |
8aede280 | 26 | BuildRequires: autoconf >= 2.53 |
bff0c498 | 27 | BuildRequires: automake |
d119a539 | 28 | BuildRequires: gettext-tools |
f7cbf8ea | 29 | %{?with_kerberos5:BuildRequires: heimdal-devel} |
337fcfc4 | 30 | BuildRequires: libltdl-devel |
bff0c498 | 31 | BuildRequires: libtool |
bde04e5c | 32 | BuildRequires: openssl-devel |
8ce0c8b5 | 33 | BuildRequires: unixODBC-devel |
9eb0d0b4 | 34 | Requires(post): /sbin/ldconfig |
8ce0c8b5 JB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
9eb0d0b4 JB |
37 | %define _sysconfdir /etc/tds |
38 | ||
8ce0c8b5 JB |
39 | %description |
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. | |
45 | ||
fe90d866 JR |
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. | |
8ce0c8b5 JB |
53 | |
54 | %package devel | |
55 | Summary: FreeTDS header files | |
dbb092a7 | 56 | Summary(pl.UTF-8): Pliki nagłówkowe FreeTDS |
8ce0c8b5 | 57 | Group: Development/Libraries |
08350ff5 | 58 | Requires: %{name} = %{version}-%{release} |
f7cbf8ea | 59 | %{?with_kerberos5:Requires: heimdal-devel} |
bde04e5c | 60 | Requires: openssl-devel |
8ce0c8b5 JB |
61 | |
62 | %description devel | |
63 | FreeTDS header files. | |
64 | ||
fe90d866 JR |
65 | %description devel -l pl.UTF-8 |
66 | Pliki nagłówkowe FreeTDS. | |
8ce0c8b5 JB |
67 | |
68 | %package static | |
69 | Summary: FreeTDS static libraries | |
dbb092a7 | 70 | Summary(pl.UTF-8): Statyczne biblioteki FreeTDS |
8ce0c8b5 | 71 | Group: Development/Libraries |
08350ff5 | 72 | Requires: %{name}-devel = %{version}-%{release} |
8ce0c8b5 JB |
73 | |
74 | %description static | |
75 | FreeTDS static libraries. | |
76 | ||
fe90d866 | 77 | %description static -l pl.UTF-8 |
8ce0c8b5 JB |
78 | Statyczne biblioteki FreeTDS. |
79 | ||
bde04e5c JB |
80 | %package odbc |
81 | Summary: FreeTDS ODBC driver for unixODBC | |
dbb092a7 | 82 | Summary(pl.UTF-8): Sterownik ODBC FreeTDS dla unixODBC |
bde04e5c JB |
83 | Group: Libraries |
84 | Requires(post): /sbin/ldconfig | |
85 | Requires(post): /usr/bin/odbcinst | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | Requires: unixODBC | |
88 | ||
89 | %description odbc | |
90 | FreeTDS ODBC driver for unixODBC. | |
91 | ||
fe90d866 | 92 | %description odbc -l pl.UTF-8 |
bde04e5c JB |
93 | Sterownik ODBC FreeTDS dla unixODBC. |
94 | ||
8ce0c8b5 JB |
95 | %prep |
96 | %setup -q | |
33c6f7cd | 97 | %patch0 -p1 |
8ce0c8b5 JB |
98 | |
99 | %build | |
bff0c498 | 100 | %{__libtoolize} |
8aede280 | 101 | %{__aclocal} -I m4 |
993c5eb0 | 102 | %{__autoconf} |
8aede280 | 103 | %{__autoheader} |
bff0c498 | 104 | %{__automake} |
8ce0c8b5 | 105 | %configure \ |
f7cbf8ea | 106 | %{?with_kerberos5:--enable-krb5=gssapi} \ |
8ce0c8b5 | 107 | --with-tdsver=%{tdsver} \ |
08350ff5 | 108 | %{?with_msdblib:--with-msdblib} \ |
bde04e5c | 109 | --with-openssl \ |
fdafe96c | 110 | --with-unixodbc=/usr |
8ce0c8b5 JB |
111 | |
112 | %{__make} | |
113 | ||
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
bde04e5c | 116 | |
8ce0c8b5 JB |
117 | %{__make} install \ |
118 | DESTDIR=$RPM_BUILD_ROOT \ | |
119 | ETC=$RPM_BUILD_ROOT%{_sysconfdir} | |
120 | ||
33c6f7cd JR |
121 | cp -a src/pool/BUGS BUGS.pool |
122 | cp -a src/pool/README README.pool | |
123 | cp -a src/pool/TODO TODO.pool | |
70398db6 | 124 | |
bde04e5c | 125 | # ODBC driver, dlopen()ed |
f7cbf8ea | 126 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtdsodbc.{la,a} |
bde04e5c | 127 | |
33c6f7cd JR |
128 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
129 | ||
8ce0c8b5 JB |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
9eb0d0b4 JB |
133 | %post |
134 | /sbin/ldconfig | |
135 | if [ -f /etc/freetds.conf ]; then | |
136 | mv -f /etc/freetds.conf %{_sysconfdir}/freetds.conf | |
137 | fi | |
138 | ||
8ce0c8b5 JB |
139 | %postun -p /sbin/ldconfig |
140 | ||
bde04e5c JB |
141 | %post odbc |
142 | /sbin/ldconfig | |
143 | /usr/bin/odbcinst -i -d -r <<EOF | |
144 | [FreeTDS] | |
145 | Description = FreeTDS unixODBC Driver | |
146 | Driver = %{_libdir}/libtdsodbc.so.0 | |
147 | Setup = %{_libdir}/libtdsodbc.so.0 | |
148 | EOF | |
149 | /usr/bin/odbcinst -i -d -r <<EOF | |
150 | [SQL Server] | |
151 | Description = FreeTDS unixODBC Driver | |
152 | Driver = %{_libdir}/libtdsodbc.so.0 | |
153 | Setup = %{_libdir}/libtdsodbc.so.0 | |
154 | EOF | |
155 | ||
156 | %postun odbc -p /sbin/ldconfig | |
157 | ||
8ce0c8b5 JB |
158 | %files |
159 | %defattr(644,root,root,755) | |
f7cbf8ea | 160 | %doc AUTHORS BUGS* ChangeLog NEWS README* TODO* doc/doc/%{name}-%{version}/userguide |
8aede280 JB |
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 | |
bde04e5c | 168 | %attr(755,root,root) %{_libdir}/libct.so.*.*.* |
8aede280 | 169 | %attr(755,root,root) %ghost %{_libdir}/libct.so.4 |
bde04e5c | 170 | %attr(755,root,root) %{_libdir}/libsybdb.so.*.*.* |
8aede280 | 171 | %attr(755,root,root) %ghost %{_libdir}/libsybdb.so.5 |
9eb0d0b4 | 172 | %dir %{_sysconfdir} |
c12462d0 ER |
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 | |
8aede280 JB |
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* | |
8ce0c8b5 JB |
183 | |
184 | %files devel | |
185 | %defattr(644,root,root,755) | |
f7cbf8ea | 186 | %doc doc/doc/%{name}-%{version}/reference |
bde04e5c JB |
187 | %attr(755,root,root) %{_libdir}/libct.so |
188 | %attr(755,root,root) %{_libdir}/libsybdb.so | |
bde04e5c JB |
189 | %{_libdir}/libct.la |
190 | %{_libdir}/libsybdb.la | |
bde04e5c | 191 | %{_includedir}/*.h |
8ce0c8b5 JB |
192 | |
193 | %files static | |
194 | %defattr(644,root,root,755) | |
bde04e5c JB |
195 | %{_libdir}/libct.a |
196 | %{_libdir}/libsybdb.a | |
bde04e5c JB |
197 | |
198 | %files odbc | |
199 | %defattr(644,root,root,755) | |
8aede280 JB |
200 | %attr(755,root,root) %{_bindir}/bsqlodbc |
201 | %attr(755,root,root) %{_bindir}/osql | |
bde04e5c | 202 | %attr(755,root,root) %{_libdir}/libtdsodbc.so.*.*.* |
8aede280 | 203 | %attr(755,root,root) %ghost %{_libdir}/libtdsodbc.so.0 |
bde04e5c | 204 | %attr(755,root,root) %{_libdir}/libtdsodbc.so |
8aede280 JB |
205 | %{_mandir}/man1/bsqlodbc.1* |
206 | %{_mandir}/man1/osql.1* |