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