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 https
://mirror.eu.oneandone.net
/software
/openldap
/openldap-release
/ \
17 https
://www.openldap.org
/software
/download
/OpenLDAP
/openldap-release
/
18 PKG_HASH
:=082e998cf542984d43634442dbe11da860759e510907152ea579bdc42fe39ea0
19 PKG_LICENSE
:=OLDAP-2.8
20 PKG_LICENSE_FILES
:=LICENSE
21 PKG_CPE_ID
:=cpe
:/a
:openldap
:openldap
25 # Fixes the following:
26 # libtool: Version mismatch error. This is libtool 2.4.2, but the
27 # libtool: definition of this LT_INIT comes from libtool 2.4.6.
28 # libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
29 # libtool: and run autoconf again.
30 PKG_REMOVE_FILES
:=build
/ltversion.m4
32 PKG_CONFIG_DEPENDS
:= \
33 CONFIG_OPENLDAP_DEBUG \
34 CONFIG_OPENLDAP_CRYPT \
35 CONFIG_OPENLDAP_MONITOR \
36 CONFIG_OPENLDAP_DB47 \
39 include $(INCLUDE_DIR
)/package.mk
41 define Package
/libopenldap
/Default
45 TITLE
:=LDAP directory suite
46 URL
:=https
://www.openldap.org
/
47 MAINTAINER
:=W. Michael Petullo
<mike@flyn.org
>
50 define Package
/libopenldap
51 $(call Package
/libopenldap
/Default
)
53 DEPENDS
:=+libopenssl
+libsasl2
+libpthread
+libuuid
+OPENLDAP_DB47
:libdb47
+OPENLDAP_ICU
:icu
57 define Package
/openldap
/config
58 source
"$(SOURCE)/Config.in"
61 define Package
/libopenldap
/description
62 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.
65 define Package
/libopenldap
/conffiles
66 /etc
/openldap
/ldap.conf
69 define Package
/openldap-utils
70 $(call Package
/libopenldap
/Default
)
75 define Package
/openldap-utils
/description
76 This package contains client programs required to access LDAP servers.
79 define Package
/openldap-server
80 $(call Package
/libopenldap
/Default
)
81 DEPENDS
:=+libopenldap
+libuuid
85 define Package
/openldap-server
/description
86 This package contains server programs required to provide LDAP services.
89 define Package
/openldap-server
/conffiles
90 /etc
/openldap
/slapd.conf
94 TARGET_CFLAGS
+= $(FPIC
) -lpthread \
95 -DURANDOM_DEVICE
=\\\"/dev
/urandom
\\\"
105 --with-yielding_select
="yes" \
110 ifdef CONFIG_OPENLDAP_CRYPT
111 CONFIGURE_ARGS
+= --enable-crypt
113 CONFIGURE_ARGS
+= --disable-crypt
116 ifdef CONFIG_OPENLDAP_MONITOR
117 CONFIGURE_ARGS
+= --enable-monitor
119 CONFIGURE_ARGS
+= --disable-monitor
122 ifdef CONFIG_OPENLDAP_DEBUG
123 CONFIGURE_ARGS
+= --enable-debug
125 CONFIGURE_ARGS
+= --disable-debug
128 ifdef CONFIG_OPENLDAP_DB47
138 ifndef CONFIG_OPENLDAP_ICU
144 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
145 DESTDIR
="$(PKG_INSTALL_DIR)" \
148 cd
$(PKG_BUILD_DIR
)/libraries
/liblmdb
&& $(MAKE
) $(CONFIGURE_VARS
)
151 define Build
/InstallDev
152 $(INSTALL_DIR
) $(1)/usr
/include $(1)/usr
/lib
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/{lber
,ldap
}*.h
$(1)/usr
/include/
154 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.
{a
,so
*} $(1)/usr
/lib
/
157 define Package
/libopenldap
/install
158 $(INSTALL_DIR
) $(1)/etc
/openldap
$(1)/usr
/lib
159 $(CP
) $(PKG_INSTALL_DIR
)/etc
/openldap
/ldap.conf
$(1)/etc
/openldap
/
160 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{lber
,ldap
}*.so.
* $(1)/usr
/lib
/
163 define Package
/openldap-utils
/install
164 $(INSTALL_DIR
) $(1)/usr
/bin
165 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ldap
* $(1)/usr
/bin
/
168 define Package
/openldap-server
/install
169 $(INSTALL_DIR
) $(1)/etc
/init.d
170 $(INSTALL_BIN
) .
/files
/ldap.init
$(1)/etc
/init.d
/ldap
171 $(INSTALL_DIR
) $(1)/etc
/openldap
/schema
172 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/etc
/openldap
/schema
/* $(1)/etc
/openldap
/schema
/
173 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/openldap
/slapd.conf
$(1)/etc
/openldap
/
174 $(INSTALL_DIR
) $(1)/usr
/sbin
175 # NB: OpenLDAP installs slapd into libexecdir, not sbindir
176 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/slapd
$(1)/usr
/sbin
/
177 $(eval SLAPTOOLS
:= slapadd slapcat slapdn slapindex slappasswd slaptest slapauth slapacl slapschema
)
178 for i in
$(SLAPTOOLS
); do \
179 $(LN
) .
/slapd
$(1)/usr
/sbin
/$$$$i; \
183 $(eval
$(call BuildPackage
,libopenldap
))
184 $(eval
$(call BuildPackage
,openldap-utils
))
185 $(eval
$(call BuildPackage
,openldap-server
))