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