commit
23ee4d67b7
BIN
freetds-1.00.38.tar.bz2
Normal file
BIN
freetds-1.00.38.tar.bz2
Normal file
Binary file not shown.
15
freetds-tds_sysdep_public.h
Normal file
15
freetds-tds_sysdep_public.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* To avoid multiarch conflicts, we differentiate the 32/64 bit length
|
||||
* specific header names. This file is a wrapper to include the proper
|
||||
* arch-specific header at compile time.
|
||||
*/
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include <tds_sysdep_public_32.h>
|
||||
#elif __WORDSIZE == 64
|
||||
#include <tds_sysdep_public_64.h>
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
||||
123
freetds.spec
Normal file
123
freetds.spec
Normal file
@ -0,0 +1,123 @@
|
||||
Name: freetds
|
||||
Summary: Implementation of the TDS (Tabular DataStream) protocol
|
||||
Version: 1.00.38
|
||||
Release: 7
|
||||
License: LGPLv2+ and GPLv2+
|
||||
URL: http://www.freetds.org/
|
||||
|
||||
Source0: ftp://ftp.freetds.org/pub/freetds/stable/freetds-%{version}.tar.bz2
|
||||
Source1: freetds-tds_sysdep_public.h
|
||||
|
||||
BuildRequires: unixODBC-devel readline-devel gnutls-devel krb5-devel
|
||||
BuildRequires: libgcrypt-devel libtool doxygen docbook-style-dsssl
|
||||
|
||||
Provides: %{name}-libs = %{version}-%{release}
|
||||
Obsoletes: %{name}-libs < %{version}-%{release}
|
||||
|
||||
%description
|
||||
FreeTDS is an open source implementation of the TDS (Tabular
|
||||
Data Stream) protocol used by these databases for their own clients.
|
||||
It supports many different flavors of the protocol and three APIs
|
||||
to access it. FreeTDS includes call level interfaces for DB-Lib,
|
||||
CT-Lib, and ODBC.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Header files and development libraries for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package contains the header files and development libraries
|
||||
for %{name}. If you like to develop programs using %{name}, you will need
|
||||
to install %{name}-devel.
|
||||
|
||||
|
||||
%package help
|
||||
Summary: Help and development documentation for %{name}
|
||||
BuildArch: noarch
|
||||
Provides: freetds-doc
|
||||
Obsoletes: freetds-doc < %{version}-%{release}
|
||||
|
||||
%description help
|
||||
This package contains the help and development documentation for %{name}.
|
||||
If you like to grasp it and develop programs using %{name}, you will need
|
||||
to install %{name}-help.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
sed -i '1 s,#!.*/perl,#!%{__perl},' samples/*.pl
|
||||
|
||||
chmod 644 samples/*.sh
|
||||
|
||||
%build
|
||||
|
||||
[ -f configure ] || NOCONFIGURE=yes ./autogen.sh
|
||||
|
||||
%configure \
|
||||
--disable-dependency-tracking --disable-rpath --disable-static \
|
||||
--with-tdsver="auto" --with-unixodbc="%{_prefix}" --enable-msdblib \
|
||||
--enable-sybase-compat --with-gnutls --enable-krb5
|
||||
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_RIE|' libtool
|
||||
|
||||
%make_build DOCBOOK_DSL="`rpm -ql docbook-style-dsssl | fgrep html/docbook.dsl`"
|
||||
|
||||
|
||||
%install
|
||||
|
||||
%make_install
|
||||
|
||||
%delete_la
|
||||
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/*
|
||||
|
||||
mv -f $RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public.h $RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public_64.h
|
||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public.h
|
||||
|
||||
rm -f samples/{Makefile*,*.in,README}
|
||||
|
||||
mv -f samples/unixodbc.freetds.driver.template samples/unixodbc.freetds.driver.template-64
|
||||
|
||||
install -d samples-odbc
|
||||
mv -f samples/*odbc* samples-odbc
|
||||
|
||||
mv -f $RPM_BUILD_ROOT%{_docdir}/%{name} docdir
|
||||
find docdir -type f -exec chmod -x {} \;
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%{_bindir}/*
|
||||
%doc AUTHORS COPYING README COPYING.LIB samples-odbc
|
||||
%doc docdir/userguide docdir/images
|
||||
%{_libdir}/*.so.*
|
||||
%{_libdir}/libtdsodbc.so
|
||||
%config(noreplace) %{_sysconfdir}/*.conf
|
||||
|
||||
|
||||
%files devel
|
||||
%doc samples
|
||||
%{_libdir}/*.so
|
||||
%exclude %{_libdir}/libtdsodbc.so
|
||||
%{_includedir}/*
|
||||
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
%doc docdir/reference BUGS TODO doc/*.html NEWS
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 28 2019 Wanjiankang <wanjiankang@huawei.com> - 1.00.38-7
|
||||
- Initial package.
|
||||
Loading…
x
Reference in New Issue
Block a user