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