]> git.pld-linux.org Git - packages/freetds.git/blame - freetds.spec
- fixed firmat string error
[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:
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
15Summary: Free implementation of Sybase's db-lib
dbb092a7 16Summary(pl.UTF-8): Wolnodostępna implementacja db-lib firmy Sybase
8ce0c8b5 17Name: freetds
f7cbf8ea 18Version: 0.91
a47ebbf2 19Release: 2
f7cbf8ea 20License: LGPL v2+
8ce0c8b5 21Group: Libraries
9b0c092a 22Source0: ftp://ftp.freetds.org/pub/freetds/stable/%{name}-%{version}.tar.gz
f7cbf8ea 23# Source0-md5: b14db5823980a32f0643d1a84d3ec3ad
33c6f7cd 24Patch0: format-security.patch
8ce0c8b5 25URL: http://www.freetds.org/
8aede280 26BuildRequires: autoconf >= 2.53
bff0c498 27BuildRequires: automake
d119a539 28BuildRequires: gettext-tools
f7cbf8ea 29%{?with_kerberos5:BuildRequires: heimdal-devel}
337fcfc4 30BuildRequires: libltdl-devel
bff0c498 31BuildRequires: libtool
bde04e5c 32BuildRequires: openssl-devel
8ce0c8b5 33BuildRequires: unixODBC-devel
9eb0d0b4 34Requires(post): /sbin/ldconfig
8ce0c8b5
JB
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
9eb0d0b4
JB
37%define _sysconfdir /etc/tds
38
8ce0c8b5
JB
39%description
40FreeTDS is a free (open source) implementation of Sybase's db-lib,
41ct-lib, and ODBC libraries (which can be used also to work with MS SQL
42databases). Currently, dblib and ctlib are most mature. Both of these
43libraries have several programs known to compile and run against them.
44ODBC is not quite as mature, but may work depending on your needs.
45
fe90d866
JR
46%description -l pl.UTF-8
47FreeTDS to wolnodostępna (z otwartymi źródłami) implementacja
48bibliotek db-lib, ct-lib i ODBC firmy Sybase (których można używać
49także do pracy z bazami MS SQL). Aktualnie najlepiej działają dblib i
50ctlib - istnieje trochę programów, o których wiadomo, że kompilują się
51i działają z tymi bibliotekami. ODBC nie jest jeszcze na tyle
52skończony, ale może działać w zależności od potrzeb.
8ce0c8b5
JB
53
54%package devel
55Summary: FreeTDS header files
dbb092a7 56Summary(pl.UTF-8): Pliki nagłówkowe FreeTDS
8ce0c8b5 57Group: Development/Libraries
08350ff5 58Requires: %{name} = %{version}-%{release}
f7cbf8ea 59%{?with_kerberos5:Requires: heimdal-devel}
bde04e5c 60Requires: openssl-devel
8ce0c8b5
JB
61
62%description devel
63FreeTDS header files.
64
fe90d866
JR
65%description devel -l pl.UTF-8
66Pliki nagłówkowe FreeTDS.
8ce0c8b5
JB
67
68%package static
69Summary: FreeTDS static libraries
dbb092a7 70Summary(pl.UTF-8): Statyczne biblioteki FreeTDS
8ce0c8b5 71Group: Development/Libraries
08350ff5 72Requires: %{name}-devel = %{version}-%{release}
8ce0c8b5
JB
73
74%description static
75FreeTDS static libraries.
76
fe90d866 77%description static -l pl.UTF-8
8ce0c8b5
JB
78Statyczne biblioteki FreeTDS.
79
bde04e5c
JB
80%package odbc
81Summary: FreeTDS ODBC driver for unixODBC
dbb092a7 82Summary(pl.UTF-8): Sterownik ODBC FreeTDS dla unixODBC
bde04e5c
JB
83Group: Libraries
84Requires(post): /sbin/ldconfig
85Requires(post): /usr/bin/odbcinst
86Requires: %{name} = %{version}-%{release}
87Requires: unixODBC
88
89%description odbc
90FreeTDS ODBC driver for unixODBC.
91
fe90d866 92%description odbc -l pl.UTF-8
bde04e5c
JB
93Sterownik 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
115rm -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
121cp -a src/pool/BUGS BUGS.pool
122cp -a src/pool/README README.pool
123cp -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
131rm -rf $RPM_BUILD_ROOT
132
9eb0d0b4
JB
133%post
134/sbin/ldconfig
135if [ -f /etc/freetds.conf ]; then
136 mv -f /etc/freetds.conf %{_sysconfdir}/freetds.conf
137fi
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]
145Description = FreeTDS unixODBC Driver
146Driver = %{_libdir}/libtdsodbc.so.0
147Setup = %{_libdir}/libtdsodbc.so.0
148EOF
149/usr/bin/odbcinst -i -d -r <<EOF
150[SQL Server]
151Description = FreeTDS unixODBC Driver
152Driver = %{_libdir}/libtdsodbc.so.0
153Setup = %{_libdir}/libtdsodbc.so.0
154EOF
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*
This page took 0.087587 seconds and 4 git commands to generate.