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