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