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