]> git.pld-linux.org Git - packages/openldap.git/commitdiff
- made lmdb BR useful: added system-lmdb patch, use system lmdb
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 26 Apr 2018 15:40:34 +0000 (17:40 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 26 Apr 2018 15:40:34 +0000 (17:40 +0200)
openldap-system-lmdb.patch [new file with mode: 0644]
openldap.spec

diff --git a/openldap-system-lmdb.patch b/openldap-system-lmdb.patch
new file mode 100644 (file)
index 0000000..bfcfae7
--- /dev/null
@@ -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@_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@_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
index 0f66be205f18d4ddd136b27a864ca49401fda6a8..6abdc749c3d4c401c9096c7b6047a7d4610df5b8 100644 (file)
@@ -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
This page took 0.1171 seconds and 4 git commands to generate.