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
14 ifeq ($(BR2_PACKAGE_OPENSSL),y)
15 OPENLDAP_TLS = openssl
16 OPENLDAP_DEPENDENCIES += openssl
17 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
19 OPENLDAP_DEPENDENCIES += gnutls
20 else ifeq ($(BR2_PACKAGE_LIBNSS),y)
22 OPENLDAP_DEPENDENCIES += libnss
24 -I$(STAGING_DIR)/usr/include/nss \
25 -I$(STAGING_DIR)/usr/include/nspr
30 ifeq ($(BR2_PACKAGE_OPENSSL),y)
32 OPENLDAP_DEPENDENCIES += openssl
33 else ifeq ($(BR2_PACKAGE_GMP),y)
35 OPENLDAP_DEPENDENCIES += gmp
37 OPENLDAP_MP = longlong
40 OPENLDAP_CONF_ENV = ac_cv_func_memcmp_working=yes
42 OPENLDAP_CONF_OPTS += \
46 --with-yielding-select \
48 --enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \
49 --with-tls=$(OPENLDAP_TLS) \
50 --with-mp=$(OPENLDAP_MP) \
51 CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)"
53 # Somehow, ${STRIP} does not percolates through to the shtool script
54 # used to install the executables; thus, that script tries to run the
55 # executable it is supposed to install, resulting in an error.
56 OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)"
58 ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
60 ldapurl ldapexop ldapcompare ldapwhoami \
61 ldappasswd ldapmodrdn ldapdelete ldapmodify \
63 define OPENLDAP_REMOVE_CLIENTS
64 $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
65 $(RM) -rf $(TARGET_DIR)/etc/openldap
67 OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
70 $(eval $(autotools-package))