Use %bcond_without lmdb
This commit is contained in:
parent
adebf43374
commit
755067edc3
31
libldb.spec
31
libldb.spec
@ -1,12 +1,16 @@
|
||||
%if ((0%{?fedora} || 0%{?rhel} > 7 || 0%{?epel} > 6))
|
||||
|
||||
# lmdb is not supported on 32 bit architectures
|
||||
%if ((0%{?fedora} || 0%{?epel} > 6) && 0%{?__isa_bits} == 64)
|
||||
%ifarch ppc64le
|
||||
%global without_lmdb_flags --without-ldb-lmdb
|
||||
%ifarch aarch64 s390x x86_64
|
||||
%bcond_without lmdb
|
||||
%else
|
||||
%global with_lmdb 1
|
||||
%bcond_with lmdb
|
||||
#endif arch
|
||||
%endif
|
||||
|
||||
%else
|
||||
%global without_lmdb_flags --without-ldb-lmdb
|
||||
%bcond_with lmdb
|
||||
#endif fedora || rhel || epel
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
@ -40,7 +44,7 @@ BuildRequires: gcc
|
||||
BuildRequires: libtalloc-devel >= %{talloc_version}
|
||||
BuildRequires: libtdb-devel >= %{tdb_version}
|
||||
BuildRequires: libtevent-devel >= %{tevent_version}
|
||||
%if 0%{?with_lmdb}
|
||||
%if %{with lmdb}
|
||||
BuildRequires: lmdb-devel >= 0.9.16
|
||||
%endif
|
||||
BuildRequires: popt-devel
|
||||
@ -142,21 +146,20 @@ export python_LDFLAGS=""
|
||||
--bundled-libraries=NONE \
|
||||
--builtin-libraries=replace \
|
||||
--with-modulesdir=%{_libdir}/ldb/modules \
|
||||
%{?without_lmdb_flags} \
|
||||
%if %{without lmdb}
|
||||
--without-ldb-lmdb \
|
||||
%endif
|
||||
--with-privatelibdir=%{_libdir}/ldb
|
||||
|
||||
%make_build
|
||||
doxygen Doxyfile
|
||||
|
||||
%if %{with lmdb}
|
||||
%check
|
||||
%ifarch ppc64le
|
||||
echo disabling one assertion in tests/python/repack.py
|
||||
sed -e '/test_guid_indexed_v1_db/,+18{/toggle_guidindex_check_pack/d}' -i tests/python/repack.py
|
||||
make %{?_smp_mflags} check
|
||||
#endif with lmdb
|
||||
%endif
|
||||
|
||||
|
||||
%make_build check
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
@ -175,7 +178,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
|
||||
%if 0%{?with_lmdb}
|
||||
%if %{with lmdb}
|
||||
%{_libdir}/ldb/libldb-mdb-int.so
|
||||
%endif
|
||||
%dir %{_libdir}/ldb/modules
|
||||
|
Loading…
Reference in New Issue
Block a user