/[packages]/cauldron/freetds/current/SPECS/freetds.spec
ViewVC logotype

Contents of /cauldron/freetds/current/SPECS/freetds.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16362 - (show annotations) (download)
Thu Jan 13 19:42:13 2011 UTC (11 years, 7 months ago) by ahmad
File size: 6908 byte(s)
imported package freetds
1 %define TDSVER 7.0
2
3 %define major 0
4 %define libname %mklibname %{name} %{major}
5 %define develname %mklibname %{name} -d
6
7 Summary: An OpenSource implementation of the tabular data stream protocol
8 Name: freetds
9 Version: 0.82
10 Release: %mkrel 11
11 License: LGPL
12 Group: System/Libraries
13 URL: http://www.freetds.org/
14 Source0: http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/%{name}-%{version}.tar.gz
15 Patch0: freetds-do_not_build_the_docs.diff
16 Patch1: freetds-0.82-libtool.patch
17 BuildRequires: doxygen
18 BuildRequires: docbook-style-dsssl
19 BuildRequires: ncurses-devel
20 BuildRequires: readline-devel
21 BuildRequires: unixODBC-devel >= 2.0.0
22 BuildRequires: autoconf2.5
23 BuildRequires: automake
24 BuildRequires: libtool
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
26
27 %description
28 FreeTDS is a free (open source) implementation of Sybase's db-lib, ct-lib, and
29 ODBC libraries. Currently, dblib and ctlib are most mature. Both of these
30 libraries have several programs know to compile and run against them. ODBC is
31 just a roughed in skeleton, and not useful for real work.
32
33 This package is built with support for TDS version %{TDSVER}.
34
35 %package -n %{libname}
36 Summary: An Open Source implementation of the tabular data stream protocol
37 Group: System/Libraries
38 Obsoletes: %{name}
39 Provides: %{name}
40 # library package contained binaries as well, so obsoleting:
41 Obsoletes: %{_lib}freetds_mssql0
42
43 %description -n %{libname}
44 FreeTDS is a free (open source) implementation of Sybase's db-lib, ct-lib, and
45 ODBC libraries. Currently, dblib and ctlib are most mature. Both of these
46 libraries have several programs know to compile and run against them. ODBC is
47 just a roughed in skeleton, and not useful for real work.
48
49 This package is built with support for TDS version %{TDSVER}.
50
51 %package -n %{libname}-unixodbc
52 Summary: Driver ODBC for unixODBC
53 Group: System/Libraries
54 Obsoletes: %{name}-unixodbc
55 Provides: %{name}-unixodbc
56 Requires: %{libname} = %{version}-%{release}
57 Obsoletes: %{_lib}freetds_mssql0-unixodbc
58
59 %description -n %{libname}-unixodbc
60 The freetds-unixodbc package contains ODBC driver build for unixODBC.
61
62 This package is built with support for TDS version %{TDSVER}.
63
64 %package -n %{develname}
65 Summary: Development libraries and header files for the FreeTDS library
66 Group: Development/C
67 Requires: libtool
68 Requires: %{libname} = %{version}-%{release}
69 Requires: %{libname}-unixodbc = %{version}-%{release}
70 Provides: lib%{name}-devel = %{version}
71 Provides: %{name}-devel = %{version}
72 Provides: freetds_mssql-devel = %{version}-%{release}
73 Obsoletes: %{name}-devel
74 Obsoletes: %{mklibname %{name} 0 -d}
75 Obsoletes: %{_lib}freetds_mssql-devel
76
77 %description -n %{develname}
78 FreeTDS is a free (open source) implementation of Sybase's db-lib, ct-lib, and
79 ODBC libraries. Currently, dblib and ctlib are most mature. Both of these
80 libraries have several programs know to compile and run against them. ODBC is
81 just a roughed in skeleton, and not useful for real work.
82
83 This package is built with support for TDS version %{TDSVER}.
84
85 This package allows you to compile applications with freetds libraries.
86
87 %package -n %{libname}-doc
88 Summary: User documentation for FreeTDS
89 Group: Books/Other
90 Obsoletes: %{name}-doc
91 Provides: %{name}-doc
92 Obsoletes: %{_lib}freetds_mssql0-doc
93
94 %description -n %{libname}-doc
95 The freetds-doc package contains the useguide and reference of FreeTDS and can
96 be installed even if FreeTDS main package is not installed
97
98 %prep
99
100 %setup -q -n %{name}-%{version}
101 %patch0 -p1
102 %patch1 -p1
103
104 find . -type d -perm 0700 -exec chmod 755 {} \;
105 find . -type f -perm 0555 -exec chmod 755 {} \;
106 find . -type f -perm 0444 -exec chmod 644 {} \;
107
108 for i in `find . -type d -name CVS` `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
109 if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
110 done
111
112 # lib64 fix
113 perl -pi -e "s|/lib\b|/%{_lib}|g" configure*
114
115 # perl path fix
116 find -type f | xargs perl -pi -e "s|/usr/local/bin/perl|%{_bindir}/perl|g"
117
118 # cleanup the initial source
119 sed -i 's/\r//' doc/tds_ssl.html
120 sed -i '1 s,#!.*/perl,#!%{__perl},' samples/*.pl doc/api_status.txt
121
122 find doc/ samples/ COPYING* -type f -print0 | xargs -0 chmod -x
123 find . -name "*.[ch]" -print0 | xargs -0 chmod -x
124
125 # cause to rebuild docs
126 rm doc/doc/freetds-%{version}/reference/index.html
127 rm doc/doc/freetds-%{version}/userguide/index.htm
128
129 %build
130 autoreconf -fis
131
132 %configure2_5x \
133 --with-tdsver=%{TDSVER} \
134 --with-unixodbc=%{_prefix}
135
136 %make
137 # DOCBOOK_DSL="`rpm -ql docbook-style-dsssl | grep html/docbook.dsl`"
138
139 # (oe) the test suite assumes you have access to a sybase/mssql database
140 # server (tds_connect) and have a correct freedts config...
141 #make check
142
143 %install
144 rm -rf %{buildroot}
145
146 install -d %{buildroot}/interfaces
147 install -d %{buildroot}%{_sysconfdir}/%{name}
148 install -d %{buildroot}%{_datadir}/%{name}-%{version}/samples
149 install -d %{buildroot}%{_mandir}/man1
150 install -d %{buildroot}%{_mandir}/man5
151
152 %makeinstall
153
154 install -m0644 include/tdsconvert.h %{buildroot}%{_includedir}/
155 install -m0644 include/tds.h %{buildroot}%{_includedir}/
156 install -m0644 include/tdsver.h %{buildroot}%{_includedir}/
157
158 install -m0644 doc/*.1 %{buildroot}%{_mandir}/man1/
159 install -m0644 doc/*.5 %{buildroot}%{_mandir}/man5/
160
161 chmod +x %{buildroot}%{_libdir}/*.so
162 cp -a -f samples/* %{buildroot}%{_datadir}/%{name}-%{version}/samples/
163
164 mv %{buildroot}/interfaces %{buildroot}%{_datadir}/%{name}-%{version}/
165
166 pushd %{buildroot}%{_sysconfdir}/%{name}
167 ln -sf ../..%{_datadir}/%{name}-%{version}/interfaces/
168 popd
169
170 #remove unwanted files
171 rm -rf %{buildroot}%{_sysconfdir}/locales.conf
172 rm -rf %{buildroot}%{_docdir}/%{name}-*
173
174 %if %mdkversion < 200900
175 %post -n %{libname} -p /sbin/ldconfig
176 %endif
177
178 %if %mdkversion < 200900
179 %postun -n %{libname} -p /sbin/ldconfig
180 %endif
181
182 %if %mdkversion < 200900
183 %post -n %{libname}-unixodbc -p /sbin/ldconfig
184 %endif
185
186 %if %mdkversion < 200900
187 %postun -n %{libname}-unixodbc -p /sbin/ldconfig
188 %endif
189
190 %clean
191 rm -rf %{buildroot}
192
193 %files -n %{libname}
194 %defattr(-,root,root)
195 %doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README PWD
196 %config(noreplace) %{_sysconfdir}/freetds.conf
197 %config(noreplace) %{_sysconfdir}/pool.conf
198 %dir %{_datadir}/%{name}-%{version}
199 %{_bindir}/bsqldb
200 %{_bindir}/bsqlodbc
201 %{_bindir}/datacopy
202 %{_bindir}/defncopy
203 %{_bindir}/fisql
204 %{_bindir}/freebcp
205 %{_bindir}/osql
206 %{_bindir}/tdspool
207 %{_bindir}/tsql
208 %{_libdir}/libct.so.*
209 %{_libdir}/libsybdb.so.*
210 %{_datadir}/%{name}-%{version}/interfaces
211 %dir %{_sysconfdir}/%{name}/interfaces
212 %{_mandir}/man1/*
213 %{_mandir}/man5/*
214
215 %files -n %{libname}-unixodbc
216 %defattr(-,root,root)
217 %{_libdir}/libtdsodbc.so.*
218
219 %files -n %{develname}
220 %defattr(-,root,root)
221 %doc TODO
222 %{_includedir}/*.h
223 %{_libdir}/*.la
224 %{_libdir}/*.a
225 %{_libdir}/*.so
226 %{_datadir}/%{name}-%{version}/samples
227
228 %files -n %{libname}-doc
229 %defattr (-,root,root)
230 %doc doc/images doc/doc/freetds-*/userguide doc/doc/freetds-*/reference
231
232

  ViewVC Help
Powered by ViewVC 1.1.28