The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / 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 OPENLDAP_DEPENDENCIES = host-pkgconf
14
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
31 ifeq ($(BR2_PACKAGE_OPENSSL),y)
32 OPENLDAP_MP = bignum
33 OPENLDAP_DEPENDENCIES += openssl
34 OPENLDAP_CONF_ENV = LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto)"
35 else ifeq ($(BR2_PACKAGE_GMP),y)
36 OPENLDAP_MP = gmp
37 OPENLDAP_DEPENDENCIES += gmp
38 else
39 OPENLDAP_MP = longlong
40 endif
41
42 OPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes
43
44 OPENLDAP_CONF_OPTS += \
45         --enable-syslog \
46         --disable-proctitle \
47         --disable-slapd \
48         --with-yielding-select \
49         --sysconfdir=/etc \
50         --enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \
51         --with-tls=$(OPENLDAP_TLS) \
52         --with-mp=$(OPENLDAP_MP) \
53         CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)"
54
55 # Somehow, ${STRIP} does not percolates through to the shtool script
56 # used to install the executables; thus, that script tries to run the
57 # executable it is supposed to install, resulting in an error.
58 OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)"
59
60 ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
61 OPENLDAP_CLIENTS = \
62         ldapurl ldapexop ldapcompare ldapwhoami \
63         ldappasswd ldapmodrdn ldapdelete ldapmodify \
64         ldapsearch
65 define OPENLDAP_REMOVE_CLIENTS
66         $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
67         $(RM) -rf $(TARGET_DIR)/etc/openldap
68 endef
69 OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
70 endif
71
72 $(eval $(autotools-package))