1################################################################################ 2# 3# openldap 4# 5################################################################################ 6 7OPENLDAP_VERSION = 2.4.59 8OPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz 9OPENLDAP_SITE = https://www.openldap.org/software/download/OpenLDAP/openldap-release 10OPENLDAP_LICENSE = OpenLDAP Public License 11OPENLDAP_LICENSE_FILES = LICENSE 12OPENLDAP_CPE_ID_VENDOR = openldap 13OPENLDAP_SELINUX_MODULES = ldap 14OPENLDAP_INSTALL_STAGING = YES 15OPENLDAP_DEPENDENCIES = host-pkgconf 16 17ifeq ($(BR2_PACKAGE_OPENSSL),y) 18OPENLDAP_TLS = openssl 19OPENLDAP_DEPENDENCIES += openssl 20else ifeq ($(BR2_PACKAGE_GNUTLS),y) 21OPENLDAP_TLS = gnutls 22OPENLDAP_DEPENDENCIES += gnutls 23else ifeq ($(BR2_PACKAGE_LIBNSS),y) 24OPENLDAP_TLS = moznss 25OPENLDAP_DEPENDENCIES += libnss 26OPENLDAP_CPPFLAGS = \ 27 -I$(STAGING_DIR)/usr/include/nss \ 28 -I$(STAGING_DIR)/usr/include/nspr 29else 30OPENLDAP_TLS = no 31endif 32 33ifeq ($(BR2_PACKAGE_OPENSSL),y) 34OPENLDAP_MP = bignum 35OPENLDAP_DEPENDENCIES += openssl 36OPENLDAP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" 37else ifeq ($(BR2_PACKAGE_GMP),y) 38OPENLDAP_MP = gmp 39OPENLDAP_DEPENDENCIES += gmp 40else 41OPENLDAP_MP = longlong 42endif 43 44OPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes 45 46OPENLDAP_CONF_OPTS += \ 47 --enable-syslog \ 48 --disable-proctitle \ 49 --disable-slapd \ 50 --with-yielding-select \ 51 --sysconfdir=/etc \ 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)" 56 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. 60OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)" 61 62ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),) 63OPENLDAP_CLIENTS = \ 64 ldapurl ldapexop ldapcompare ldapwhoami \ 65 ldappasswd ldapmodrdn ldapdelete ldapmodify \ 66 ldapsearch 67define OPENLDAP_REMOVE_CLIENTS 68 $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p)) 69 $(RM) -rf $(TARGET_DIR)/etc/openldap 70endef 71OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS 72endif 73 74$(eval $(autotools-package)) 75