991d36953f3e4dccf2c170825db456539b324e00
[buildroot-mgba.git] / package / openldap / openldap.mk
1 ################################################################################
2 #
3 # openldap
4 #
5 ################################################################################
6
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
14 ifeq ($(BR2_PACKAGE_OPENSSL),y)
15 OPENLDAP_TLS = openssl
16 OPENLDAP_DEPENDENCIES += openssl
17 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
18 OPENLDAP_TLS = gnutls
19 OPENLDAP_DEPENDENCIES += gnutls
20 else ifeq ($(BR2_PACKAGE_LIBNSS),y)
21 OPENLDAP_TLS = moznss
22 OPENLDAP_DEPENDENCIES += libnss
23 OPENLDAP_CPPFLAGS = \
24         -I$(STAGING_DIR)/usr/include/nss \
25         -I$(STAGING_DIR)/usr/include/nspr
26 else
27 OPENLDAP_TLS = no
28 endif
29
30 ifeq ($(BR2_PACKAGE_OPENSSL),y)
31 OPENLDAP_MP = bignum
32 OPENLDAP_DEPENDENCIES += openssl
33 else ifeq ($(BR2_PACKAGE_GMP),y)
34 OPENLDAP_MP = gmp
35 OPENLDAP_DEPENDENCIES += gmp
36 else
37 OPENLDAP_MP = longlong
38 endif
39
40 OPENLDAP_CONF_ENV = ac_cv_func_memcmp_working=yes
41
42 OPENLDAP_CONF_OPTS += \
43         --enable-syslog \
44         --disable-proctitle \
45         --disable-slapd \
46         --with-yielding-select \
47         --sysconfdir=/etc \
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)"
52
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)"
57
58 ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
59 OPENLDAP_CLIENTS = \
60         ldapurl ldapexop ldapcompare ldapwhoami \
61         ldappasswd ldapmodrdn ldapdelete ldapmodify \
62         ldapsearch
63 define OPENLDAP_REMOVE_CLIENTS
64         $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
65         $(RM) -rf $(TARGET_DIR)/etc/openldap
66 endef
67 OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
68 endif
69
70 $(eval $(autotools-package))
This page took 0.018847 seconds and 2 git commands to generate.