1 ################################################################################
5 ################################################################################
7 OPENLDAP_VERSION = 2.4.40
8 OPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz
9 OPENLDAP_SITE = ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release
10 OPENLDAP_LICENSE = OpenLDAP Public License
11 OPENLDAP_LICENSE_FILES = LICENSE
12 OPENLDAP_INSTALL_STAGING = YES
13 OPENLDAP_DEPENDENCIES = host-pkgconf
15 ifeq ($(BR2_PACKAGE_OPENSSL),y)
16 OPENLDAP_TLS = openssl
17 OPENLDAP_DEPENDENCIES += openssl
18 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
20 OPENLDAP_DEPENDENCIES += gnutls
21 else ifeq ($(BR2_PACKAGE_LIBNSS),y)
23 OPENLDAP_DEPENDENCIES += libnss
25 -I$(STAGING_DIR)/usr/include/nss \
26 -I$(STAGING_DIR)/usr/include/nspr
31 ifeq ($(BR2_PACKAGE_OPENSSL),y)
33 OPENLDAP_DEPENDENCIES += openssl
34 OPENLDAP_CONF_ENV = LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto)"
35 else ifeq ($(BR2_PACKAGE_GMP),y)
37 OPENLDAP_DEPENDENCIES += gmp
39 OPENLDAP_MP = longlong
42 OPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes
44 OPENLDAP_CONF_OPTS += \
48 --with-yielding-select \
50 --enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \
51 --with-tls=$(OPENLDAP_TLS) \
52 --with-mp=$(OPENLDAP_MP) \
53 CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)"
55 # Somehow, ${STRIP} does not percolates through to the shtool script
56 # used to install the executables; thus, that script tries to run the
57 # executable it is supposed to install, resulting in an error.
58 OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)"
60 ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
62 ldapurl ldapexop ldapcompare ldapwhoami \
63 ldappasswd ldapmodrdn ldapdelete ldapmodify \
65 define OPENLDAP_REMOVE_CLIENTS
66 $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
67 $(RM) -rf $(TARGET_DIR)/etc/openldap
69 OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
72 $(eval $(autotools-package))