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