openldap.mk 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ################################################################################
  2. #
  3. # openldap
  4. #
  5. ################################################################################
  6. OPENLDAP_VERSION = 2.5.18
  7. OPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz
  8. OPENLDAP_SITE = https://www.openldap.org/software/download/OpenLDAP/openldap-release
  9. OPENLDAP_LICENSE = OpenLDAP Public License
  10. OPENLDAP_LICENSE_FILES = LICENSE
  11. OPENLDAP_CPE_ID_VENDOR = openldap
  12. OPENLDAP_SELINUX_MODULES = ldap
  13. OPENLDAP_INSTALL_STAGING = YES
  14. 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)
  19. OPENLDAP_TLS = gnutls
  20. OPENLDAP_DEPENDENCIES += gnutls
  21. else ifeq ($(BR2_PACKAGE_LIBNSS),y)
  22. OPENLDAP_TLS = moznss
  23. OPENLDAP_DEPENDENCIES += libnss
  24. OPENLDAP_CPPFLAGS = \
  25. -I$(STAGING_DIR)/usr/include/nss \
  26. -I$(STAGING_DIR)/usr/include/nspr
  27. else
  28. OPENLDAP_TLS = no
  29. endif
  30. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  31. OPENLDAP_MP = bignum
  32. OPENLDAP_DEPENDENCIES += openssl
  33. OPENLDAP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
  34. else ifeq ($(BR2_PACKAGE_GMP),y)
  35. OPENLDAP_MP = gmp
  36. OPENLDAP_DEPENDENCIES += gmp
  37. else
  38. OPENLDAP_MP = longlong
  39. endif
  40. OPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes
  41. OPENLDAP_CONF_OPTS += \
  42. --enable-syslog \
  43. --disable-proctitle \
  44. --disable-slapd \
  45. --with-yielding-select \
  46. --sysconfdir=/etc \
  47. --enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \
  48. --with-tls=$(OPENLDAP_TLS) \
  49. --with-mp=$(OPENLDAP_MP) \
  50. CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)"
  51. # Somehow, ${STRIP} does not percolates through to the shtool script
  52. # used to install the executables; thus, that script tries to run the
  53. # executable it is supposed to install, resulting in an error.
  54. OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)"
  55. ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
  56. OPENLDAP_CLIENTS = \
  57. ldapurl ldapexop ldapcompare ldapwhoami \
  58. ldappasswd ldapmodrdn ldapdelete ldapmodify \
  59. ldapsearch
  60. define OPENLDAP_REMOVE_CLIENTS
  61. $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
  62. $(RM) -rf $(TARGET_DIR)/etc/openldap
  63. endef
  64. OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
  65. endif
  66. $(eval $(autotools-package))