[packages/openldap] - made lmdb BR useful: added system-lmdb patch, use system lmdb
qboosh
qboosh at pld-linux.org
Thu Apr 26 17:40:17 CEST 2018
commit de2a83251b6b2fe081f55f7969927885371063ee
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Apr 26 17:40:34 2018 +0200
- made lmdb BR useful: added system-lmdb patch, use system lmdb
openldap-system-lmdb.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
openldap.spec | 12 +++++++++---
2 files changed, 53 insertions(+), 3 deletions(-)
---
diff --git a/openldap.spec b/openldap.spec
index 0f66be2..6abdc74 100644
--- a/openldap.spec
+++ b/openldap.spec
@@ -8,6 +8,7 @@
%bcond_without sasl # don't build cyrus sasl support
%bcond_without slp # disable SLP support
%bcond_with system_db # system Berkeley DB
+%bcond_without system_lmdb # system LMDB
%bcond_with nondist # non-distributable package (DB >= 6.0.20)
# Never change or update Berkeley DB, it's there to isolate OpenLDAP
@@ -60,6 +61,7 @@ Patch20: %{name}-man.patch
Patch22: %{name}-am.patch
Patch23: %{name}-db.patch
Patch24: %{name}-default_cacert_path.patch
+Patch25: %{name}-system-lmdb.patch
# Patch for the evolution library
Patch100: %{name}-ntlm.diff
URL: http://www.openldap.org/
@@ -84,7 +86,7 @@ BuildRequires: libltdl-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2.2
BuildRequires: libwrap-devel
-BuildRequires: lmdb-devel
+%{?with_system_lmdb:BuildRequires: lmdb-devel >= 0.9.22}
%{?with_ndb:BuildRequires: mysql-devel}
%{?with_slp:BuildRequires: openslp-devel}
BuildRequires: openssl-devel >= 0.9.7d
@@ -412,6 +414,7 @@ Summary(pl.UTF-8): Backend MDB (Memory-Mapped DB) do serwera OpenLDAP
Group: Networking/Daemons
Requires(post,preun): sed >= 4.0
Requires: %{name}-servers = %{version}-%{release}
+%{?with_system_lmdb:Requires: lmdb-libs >= 0.9.22}
%description backend-mdb
MDB (Memory-Mapped DB) backend to slapd, the OpenLDAP server.
@@ -1224,8 +1227,8 @@ Nakładka śledząca wywołania nakładek.
%prep
%setup -q -c %{!?with_system_db:-a1}
%{!?with_system_db:%patch18 -p0}
-%{!?with_system_db:mv db-%{db_version} db}
-mv %{name}-%{version} %{name}
+%{!?with_system_db:%{__mv} db-%{db_version} db}
+%{__mv} %{name}-%{version} %{name}
cd %{name}
%patch0 -p1
%patch1 -p1
@@ -1249,6 +1252,9 @@ cd %{name}
%patch22 -p1
%patch23 -p1
%patch24 -p1
+%if %{with system_lmdb}
+%patch25 -p1
+%endif
%if %{with krb5}
%patch17 -p1
%endif
diff --git a/openldap-system-lmdb.patch b/openldap-system-lmdb.patch
new file mode 100644
index 0000000..bfcfae7
--- /dev/null
+++ b/openldap-system-lmdb.patch
@@ -0,0 +1,44 @@
+--- openldap-2.4.46/servers/slapd/back-mdb/Makefile.in.orig 2018-03-22 16:44:27.000000000 +0100
++++ openldap-2.4.46/servers/slapd/back-mdb/Makefile.in 2018-04-25 21:29:23.479386799 +0200
+@@ -25,18 +25,17 @@
+ extended.lo operational.lo \
+ attr.lo index.lo key.lo filterindex.lo \
+ dn2entry.lo dn2id.lo id2entry.lo idl.lo \
+- nextid.lo monitor.lo mdb.lo midl.lo
++ nextid.lo monitor.lo
+
+ LDAP_INCDIR= ../../../include
+ LDAP_LIBDIR= ../../../libraries
+-MDB_SUBDIR = $(srcdir)/$(LDAP_LIBDIR)/liblmdb
+
+ BUILD_OPT = "--enable-mdb"
+ BUILD_MOD = @BUILD_MDB@
+
+ mod_DEFS = -DSLAPD_IMPORT
+ MOD_DEFS = $(@BUILD_MDB at _DEFS)
+-MOD_LIBS = $(MDB_LIBS)
++MOD_LIBS = $(MDB_LIBS) -llmdb
+
+ shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
+ NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC at _LDAP_LIBS)
+@@ -44,7 +43,7 @@
+
+ LIBBASE = back_mdb
+
+-XINCPATH = -I.. -I$(srcdir)/.. -I$(MDB_SUBDIR)
++XINCPATH = -I.. -I$(srcdir)/..
+ XDEFS = $(MODULES_CPPFLAGS)
+
+ all-local-lib: ../.backend
+@@ -52,11 +51,5 @@
+ ../.backend: lib$(LIBBASE).a
+ @touch $@
+
+-mdb.lo: $(MDB_SUBDIR)/mdb.c
+- $(LTCOMPILE_MOD) $(MDB_SUBDIR)/mdb.c
+-
+-midl.lo: $(MDB_SUBDIR)/midl.c
+- $(LTCOMPILE_MOD) $(MDB_SUBDIR)/midl.c
+-
+ veryclean-local-lib: FORCE
+ $(RM) $(XXHEADERS) $(XXSRCS) .links
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openldap.git/commitdiff/de2a83251b6b2fe081f55f7969927885371063ee
More information about the pld-cvs-commit
mailing list