Update conditional build of lmdb

This commit is contained in:
Lukas Slebodnik 2019-01-18 11:53:21 +01:00
parent 160b21d5a3
commit f79e4c7cba

View File

@ -2,6 +2,13 @@
%{!?python2_sitelib: %global python2_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
# lmdb is not supported on 32 bit architectures
%if ((0%{?fedora} || 0%{?epel} > 6) && 0%{?__isa_bits} == 64)
%global with_lmdb 1
%else
%global without_lmdb_flags --without-ldb-lmdb
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
@ -44,7 +51,9 @@ BuildRequires: gcc
BuildRequires: libtalloc-devel >= %{talloc_version}
BuildRequires: libtdb-devel >= %{tdb_version}
BuildRequires: libtevent-devel >= %{tevent_version}
%if 0%{?with_lmdb}
BuildRequires: lmdb-devel >= 0.9.16
%endif
BuildRequires: popt-devel
BuildRequires: libxslt
BuildRequires: docbook-style-xsl
@ -166,6 +175,7 @@ sed -e 's:\.\./\.\./buildtools:./buildtools:' -i Makefile
--builtin-libraries=replace \
--with-modulesdir=%{_libdir}/ldb/modules \
%{?extra_python} \
%{?without_lmdb_flags} \
--with-privatelibdir=%{_libdir}/ldb
make %{?_smp_mflags} V=1
@ -200,8 +210,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
%{_libdir}/ldb/libldb-key-value.so
%{_libdir}/ldb/libldb-tdb-err-map.so
%{_libdir}/ldb/libldb-tdb-int.so
# lmdb is not supported on 32 bit architectures
%if 0%{?__isa_bits} == 64
%if 0%{?with_lmdb}
%{_libdir}/ldb/libldb-mdb-int.so
%endif
%dir %{_libdir}/ldb/modules