xref: /OK3568_Linux_fs/buildroot/package/openldap/openldap.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# openldap
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunOPENLDAP_VERSION = 2.4.59
8*4882a593SmuzhiyunOPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz
9*4882a593SmuzhiyunOPENLDAP_SITE = https://www.openldap.org/software/download/OpenLDAP/openldap-release
10*4882a593SmuzhiyunOPENLDAP_LICENSE = OpenLDAP Public License
11*4882a593SmuzhiyunOPENLDAP_LICENSE_FILES = LICENSE
12*4882a593SmuzhiyunOPENLDAP_CPE_ID_VENDOR = openldap
13*4882a593SmuzhiyunOPENLDAP_SELINUX_MODULES = ldap
14*4882a593SmuzhiyunOPENLDAP_INSTALL_STAGING = YES
15*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES = host-pkgconf
16*4882a593Smuzhiyun
17*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENSSL),y)
18*4882a593SmuzhiyunOPENLDAP_TLS = openssl
19*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES += openssl
20*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_GNUTLS),y)
21*4882a593SmuzhiyunOPENLDAP_TLS = gnutls
22*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES += gnutls
23*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_LIBNSS),y)
24*4882a593SmuzhiyunOPENLDAP_TLS = moznss
25*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES += libnss
26*4882a593SmuzhiyunOPENLDAP_CPPFLAGS = \
27*4882a593Smuzhiyun	-I$(STAGING_DIR)/usr/include/nss \
28*4882a593Smuzhiyun	-I$(STAGING_DIR)/usr/include/nspr
29*4882a593Smuzhiyunelse
30*4882a593SmuzhiyunOPENLDAP_TLS = no
31*4882a593Smuzhiyunendif
32*4882a593Smuzhiyun
33*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENSSL),y)
34*4882a593SmuzhiyunOPENLDAP_MP = bignum
35*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES += openssl
36*4882a593SmuzhiyunOPENLDAP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
37*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_GMP),y)
38*4882a593SmuzhiyunOPENLDAP_MP = gmp
39*4882a593SmuzhiyunOPENLDAP_DEPENDENCIES += gmp
40*4882a593Smuzhiyunelse
41*4882a593SmuzhiyunOPENLDAP_MP = longlong
42*4882a593Smuzhiyunendif
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunOPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunOPENLDAP_CONF_OPTS += \
47*4882a593Smuzhiyun	--enable-syslog \
48*4882a593Smuzhiyun	--disable-proctitle \
49*4882a593Smuzhiyun	--disable-slapd \
50*4882a593Smuzhiyun	--with-yielding-select \
51*4882a593Smuzhiyun	--sysconfdir=/etc \
52*4882a593Smuzhiyun	--enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \
53*4882a593Smuzhiyun	--with-tls=$(OPENLDAP_TLS) \
54*4882a593Smuzhiyun	--with-mp=$(OPENLDAP_MP) \
55*4882a593Smuzhiyun	CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)"
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun# Somehow, ${STRIP} does not percolates through to the shtool script
58*4882a593Smuzhiyun# used to install the executables; thus, that script tries to run the
59*4882a593Smuzhiyun# executable it is supposed to install, resulting in an error.
60*4882a593SmuzhiyunOPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)"
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),)
63*4882a593SmuzhiyunOPENLDAP_CLIENTS = \
64*4882a593Smuzhiyun	ldapurl ldapexop ldapcompare ldapwhoami \
65*4882a593Smuzhiyun	ldappasswd ldapmodrdn ldapdelete ldapmodify \
66*4882a593Smuzhiyun	ldapsearch
67*4882a593Smuzhiyundefine OPENLDAP_REMOVE_CLIENTS
68*4882a593Smuzhiyun	$(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p))
69*4882a593Smuzhiyun	$(RM) -rf $(TARGET_DIR)/etc/openldap
70*4882a593Smuzhiyunendef
71*4882a593SmuzhiyunOPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS
72*4882a593Smuzhiyunendif
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun$(eval $(autotools-package))
75