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