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