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