/[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 2060559 - (show annotations) (download)
Tue Apr 23 02:45:52 2024 UTC (2 days, 3 hours ago) by daviddavid
File size: 6384 byte(s)
- new version: 1.4.12

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

  ViewVC Help
Powered by ViewVC 1.1.30