2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).tgz
15 PKG_SOURCE_URL
:=https
://gpl.savoirfairelinux.net
/pub
/mirrors
/openldap
/openldap-release
/ \
16 http
://mirror.eu.oneandone.net
/software
/openldap
/openldap-release
/ \
17 http
://mirror.switch.ch
/ftp
/software
/mirror
/OpenLDAP
/openldap-release
/ \
18 https
://www.openldap.org
/software
/download
/OpenLDAP
/openldap-release
/
19 PKG_HASH
:=f54c5877865233d9ada77c60c0f69b3e0bfd8b1b55889504c650047cc305520b
20 PKG_LICENSE
:=OLDAP-2.8
21 PKG_LICENSE_FILES
:=LICENSE
25 PKG_CONFIG_DEPENDS
:= \
26 CONFIG_OPENLDAP_DEBUG \
27 CONFIG_OPENLDAP_CRYPT \
28 CONFIG_OPENLDAP_MONITOR \
29 CONFIG_OPENLDAP_DB47 \
32 include $(INCLUDE_DIR
)/package.mk
34 define Package
/libopenldap
/Default
38 TITLE
:=LDAP directory suite
39 URL
:=http
://www.openldap.org
/
40 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
43 define Package
/libopenldap
44 $(call Package
/libopenldap
/Default
)
46 DEPENDS
:=+libopenssl
+libsasl2
+libpthread
+OPENLDAP_DB47
:libdb47
+OPENLDAP_ICU
:icu
50 define Package
/libopenldap
/config
52 bool
"Enable debugging information"
55 Enable debugging information. This option must be enabled
56 for the loglevel directive to work.
58 bool
"Crypt(3) passwords support"
61 With crypt
(3) password storage scheme enabled
, OpenLDAP can
62 receive and store SHA-256 and SHA-512 password hashes from
63 Samba AD-DC. If this option is disabled
, synchronization of
64 passwords between Samba AD-DC
(v4.5 and above
) and OpenLDAP
65 requires use of cleartext passwords.
66 To enable crypt
(3) password synchronization functionality
:
67 1. Re-include crypt
(3) support in OpenWRT by enabling
'Include
68 crypt() support for SHA256, SHA512 and Blowfish ciphers' option
69 in
"Advanced configuration options (for developers)" ->
71 2. Provision AD-DC with
'password hash userPassword schemes'
72 option. For more information
, see smb.conf manpage for details
73 on
'password hash userPassword schemes'.
74 3. Use a script to synchronize passwords from AD-DC to
75 OpenLDAP. See samba-tool manpage for
'user syncpasswords'.
76 config OPENLDAP_MONITOR
77 bool
"Enable monitor backend"
80 Enable monitor backend to obtain information about the running
81 status of the daemon. See OpenLDAP documentation for more
84 bool
"Berkeley DB support"
87 Enable Berkeley DB support
(BDB
).
92 Enable ICU
(International Components for Unicode
) support.
95 define Package
/libopenldap
/description
96 OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol
(LDAP
). This package contains the shared LDAP client libraries
, needed by other programs.
99 define Package
/libopenldap
/conffiles
100 /etc
/openldap
/ldap.conf
103 define Package
/openldap-utils
104 $(call Package
/libopenldap
/Default
)
105 DEPENDS
:=+libopenldap
109 define Package
/openldap-utils
/description
110 This package contains client programs required to access LDAP servers.
113 define Package
/openldap-server
114 $(call Package
/libopenldap
/Default
)
115 DEPENDS
:=+libopenldap
+libuuid
119 define Package
/openldap-server
/description
120 This package contains server programs required to provide LDAP services.
123 define Package
/openldap-server
/conffiles
124 /etc
/openldap
/slapd.conf
128 TARGET_CFLAGS
+= $(FPIC
) -lpthread \
129 -DURANDOM_DEVICE
=\\\"/dev
/urandom
\\\"
139 --with-yielding_select
="yes" \
144 ifdef CONFIG_OPENLDAP_CRYPT
145 CONFIGURE_ARGS
+= --enable-crypt
147 CONFIGURE_ARGS
+= --disable-crypt
150 ifdef CONFIG_OPENLDAP_MONITOR
151 CONFIGURE_ARGS
+= --enable-monitor
153 CONFIGURE_ARGS
+= --disable-monitor
156 ifdef CONFIG_OPENLDAP_DEBUG
157 CONFIGURE_ARGS
+= --enable-debug
159 CONFIGURE_ARGS
+= --disable-debug
162 ifdef CONFIG_OPENLDAP_DB47
172 ifndef CONFIG_OPENLDAP_ICU
178 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
179 DESTDIR
="$(PKG_INSTALL_DIR)" \
182 cd
$(PKG_BUILD_DIR
)/libraries
/liblmdb
&& $(MAKE
) $(CONFIGURE_VARS
)
185 define Build
/InstallDev
186 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
187 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/{lber
,ldap
}*.h
$(1)/usr
/include/
188 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.
{a
,so
*} $(1)/usr
/lib
/
191 define Package
/libopenldap
/install
192 $(INSTALL_DIR
) $(1)/etc
/openldap
$(1)/usr
/lib
193 $(CP
) $(PKG_INSTALL_DIR
)/etc
/openldap
/ldap.conf
$(1)/etc
/openldap
/
194 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.so.
* $(1)/usr
/lib
/
197 define Package
/openldap-utils
/install
198 $(INSTALL_DIR
) $(1)/usr
/bin
199 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ldap
* $(1)/usr
/bin
/
202 define Package
/openldap-server
/install
203 $(INSTALL_DIR
) $(1)/etc
/init.d
204 $(INSTALL_BIN
) .
/files
/ldap.init
$(1)/etc
/init.d
/ldap
205 $(INSTALL_DIR
) $(1)/etc
/openldap
/schema
206 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/openldap
/schema
/* $(1)/etc
/openldap
/schema
/
207 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/slapd.conf
$(1)/etc
/openldap
/
208 $(INSTALL_DIR
) $(1)/usr
/sbin
209 # NB: OpenLDAP installs slapd into libexecdir, not sbindir
210 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/slapd
$(1)/usr
/sbin
/
211 $(eval SLAPTOOLS
:= slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema
)
212 for i in
$(SLAPTOOLS
); do \
213 $(LN
) .
/slapd
$(1)/usr
/sbin
/$$$$i; \
217 $(eval
$(call BuildPackage
,libopenldap
))
218 $(eval
$(call BuildPackage
,openldap-utils
))
219 $(eval
$(call BuildPackage
,openldap-server
))