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