Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > a51f35e76d992621668ba8af2a2c8c80 > files > 3

freetds-0.64-5mdv2008.0.src.rpm

%define TDSVER	7.0

%define	major 0
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d

Summary: 	An OpenSource implementation of the tubular data stream protocol
Name: 		freetds
Version: 	0.64
Release: 	%mkrel 5
License: 	LGPL
Group: 		System/Libraries
URL: 		http://www.freetds.org/
Source0:	http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/%{name}-%{version}.tar.bz2
Patch0:		freetds-0.64-makefile-doc.patch
BuildRequires:	doxygen
BuildRequires:	docbook-style-dsssl
BuildRequires:	ncurses-devel
BuildRequires:	readline-devel
BuildRequires:	unixODBC-devel >= 2.0.0
BuildRequires:	autoconf2.5
BuildRequires:	automake1.7
BuildRequires:	libtool
BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root

%description
FreeTDS is a free (open source) implementation of Sybase's db-lib,
ct-lib, and ODBC libraries. Currently, dblib and ctlib are most
mature. Both of these libraries have several programs know to
compile and run against them. ODBC is just a roughed in skeleton,
and not useful for real work.

This package is built with support for TDS version %{TDSVER}.

%package -n	%{libname}
Summary:	An Open Source implementation of the tubular data stream protocol
Group:          System/Libraries
Obsoletes:	%{name}
Provides:	%{name}

%description -n	%{libname}
FreeTDS is a free (open source) implementation of Sybase's db-lib,
ct-lib, and ODBC libraries. Currently, dblib and ctlib are most
mature. Both of these libraries have several programs know to
compile and run against them. ODBC is just a roughed in skeleton,
and not useful for real work.

This package is built with support for TDS version %{TDSVER}.

%package -n	%{libname}-unixodbc
Summary:	Driver ODBC for unixODBC
Group:		System/Libraries
Obsoletes:	%{name}-unixodbc
Provides:	%{name}-unixodbc
Requires:	%{libname} = %{version}-%{release}

%description -n	%{libname}-unixodbc
The freetds-unixodbc package contains ODBC driver build for
unixODBC.

This package is built with support for TDS version %{TDSVER}.

%package -n	%{develname}
Summary:	Development libraries and header files for the FreeTDS library
Group:		Development/C
Requires:	libtool
Requires:	%{libname} = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}
Provides:	%{name}-devel = %{version}
Obsoletes:	%{name}-devel
Obsoletes:	%{mklibname %{name} 0 -d}

%description -n	%{develname}
FreeTDS is a free (open source) implementation of Sybase's db-lib,
ct-lib, and ODBC libraries. Currently, dblib and ctlib are most
mature. Both of these libraries have several programs know to
compile and run against them. ODBC is just a roughed in skeleton,
and not useful for real work.

This package is built with support for TDS version %{TDSVER}.

This package allows you to compile applications with freetds
libraries.

%package -n	%{libname}-doc
Summary:	User documentation for FreeTDS
Group:		Books/Other
Obsoletes:	%{name}-doc
Provides:	%{name}-doc

%description -n	%{libname}-doc
The freetds-doc package contains the useguide and reference of
FreeTDS and can be installed even if FreeTDS main package is not
installed

%prep

%setup -q -n %{name}-%{version}
%patch0 -p1

find . -type d -perm 0700 -exec chmod 755 {} \;
find . -type f -perm 0555 -exec chmod 755 {} \;
find . -type f -perm 0444 -exec chmod 644 {} \;

for i in `find . -type d -name CVS`  `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
    if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
done

# lib64 fix
perl -pi -e "s|/lib\b|/%{_lib}|g" configure.in

# perl path fix
find -type f | xargs perl -pi -e "s|/usr/local/bin/perl|%{_bindir}/perl|g"

# cleanup the initial source
sed -i 's/\r//' doc/tds_ssl.html
sed -i '1 s,#!.*/perl,#!%{__perl},' samples/*.pl doc/api_status.txt

find doc/ samples/ COPYING* -type f -print0 | xargs -0 chmod -x
find . -name "*.[ch]" -print0 | xargs -0 chmod -x

# cause to rebuild docs
rm doc/doc/freetds-%{version}/reference/index.html
rm doc/doc/freetds-%{version}/userguide/index.htm

%build
export WANT_AUTOCONF_2_5=1
touch include/config.h.in
libtoolize --copy --force; aclocal-1.7; autoconf; automake-1.7 --add-missing

%configure2_5x \
    --with-tdsver=%{TDSVER} \
    --with-unixodbc=%{_prefix}

%make DOCBOOK_DSL="`rpm -ql docbook-style-dsssl | grep html/docbook.dsl`"

# (oe) the test suite assumes you have access to a sybase/mssql database 
# server (tds_connect) and have a correct freedts config...
#make check

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}/interfaces
install -d %{buildroot}%{_sysconfdir}/%{name}
install -d %{buildroot}%{_datadir}/%{name}-%{version}/samples

%makeinstall

chmod +x %{buildroot}%{_libdir}/*.so
cp -a -f samples/* %{buildroot}%{_datadir}/%{name}-%{version}/samples/

mv %{buildroot}/interfaces %{buildroot}%{_datadir}/%{name}-%{version}/

pushd %{buildroot}%{_sysconfdir}/%{name}
    ln -sf ../..%{_datadir}/%{name}-%{version}/interfaces/
popd

#remove unwanted files
rm -rf %{buildroot}%{_sysconfdir}/locales.conf
rm -rf %{buildroot}%{_docdir}/%{name}-*

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%post -n %{libname}-unixodbc -p /sbin/ldconfig

%postun -n %{libname}-unixodbc -p /sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README PWD
%config(noreplace) %{_sysconfdir}/freetds.conf
%config(noreplace) %{_sysconfdir}/pool.conf
%dir %{_datadir}/%{name}-%{version}
%{_bindir}/bsqldb
%{_bindir}/freebcp
%{_bindir}/tdspool
%{_bindir}/tsql
%{_bindir}/defncopy
%{_bindir}/datacopy
%{_libdir}/libct.so.*
%{_libdir}/libsybdb.so.*
%{_libdir}/libtds.so.*
%{_libdir}/libtdssrv.so.*
%{_datadir}/%{name}-%{version}/interfaces
%dir %{_sysconfdir}/%{name}/interfaces
%{_mandir}/man1/*

%files  -n %{libname}-unixodbc
%defattr(-,root,root)
%{_libdir}/libtdsodbc.so.*

%files  -n %{develname}
%defattr(-,root,root)
%doc TODO
%{_libdir}/*.la
%{_libdir}/*.a
%{_libdir}/*.so
%{_includedir}/*.h
%{_datadir}/%{name}-%{version}/samples

%files -n %{libname}-doc
%defattr (-,root,root)
%doc doc/images doc/doc/freetds-*/userguide doc/doc/freetds-*/reference


%changelog
* Tue Sep 04 2007 Oden Eriksson <oeriksson@mandriva.com> 0.64-5mdv2008.0
+ Revision: 79215
- sync with freetds-0.64-7.fc8.src.rpm to make it build the docs
- new devel naming


* Wed Oct 11 2006 Oden Eriksson <oeriksson@mandriva.com>
+ 2006-10-10 10:38:53 (63317)
- rebuild

* Wed Oct 11 2006 Oden Eriksson <oeriksson@mandriva.com>
+ 2006-10-10 10:37:57 (63316)
- Import freetds

* Tue Jul 18 2006 Oden Eriksson <oeriksson@mandriva.com> 0.64-2mdv2007.1
- rebuild

* Mon Jul 03 2006 Oden Eriksson <oeriksson@mandriva.com> 0.64-2mdv2007.0
- 0.64 (Major feature enhancements)

* Tue May 16 2006 Oden Eriksson <oeriksson@mandriva.com> 0.64-1.RC2.1mdk
- 0.64RC2

* Fri Oct 21 2005 Oden Eriksson <oeriksson@mandriva.com> 0.64-0.20051020.1mdk
- new snap (20051020)

* Fri Sep 02 2005 Oden Eriksson <oeriksson@mandriva.com> 0.64-0.20050831.1mdk
- used a snap in an attempt to close #17272

* Fri May 06 2005 Oden Eriksson <oeriksson@mandriva.com> 0.63-3mdk
- rebuilt with gcc4

* Sun Apr 10 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.63-2mdk
- added one lib64 fix

* Thu Mar 31 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.63-1mdk
- 0.63
- use the %%mkrel macro

* Fri Feb 04 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.4-5mdk
- rebuilt against new readline

* Mon Jan 03 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.4-4mdk
- fix deps

* Mon Jan 03 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.4-3mdk
- libifiction (why hasn't this been done before?)

* Wed Jul 14 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.4-2mdk
- make it compile on 10.0 too

* Sat Jul 03 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.4-1mdk
- 0.62.4

* Tue Jun 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.3-2mdk
- rebuild

* Thu May 06 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.62.3-1mdk
- 0.62.3
- merge spec file stuff from the provided spec file
- fix deps
- misc spec file fixes