do not build with freetds when it is not available

This commit is contained in:
Jan Kaluza 2013-05-09 13:15:47 +02:00
parent eed4742c8b
commit 5c58be0016

View File

@ -5,12 +5,18 @@
%define dbdep libdb-devel
%endif
%if 0%{?rhel}
%define with_freetds 0
%else
%define with_freetds 1
%endif
%define apuver 1
Summary: Apache Portable Runtime Utility library
Name: apr-util
Version: 1.4.1
Release: 7%{?dist}
Release: 8%{?dist}
License: ASL 2.0
Group: System Environment/Libraries
URL: http://apr.apache.org/
@ -70,6 +76,8 @@ Requires: apr-util%{?_isa} = %{version}-%{release}
This package provides the SQLite driver for the apr-util DBD
(database abstraction) interface.
%if %{with_freetds}
%package freetds
Group: Development/Libraries
Summary: APR utility library FreeTDS DBD driver
@ -80,6 +88,8 @@ Requires: apr-util%{?_isa} = %{version}-%{release}
This package provides the FreeTDS driver for the apr-util DBD
(database abstraction) interface.
%endif
%package odbc
Group: Development/Libraries
Summary: APR utility library ODBC DBD driver
@ -131,7 +141,12 @@ export ac_cv_ldap_set_rebind_proc_style=three
%configure --with-apr=%{_prefix} \
--includedir=%{_includedir}/apr-%{apuver} \
--with-ldap=ldap_r --without-gdbm \
--with-sqlite3 --with-pgsql --with-mysql --with-freetds --with-odbc \
--with-sqlite3 --with-pgsql --with-mysql --with-odbc \
%if %{with_freetds}
--with-freetds \
%else
--without-freetds \
%endif
--with-berkeley-db \
--without-sqlite2 \
--with-crypto --with-openssl --with-nss
@ -196,10 +211,14 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_sqlite*
%if %{with_freetds}
%files freetds
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_freetds*
%endif
%files odbc
%defattr(-,root,root,-)
%{_libdir}/apr-util-%{apuver}/apr_dbd_odbc*
@ -226,6 +245,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/*.m4
%changelog
* Thu May 09 2013 Jan Kaluza <jkaluza@redhat.com> - 1.4.1-8
- do not build with freetds when it is not available
* Wed Nov 07 2012 Jan Kaluza <jkaluza@redhat.com> - 1.4.1-7
- ensure we use latest libdb5 (not libdb4)