From daf66419ef210571f774240d90ee6e64cd2e5779 Mon Sep 17 00:00:00 2001 From: kkz Date: Mon, 8 Sep 2025 17:30:03 +0800 Subject: [PATCH] optimize spec file --- libldb.spec | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libldb.spec b/libldb.spec index 53fabaf..3772df7 100644 --- a/libldb.spec +++ b/libldb.spec @@ -1,4 +1,4 @@ -%global with_lmdb 1 +%global with_lmdb 0 %global with_python3 1 %global talloc_version 2.4.1 %global tdb_version 1.4.9 @@ -6,7 +6,7 @@ Name: libldb Version: 2.8.0 -Release: 1 +Release: 2 Summary: A schema-less, ldap like, API and database Requires: libtalloc%{?_isa} >= %{talloc_version} Requires: libtdb%{?_isa} >= %{tdb_version} @@ -19,10 +19,13 @@ Source1: http://samba.org/ftp/ldb/ldb-%{version}.tar.asc Patch0: backport-Skip-ldb_lmdb_free_list_test-on-ppc64el-ppc64-and-sp.patch BuildRequires: gcc libtalloc-devel >= %{talloc_version} libtdb-devel >= %{tdb_version} -BuildRequires: libtevent-devel >= %{tevent_version} lmdb-devel >= 0.9.16 popt-devel +BuildRequires: libtevent-devel >= %{tevent_version} popt-devel BuildRequires: libxslt docbook-style-xsl python3-devel python3-tdb python3-talloc-devel BuildRequires: python3-tevent doxygen openldap-devel libcmocka-devel gnupg2 BuildRequires: chrpath +%if %{with lmdb} +BuildRequires: lmdb-devel >= 0.9.16 +%endif Provides: bundled(libreplace) ldb-tools Obsoletes: python2-ldb < 2.0.5-1 python2-ldb-devel < 2.0.5-1 pyldb < 1.1.26-2 ldb-tools @@ -82,7 +85,9 @@ 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 V=1 @@ -103,7 +108,10 @@ chrpath -d %{buildroot}%{_bindir}/ldbmodify chrpath -d %{buildroot}%{_bindir}/ldbadd chrpath -d %{buildroot}%{_bindir}/ldbdel chrpath -d %{buildroot}%{_bindir}/ldbsearch +%if %{with lmdb} chrpath -d %{buildroot}%{_libdir}/ldb/libldb-mdb-int.so +chrpath -d %{buildroot}%{_libdir}/ldb/modules/ldb/mdb.so +%endif chrpath -d %{buildroot}%{_libdir}/ldb/libldb-tdb-int.so chrpath -d %{buildroot}%{_libdir}/ldb/libldb-key-value.so chrpath -d %{buildroot}%{_libdir}/ldb/modules/ldb/tdb.so @@ -128,7 +136,9 @@ echo "%{_libdir}/ldb" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_libdir}/ldb/libldb-key-value.so %{_libdir}/ldb/libldb-tdb-err-map.so %{_libdir}/ldb/libldb-tdb-int.so +%if %{with lmdb} %{_libdir}/ldb/libldb-mdb-int.so +%endif %dir %{_libdir}/ldb/modules %dir %{_libdir}/ldb/modules/ldb %{_libdir}/ldb/modules/ldb/*.so @@ -170,6 +180,9 @@ echo "%{_libdir}/ldb" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %{_mandir}/man1/ldbsearch.1.* %changelog +* Mon Sep 08 2025 kkz - 2.8.0-2 +- optimize spec files + * Thu Dec 28 2023 xinghe - 2.8.0-1 - Type:requirement - ID:NA -- Gitee