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